Note: Bitmap fonts require FreeType 2.10, and support is compiled out if using an older version.
Font Rendering:
- ApplySizeAndScale now computes the desired pixel size manually (using our desired DPI) rather than calling FT_Set_Char_Size.
- This also includes the font scale, which avoids the call to FT_Set_Transform and lets us remove some workarounds for inconsistent scaling from FreeType.
- For scalable fonts the desired pixel size is passed to FT_Set_Pixel_Sizes.
- For bitmap fonts the desired pixel size is used to find the most suitable strike size (set via FT_Select_Size) and the ratio needed to scale that strike to the desired size (see GetBitmapAtlasScale and GetBitmapRenderScale).
- AppendGlyphFlags has been updated to load color data (when available), and to only exclude bitmap data for fonts that also have scalable data.
- FSlateFontRenderer::GetRenderDataInternal has been updated to handle color bitmap rendering (BGRA, sRGB) in addition to the existing grayscale rendering.
- It will also handle scaling down bitmap font strikes that are larger than the desired size, which saves space in the atlas (see GetBitmapAtlasScale).
- It won't scale up any bitmaps, as that is handled by the transform applied when batching the glyph quads for rendering (see GetBitmapRenderScale).
- Added support for disabling outline and tint for bitmap fonts (in Slate and Canvas).
- Added support for batching both grayscale (8-bit alpha-only) and color (8-bit per-channel BGRA) font quads from a font texture atlas (in RHI, D3D, and OpenGL).
- Removed unused data from FCharacterRenderData.
#jira
#rb Matt.Kuhlenschmidt
#ROBOMERGE-SOURCE: CL 8177432 via CL 8197318
#ROBOMERGE-BOT: (v401-8057353)
[CL 8197520 by jamie dale in Main branch]
- The font selection process for HarfBuzz shaping now processes text as grapheme clusters, which ensures that things like zero-width joiners are applied using the correct font.
- The font ranges are now selected using codepoints (UTF32CHAR) rather than platform specific characters (TCHAR).
- This allows characters outside of the BMP to choose the correct font, even on platforms using UTF-16 strings (surrogate pairs are combined when processing the grapheme clusters).
- The logic for calculating the number of characters and grapheme clusters in a glyph have been combined into a single optimized loop (separately for LTR and RTL text) which fixes some counting issues in the old code.
#jira
#rb Matt.Kuhlenschmidt
#ROBOMERGE-SOURCE: CL 8127222 via CL 8132376
#ROBOMERGE-BOT: (v401-8057353)
[CL 8157701 by jamie dale in Main branch]
[REVIEW]
#ROBOMERGE-SOURCE: CL 8126418 via CL 8126494 via CL 8126581 via CL 8132180
#ROBOMERGE-BOT: (v401-8057353)
[CL 8157233 by matt kuhlenschmidt in Main branch]
[FYI] Matt.Kuhlenschmidt
#ROBOMERGE-SOURCE: CL 8095498 via CL 8100173 via CL 8109054
#ROBOMERGE-BOT: (v401-8057353)
[CL 8109149 by nick darnell in Main branch]
[CODEREVIEW] nick.darnell
#ROBOMERGE-SOURCE: CL 8092502 via CL 8096604
#ROBOMERGE-BOT: (v401-8057353)
[CL 8096607 by matt kuhlenschmidt in Main branch]
#ROBOMERGE-SOURCE: CL 8030219 via CL 8035494 via CL 8035653 via CL 8045857
#ROBOMERGE-BOT: (v400-8057353)
[CL 8062990 by matt kuhlenschmidt in Main branch]
#ROBOMERGE-SOURCE: CL 8030195 via CL 8035484 via CL 8035646 via CL 8045849
#ROBOMERGE-BOT: (v400-8057353)
[CL 8062986 by matt kuhlenschmidt in Main branch]
Matt.Kuhlenschmidt
#ROBOMERGE-SOURCE: CL 7761341 via CL 7761384 via CL 7769503
#ROBOMERGE-BOT: (v385-7708028)
[CL 7769590 by nick darnell in Main branch]
#ROBOMERGE-SOURCE: CL 7698510 via CL 7698666 via CL 7698687 via CL 7702972
#ROBOMERGE-BOT: (v384-7690951)
[CL 7703028 by matt kuhlenschmidt in Main branch]
#jira UE-78094
#ROBOMERGE-SOURCE: CL 7671379 via CL 7671728 via CL 7676976
#ROBOMERGE-BOT: (v381-7673386)
[CL 7677138 by matt kuhlenschmidt in Main branch]
Matt.Kuhlenschmidt
#ROBOMERGE-SOURCE: CL 7664638 via CL 7664644 via CL 7671882
#ROBOMERGE-BOT: (v376-7668820)
[CL 7672257 by nick darnell in Main branch]
Matt.Kuhlenschmidt
#ROBOMERGE-SOURCE: CL 7649814 via CL 7649819 via CL 7652751
#ROBOMERGE-BOT: (v372-7473910)
[CL 7652978 by nick darnell in Main branch]
Social panel was incorrectly marked as having volatlity inherited by a parent
#ROBOMERGE-SOURCE: CL 7627797 via CL 7627852 via CL 7627860 via CL 7635820
#ROBOMERGE-BOT: (v372-7473910)
[CL 7635855 by matt kuhlenschmidt in Main branch]
[FYI] Matt.Kuhlenschmidt
#ROBOMERGE-SOURCE: CL 7621559 via CL 7621561 via CL 7621562 via CL 7626302
#ROBOMERGE-BOT: (v372-7473910)
[CL 7626474 by nick darnell in Main branch]
[FYI] Matt.Kuhlenschmidt
#ROBOMERGE-SOURCE: CL 7621540 via CL 7621549 via CL 7621551 via CL 7626294
#ROBOMERGE-BOT: (v372-7473910)
[CL 7626466 by nick darnell in Main branch]