#include <FontMeasure.h>
|
| SLATECORE_API UE::Slate::FDeprecateVector2DResult | Measure (FStringView Text, const FSlateFontInfo &InFontInfo, float FontScale=1.0f) const |
| |
| SLATECORE_API UE::Slate::FDeprecateVector2DResult | Measure (const FText &Text, const FSlateFontInfo &InFontInfo, float FontScale=1.0f) const |
| |
| SLATECORE_API UE::Slate::FDeprecateVector2DResult | Measure (FStringView Text, int32 StartIndex, int32 EndIndex, const FSlateFontInfo &InFontInfo, bool IncludeKerningWithPrecedingChar=true, float FontScale=1.0f) const |
| |
| SLATECORE_API int32 | FindLastWholeCharacterIndexBeforeOffset (FStringView Text, const FSlateFontInfo &InFontInfo, const int32 HorizontalOffset, float FontScale=1.0f) const |
| |
| SLATECORE_API int32 | FindLastWholeCharacterIndexBeforeOffset (const FText &Text, const FSlateFontInfo &InFontInfo, const int32 HorizontalOffset, float FontScale=1.0f) const |
| |
| SLATECORE_API int32 | FindLastWholeCharacterIndexBeforeOffset (FStringView Text, int32 StartIndex, int32 EndIndex, const FSlateFontInfo &InFontInfo, const int32 HorizontalOffset, bool IncludeKerningWithPrecedingChar=true, float FontScale=1.0f) const |
| |
| SLATECORE_API int32 | FindFirstWholeCharacterIndexAfterOffset (FStringView Text, const FSlateFontInfo &InFontInfo, const int32 HorizontalOffset, float FontScale=1.0f) const |
| |
| SLATECORE_API int32 | FindFirstWholeCharacterIndexAfterOffset (const FText &Text, const FSlateFontInfo &InFontInfo, const int32 HorizontalOffset, float FontScale=1.0f) const |
| |
| SLATECORE_API int32 | FindFirstWholeCharacterIndexAfterOffset (FStringView Text, int32 StartIndex, int32 EndIndex, const FSlateFontInfo &InFontInfo, const int32 HorizontalOffset, bool IncludeKerningWithPrecedingChar=true, float FontScale=1.0f) const |
| |
| SLATECORE_API int32 | FindCharacterIndexAtOffset (FStringView Text, const FSlateFontInfo &InFontInfo, const int32 HorizontalOffset, float FontScale=1.0f) const |
| |
| SLATECORE_API int32 | FindCharacterIndexAtOffset (const FText &Text, const FSlateFontInfo &InFontInfo, const int32 HorizontalOffset, float FontScale=1.0f) const |
| |
| SLATECORE_API int32 | FindCharacterIndexAtOffset (FStringView Text, int32 StartIndex, int32 EndIndex, const FSlateFontInfo &InFontInfo, const int32 HorizontalOffset, bool IncludeKerningWithPrecedingChar=true, float FontScale=1.0f) const |
| |
| SLATECORE_API uint16 | GetMaxCharacterHeight (const FSlateFontInfo &InFontInfo, float FontScale=1.0f) const |
| |
| SLATECORE_API int8 | GetKerning (const FSlateFontInfo &InFontInfo, float FontScale, TCHAR PreviousCharacter, TCHAR CurrentCharacter) const |
| |
| SLATECORE_API int16 | GetBaseline (const FSlateFontInfo &InFontInfo, float FontScale=1.0f) const |
| |
| SLATECORE_API void | FlushCache () |
| |
◆ Create()
◆ FindCharacterIndexAtOffset() [1/3]
Finds the character index at the specified position in pixels along the text horizontally
- Parameters
-
| Text | The text to measure |
| FontName | The name of the font the text is drawn with |
| FontSize | The size of the font |
| HorizontalOffset | Offset horizontally into the text, in pixels |
| FontScale | The scale to apply to the font |
- Returns
- The index of the character closest to the specified horizontal offset
◆ FindCharacterIndexAtOffset() [2/3]
Finds the character index at the specified position in pixels along the string horizontally
- Parameters
-
| Text | The string to measure |
| FontName | The name of the font the string is drawn with |
| FontSize | The size of the font |
| HorizontalOffset | Offset horizontally into the string, in pixels |
| FontScale | The scale to apply to the font |
- Returns
- The index of the character closest to the specified horizontal offset
◆ FindCharacterIndexAtOffset() [3/3]
Finds the character index at the specified position in pixels along the string horizontally
- Parameters
-
| Text | The string to measure |
| StartIndex | The inclusive index to start measuring the string at |
| EndIndex | The inclusive index to stop measuring the string at |
| FontName | The name of the font the string is drawn with |
| FontSize | The size of the font |
| HorizontalOffset | Offset horizontally into the string, in pixels |
| FontScale | The scale to apply to the font |
- Returns
- The index of the character closest to the specified horizontal offset
◆ FindFirstWholeCharacterIndexAfterOffset() [1/3]
| int32 FSlateFontMeasure::FindFirstWholeCharacterIndexAfterOffset |
( |
const FText & |
Text, |
|
|
const FSlateFontInfo & |
InFontInfo, |
|
|
const int32 |
HorizontalOffset, |
|
|
float |
FontScale = 1.0f |
|
) |
| const |
Finds the first whole character index after the specified position in pixels along the string horizontally
- Parameters
-
| String | The string to measure |
| InFontInfo | Information about the font used to draw the string |
| HorizontalOffset | Offset horizontally into the string, in pixels |
- Returns
- The index of the first whole character after the specified horizontal offset
◆ FindFirstWholeCharacterIndexAfterOffset() [2/3]
Finds the first whole character index after the specified position in pixels along the string horizontally
- Parameters
-
| String | The string to measure |
| InFontInfo | Information about the font used to draw the string |
| HorizontalOffset | Offset horizontally into the string, in pixels |
- Returns
- The index of the first whole character after the specified horizontal offset
◆ FindFirstWholeCharacterIndexAfterOffset() [3/3]
Finds the first whole character index after the specified position in pixels along the string horizontally
- Parameters
-
| String | The string to measure |
| StartIndex | The inclusive index to start measuring the string at |
| EndIndex | The inclusive index to stop measuring the string at |
| InFontInfo | Information about the font used to draw the string |
| HorizontalOffset | Offset horizontally into the string, in pixels |
- Returns
- The index of the first whole character after the specified horizontal offset
◆ FindLastWholeCharacterIndexBeforeOffset() [1/3]
| int32 FSlateFontMeasure::FindLastWholeCharacterIndexBeforeOffset |
( |
const FText & |
Text, |
|
|
const FSlateFontInfo & |
InFontInfo, |
|
|
const int32 |
HorizontalOffset, |
|
|
float |
FontScale = 1.0f |
|
) |
| const |
Finds the last whole character index before the specified position in pixels along the string horizontally
- Parameters
-
| String | The string to measure |
| InFontInfo | Information about the font used to draw the string |
| HorizontalOffset | Offset horizontally into the string, in pixels |
- Returns
- The index of the last whole character before the specified horizontal offset
◆ FindLastWholeCharacterIndexBeforeOffset() [2/3]
Finds the last whole character index before the specified position in pixels along the string horizontally
- Parameters
-
| String | The string to measure |
| InFontInfo | Information about the font used to draw the string |
| HorizontalOffset | Offset horizontally into the string, in pixels |
- Returns
- The index of the last whole character before the specified horizontal offset
◆ FindLastWholeCharacterIndexBeforeOffset() [3/3]
Finds the last whole character index before the specified position in pixels along the text horizontally
- Parameters
-
| Text | The text to measure |
| StartIndex | The inclusive index to start measuring the string at |
| EndIndex | The inclusive index to stop measuring the string at |
| InFontInfo | Information about the font used to draw the string |
| HorizontalOffset | Offset horizontally into the string, in pixels |
- Returns
- The index of the last whole character before the specified horizontal offset
◆ FlushCache()
| void FSlateFontMeasure::FlushCache |
( |
| ) |
|
◆ GetBaseline()
Returns the baseline for the specified font.
- Parameters
-
| InFontInfo | A descriptor of the font to get character size for |
| FontScale | The scale to apply to the font |
- Returns
- The offset from the bottom of the max character height to the baseline.
◆ GetKerning()
Returns the kerning value for the specified pair of characters.
- Parameters
-
| InFontInfo | A descriptor of the font to get kerning for |
| FontScale | The scale to apply to the font |
| PreviousCharacter | The character preceding the current character that you want to measure kerning for |
| CurrentCharacter | The current character to you to measure kerning for when precede by the specified PreviousCharacter |
- Returns
- the kerning value used between the two specified characters
◆ GetMaxCharacterHeight()
Returns the height of the largest character in the font.
- Parameters
-
| InFontInfo | A descriptor of the font to get character size for |
| FontScale | The scale to apply to the font |
- Returns
- The largest character height
◆ Measure() [1/3]
Measures the width and height of a passed in text. The height is the maximum height of the largest character in the font/size pair
- Parameters
-
| Text | The text to measure |
| InFontInfo | Information about the font that the text is drawn with |
| FontScale | The scale to apply to the font |
- Returns
- The width and height of the text.
◆ Measure() [2/3]
Measures the width and height of a passed in string. The height is the maximum height of the largest character in the font/size pair
- Parameters
-
| Text | The string to measure |
| InFontInfo | Information about the font that the string is drawn with |
| FontScale | The scale to apply to the font |
- Returns
- The width and height of the string.
◆ Measure() [3/3]
Measures the width and height of a passed in string. The height is the maximum height of the largest character in the font/size pair
- Parameters
-
| Text | The string to measure |
| StartIndex | The inclusive index to start measuring the string at |
| EndIndex | The inclusive index to stop measuring the string at |
| InFontInfo | Information about the font that the string is drawn with |
| FontScale | The scale to apply to the font |
- Returns
- The width and height of the string.
The documentation for this class was generated from the following files: