Which units are font sizes measured in?

To the right of the Font drop down selection box in Unreal there is a font size field. What units are these font sizes measured in because it doesn’t appear to be pixels as we expected for 2D UI assets. When we enter the font size in this field the results appears to have no correlation to any unit we have tried.

Currently we are having to take a screen shot of the UI and overlay it in Photoshop then go back and adjust it by trial and error until we end up with what appears to be an arbitrary number. If we knew how Unreal sizes fonts we could calculate the numbers we need.

We have looked into the DPI Scale settings in the view port but it doesn’t appear to resolve the issue and our current DPI Scale is set to 1.0 or 1:1.

126368-font_units.jpg

We’re having exactly the same issue, did you ever find a solution to this?

Yes we did. Fonts are measured in points but Epic measure points at 96 DPI not 72 DPI like other UI Frameworks. This means you have to multiply your font pixel size by 72/96 to get the Unreal point size. Hence the confusion. Personally I would prefer font sizes in pixels or points at 72 DPI which would be much simpler to design for.

Glad to hear someone reached the same conclusion! I made a guess that this might be the case and it seemed to be working, but I couldn’t find anywhere that stated that Unreal does work in 96 DPI, is this documented somewhere, or simply through experimentation?

Quite an old question, but just to clarify, I was having the same issue and I wanted to say that I found out the tooltip when hovering over the font size text box talks about this exact issue.

Just found out about it!

Not sure what the best approach to implement my PS UI designs, but I’ll just eye ball it or calculate it I guess.

I suggested they add a tool tip telling users that font sizes are measured in points which they kindly did. The way to implement your designs is to multiply your Photoshop font sizes (probably pixels) by 72/96. It will give you the exact size you need in Slate point sizes. For all other UI units Slate works in pixels and you should have no problems.

Additionally, you can just type your illustrator font size directly into the editor suffixed with * 0.75 and it will evaluate to the correct size. So if you’re after Illustrators equivalent of 72 you type:

72 * 0.75 into the “Size” box and it will evaluate to the correct size (54)

1 Like

Wow yeah, this was driving me crazy.

For some reason I couldn’t modify my existing illustrator document but knowing I can type in *.75 at least works.

Ideally what I set in illustrator would line up but oh well. I tried changing the document to 96 PPI and setting my font unit to points instead of pixels and actually my illustrator points and pixels were identical no matter the DPI/PPI settings so that was weird…