![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <PreprocessedFontGeometry.h>
Public Member Functions | |
| void | AddGlyph (const int32 GlyphIndex, const FPreprocessedGlyphGeometryView &GlyphView) |
| FPreprocessedGlyphGeometryView | ViewGlyph (const int32 GlyphIndex) const |
| void | SetGlobalWindingReversal (bool InGlobalWindingReversal) |
| SIZE_T | GetAllocatedSize () const |
| SIZE_T | GetDataSize () const |
Friends | |
| FArchive & | operator<< (FArchive &Ar, FPreprocessedFontGeometry &FontGeometry) |
| FArchive & | operator<< (FArchive &Ar, FGlyphHeader &GlyphHeader) |
This object represents additional per-glyph font geometry data, which override the base font file data for "unnormalized" glyphs. The original font data are still required and this object serves as their extension. If the font file data change for any reason, this object becomes invalid.
A glyph's geometry is normalized when:
Normalized geometry is required for generating signed distance fields (directly from vector geometry).
For glyphs that already satisfy both conditions (are normalized), no data is stored in this object. For glyphs that only satisfy the first condition and contain no false edge segments (ones that do not lie at the glyph's boundary), only a boolean array will be stored, which dictates which of its contours need to be reversed. For other unnormalized glyphs, the entire shape geometry is stored.
| void UE::Slate::FPreprocessedFontGeometry::AddGlyph | ( | const int32 | GlyphIndex, |
| const FPreprocessedGlyphGeometryView & | GlyphView | ||
| ) |
Adds a single preprocessed glyph, identified by the numeric glyph index.
| SIZE_T UE::Slate::FPreprocessedFontGeometry::GetAllocatedSize | ( | ) | const |
Returns the object's total allocated size
| SIZE_T UE::Slate::FPreprocessedFontGeometry::GetDataSize | ( | ) | const |
Returns the object's actual data size
|
inline |
Calling this will cause all glyphs not added to be reported with the FLAG_REVERSE_WINDINGS flag and those added with that flag as clean
| FPreprocessedGlyphGeometryView UE::Slate::FPreprocessedFontGeometry::ViewGlyph | ( | const int32 | GlyphIndex | ) | const |
Returns the view of the glyph identified by the numeric glyph index. The view is only valid until this FPreprocessedFontGeometry object is modified. If the glyph is not present in the preprocessed data, a valid object will be returned, indicating no preprocessing is required.
|
friend |
Serializes the font geometry object to/from an archive