Hi there,
We have a font in our game which does not seem to be importing correctly. In UMG when we use font, it is never centered vertically correctly and seems to be drawn one pixel above text box start.
Here is an example of this:
As you can see here, text box is set to be draw in middle and if we change our text to standard it will be correctly shown in center of white box. You can also see with text in black area that top of text is being cut off (same font). Again if we change to another font we have no issues.
I am not sure why this is occurring. actual preview of font asset seems correct, but its hard to see vertical alignment there. Ive attached font here in case it helps. What can we change to get this working? What is import doing incorrect?
[link text][2]
Hi ,
Sorry for delay in response, this one got lost somehow. Are you still experiencing this issue? Which version of engine are you using? I’ll make sure we get someone to look into this for you as quickly as we can.
Hello .Driehuis,
I was looking over your issue and I was unable to get font to clip along top. However, font is clearly not centered. This may be due to fact that it is a tall and thin font. I imported a font with a similar appearance and was able to get same sort of offset. I have written up a report ( UE-16756) and I have submitted it to developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your time and information.
Make it a great day
Thanks for that, yeah we figured that might be case but had no way to fix it. We just ended up having to set negative invisible shadows everywhere to at least make it look mostly centered. We are due to hit cert sometime this week, but hopefully this helps find a way to combat it in future. Thanks again.
This isn’t an incorrect import and it’s unlikely something we can solve on our end. font’s author has a lot to do with these sorts of problems, font in question appears to report a large descender for at least one of characters in font package to freetype, which we include in our calculation of size of a line of text. Because we have to account for any space that may be needed for crazy squiggles under baseline for like super fancy q’s and p’s…etc.
You could try and account for this kind of thing by adding top padding to textblock. But other than that I think your only other option would be to look for a more correctly authored font.
Stumbled on this troubleshooting same issue. For anyone else who lands here I found a solution. You can open font file itself and adjust characters Y position. a bit of trial and error and you should be able to have nicely centred fonts inside unreal.
- Open font in Font Forge (free open source)
- Select all glyphs
- Menubar > Element > Transform
- Move Y (enter value, negative moves glyphs down)
- Menubar > File > Generate Fonts