Files
yohann dossantos ba41f5abfb - Added a per project Font display DPI setting, in order to allow using (but not being limited to) the standard 72 DPI used by most creation software (Photoshop, Figma,...). Slate will still work at 96DPI.
- Converted the font size to float, to allow specifying more precise size, and support the sizes that would be wanted at (for instance) 72 DPI, without losing information (ie rounding to the closest 96DPI int).
- Change various font caches behavior (glyph, advance, kerning...) to match behavior of Freetype, and ensure that a given size in Freetype will be stored only once in the font caches.
- Added cvar commands:
    - Slate.DumpFontCacheStats: will display the list of all font combinations used, with the number of glyphs for each combination.
    - Slate.FlushFontCache: will clear the font caches as well as the font atlases, then will invalidate all the widgets to force the cache to be refilled.
- Fixed the combo box for font typeface selection not disabled when necessary.

#tests:
- changed the Font display settings between various values and customDPI, validatet that everything was save correctly, and that the display was reacting to the value change.
- tested all the tooltips, simple, extended (ctrl + alt), and dynamic (display of the current DPI setting next to the font size).
- validated that the font atlas/cache was containing not more than one time each glyph rendered by Freetype.
- validated that the edition of the font size was still fully functionnal (spinbox, undo/redo, support of disable state,...).
- tested default value for a new project (72DPI).
- compiled Slate/SlateCore/UMG with UnsafeTypeCastWarningLevel = WarningLevel.Warning to fix warnings related to the change.
- tested in a game with latest changes from BP team (CL 26034633), ensuring that there are no regression related to the change of type (int to float) from the Font size.
- running with it in a game and UE branch for months.

#jira UE-152161
#rb patrick.boutot

[CL 26074535 by yohann dossantos in 5.3 branch]
2023-06-16 18:36:14 -04:00
..