editor2-issues
editor2-issues copied to clipboard
Custom Font rendered strange.
I hope I'm making a stupid mistake. :)
Expected behaviour
The font should be rendered correctly.
Actual behaviour
The font looks like been trimmed, see the picture.
Steps to reproduce
Just simply create a default gui.text with the builtin font /builtins/fonts/vera_mo_bd.ttf.
https://github.com/tangyiyang/repo-for-report-bugs/blob/master/text-render-problem.png
Build time | 2018-02-09T17:55:28.506062 |
Defold channel | editor-alpha |
Defold editor sha | ae0c5857e5a413235c097fcc87d53a3f62756d1c |
Defold engine sha | c70ad190898e790f8284e8dab0e31c9090476be9 |
Defold version | 1.2.120 |
GPU | NVIDIA GeForce GT 650M OpenGL Engine |
GPU Driver | 2.1 NVIDIA-10.17.5 355.10.05.45f01 |
Java version | 1.8.0_102-b14 |
OS arch | x86_64 |
OS name | Mac OS X |
OS version | 10.12.6 |
Do you have the right material set in the font?
Haven't changed setting yet. This is the content of font file.
font: "/builtins/fonts/vera_mo_bd.ttf" material: "/builtins/fonts/font.material" size: 24 antialias: 1 alpha: 1.0 outline_alpha: 0.0 outline_width: 0.0 shadow_alpha: 0.0 shadow_blur: 0 shadow_x: 0.0 shadow_y: 0.0 extra_characters: "" output_format: TYPE_BITMAP all_chars: false cache_width: 0 cache_height: 0
https://github.com/tangyiyang/repo-for-report-bugs/blob/master/screen-shot-for-html5-version.png
The Html5 Version looks great, It looks like a mac platform issue.
If you can make a small example and upload as a zip
I have uploaded a project here: https://github.com/tangyiyang/repo-for-report-bugs/blob/master/render-issue.zip
The main issue is that, the transparent pixels (wrap the text glyph) of the font rendered by defold looks like been trimmed as I mentioned. You may have a look at what glyph designer
have rendered.
PS: In order to exclude the influence of ttf file itself, I'm using SourceCodeVariable-Roman
font build by adobe, https://github.com/adobe-fonts/source-code-pro/releases.
Lots of Thanks, :)
Hi!
Could you highlight the error(s) in the images for me? Is it the bottom of some of the chars, like; L, v, l, R, n and K?
Can't see how it should behave differently on HTML5 compared to any other platform, since the build steps are the same for all platforms.
Ping @tangyiyang :)
Meet the same situation
Font browser
Editor
Debug build
html5 build is fine
The font properties
Trial on other fonts. Appears that some of character, say 9, is being clipped but not as obvious as vera_mo_bd
Arial
Arial blk