![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <SlateFontRenderer.h>
Bridging point between FreeType and the Slate font system. This class, via the instances you pass to its constructor, knows how to correctly render a Slate font.
| FSlateFontRenderer::FSlateFontRenderer | ( | const FFreeTypeLibrary * | InFTLibrary, |
| FFreeTypeCacheDirectory * | InFTCacheDirectory, | ||
| FCompositeFontCache * | InCompositeFontCache | ||
| ) |
| bool FSlateFontRenderer::CanLoadCodepoint | ( | const FFontData & | InFontData, |
| const UTF32CHAR | InCodepoint, | ||
| EFontFallback | MaxFallbackLevel | ||
| ) | const |
Whether or not the specified character, within the specified font, can be loaded with the specified maximum font fallback level
| InFontData | Information about the font to load |
| InCodepoint | The codepoint being loaded |
| MaxFallbackLevel | The maximum fallback level to try for the font |
| int16 FSlateFontRenderer::GetBaseline | ( | const FSlateFontInfo & | InFontInfo, |
| const float | InScale | ||
| ) | const |
| int8 FSlateFontRenderer::GetKerning | ( | const FFontData & | InFontData, |
| const float | InSize, | ||
| TCHAR | First, | ||
| TCHAR | Second, | ||
| const float | InScale | ||
| ) | const |
Calculates the kerning amount for a pair of characters
| InFontData | The font that used to draw the string with the first and second characters |
| InSize | The size of the font to draw |
| First | The first character in the pair |
| Second | The second character in the pair |
| InScale | The scale at which the font is being drawn |
| TSharedPtr< FFreeTypeKerningCache > FSlateFontRenderer::GetKerningCache | ( | const FFontData & | InFontData, |
| const uint32 | InFontRenderSize | ||
| ) | const |
Retrieves the kerning cache object used to retrieve kerning amounts between glyphs
| InFontData | The font that used to draw the string with the first and second characters |
| InFontRenderSize | The final size of the font to render (including scaling) |
| uint16 FSlateFontRenderer::GetMaxHeight | ( | const FSlateFontInfo & | InFontInfo, |
| const float | InScale | ||
| ) | const |
| bool FSlateFontRenderer::GetRenderData | ( | const FShapedGlyphEntry & | InShapedGlyph, |
| const FFontOutlineSettings & | InOutlineSettings, | ||
| FCharacterRenderData & | OutRenderData | ||
| ) | const |
Creates render data for a specific character
| InFontData | Raw font data to render the character with |
| InSize | The size of the font to draw |
| InOutlineSettings | Outline settings to apply when rendering the characer |
| Char | The character to render |
| OutRenderData | Will contain the created render data |
| InScale | The scale of the font |
| OutFallbackLevel | Outputs the fallback level of the font |
| void FSlateFontRenderer::GetStrikeMetrics | ( | const FSlateFontInfo & | InFontInfo, |
| const float | InScale, | ||
| int16 & | OutStrikeLinePos, | ||
| int16 & | OutStrikeLineThickness | ||
| ) | const |
Get the strike metrics used by any character in the default font
| OutStrikeLinePos | The offset from the baseline to the center of the strike bar |
| OutStrikeLineThickness | The thickness of the strike bar |
| void FSlateFontRenderer::GetUnderlineMetrics | ( | const FSlateFontInfo & | InFontInfo, |
| const float | InScale, | ||
| int16 & | OutUnderlinePos, | ||
| int16 & | OutUnderlineThickness | ||
| ) | const |
Get the underline metrics used by any character in the default font
| OutUnderlinePos | The offset from the baseline to the center of the underline bar |
| OutUnderlineThickness | The thickness of the underline bar |
| Whether | or not the font has kerning |