![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
Functions | |
| SLATE_API FVector2D | MeasureShapedText (const FShapedTextCacheRef &InShapedTextCache, const FCachedShapedTextKey &InRunKey, const FTextRange &InMeasureRange, const TCHAR *InText) |
| SLATE_API int32 | FindCharacterIndexAtOffset (const FShapedTextCacheRef &InShapedTextCache, const FCachedShapedTextKey &InRunKey, const FTextRange &InTextRange, const TCHAR *InText, const int32 InHorizontalOffset) |
| SLATE_API int8 | GetShapedGlyphKerning (const FShapedTextCacheRef &InShapedTextCache, const FCachedShapedTextKey &InRunKey, const int32 InGlyphIndex, const TCHAR *InText) |
| SLATE_API FShapedGlyphSequenceRef | GetShapedTextSubSequence (const FShapedTextCacheRef &InShapedTextCache, const FCachedShapedTextKey &InRunKey, const FTextRange &InTextRange, const TCHAR *InText, const TextBiDi::ETextDirection InTextDirection) |
Utility functions that can provide efficient caching of common operations
| int32 ShapedTextCacheUtil::FindCharacterIndexAtOffset | ( | const FShapedTextCacheRef & | InShapedTextCache, |
| const FCachedShapedTextKey & | InRunKey, | ||
| const FTextRange & | InTextRange, | ||
| const TCHAR * | InText, | ||
| const int32 | InHorizontalOffset | ||
| ) |
Find the character index at the specified position in pixels along the string horizontally
| InShapedTextCache | The shaped text cache to use |
| InRunKey | The key identifying the cached shaped text for the run |
| InTextRange | The range of text that should be extracted into its own shaped glyph sequence |
| InText | The text to shape if we can't find the shaped text in the cache. InTextRange may specify a sub-section of the entire text |
| InHorizontalOffset | The horizontal offset to get the character index for |
| int8 ShapedTextCacheUtil::GetShapedGlyphKerning | ( | const FShapedTextCacheRef & | InShapedTextCache, |
| const FCachedShapedTextKey & | InRunKey, | ||
| const int32 | InGlyphIndex, | ||
| const TCHAR * | InText | ||
| ) |
Get the kerning between two shaped glyphs
| InShapedTextCache | The shaped text cache to use |
| InRunKey | The key identifying the cached shaped text for the run |
| InGlyphIndex | The index of the glyph to get the kerning for (will get it between the given glyph, and it's next glyph) |
| InText | The text to shape if we can't find the shaped text in the cache. (InGlyphIndex, InGlyphIndex+1) will be the range used |
| FShapedGlyphSequenceRef ShapedTextCacheUtil::GetShapedTextSubSequence | ( | const FShapedTextCacheRef & | InShapedTextCache, |
| const FCachedShapedTextKey & | InRunKey, | ||
| const FTextRange & | InTextRange, | ||
| const TCHAR * | InText, | ||
| const TextBiDi::ETextDirection | InTextDirection | ||
| ) |
Extract a sub-section of a run of text into its own shaped glyph sequence
| InShapedTextCache | The shaped text cache to use |
| InRunKey | The key identifying the cached shaped text for the run |
| InTextRange | The range of text that should be extracted into its own shaped glyph sequence |
| InText | The text to shape if we can't find the shaped text in the cache. InTextRange may specify a sub-section of the entire text |
| InTextDirection | The text direction of all of the text to be shaped |
| FVector2D ShapedTextCacheUtil::MeasureShapedText | ( | const FShapedTextCacheRef & | InShapedTextCache, |
| const FCachedShapedTextKey & | InRunKey, | ||
| const FTextRange & | InMeasureRange, | ||
| const TCHAR * | InText | ||
| ) |
Measure a sub-section of a run of text
| InShapedTextCache | The shaped text cache to use |
| InRunKey | The key identifying the cached shaped text for the run |
| InMeasureRange | The range of text that should be measured |
| InText | The text to shape if we can't find the shaped text in the cache. InMeasureRange may specify a sub-section of the entire text |