UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Slate::FPreprocessedFontGeometry Class Reference

#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

FArchiveoperator<< (FArchive &Ar, FPreprocessedFontGeometry &FontGeometry)
 
FArchiveoperator<< (FArchive &Ar, FGlyphHeader &GlyphHeader)
 

Detailed Description

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:

  • it contains no self-intersections, that is, no part of its edge intersects another part
  • and for each edge segment, looking from its initial point towards its next control point, the filled portion of the glyph is always on the right side of the edge and empty portion is on the left side.

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.

Member Function Documentation

◆ AddGlyph()

void UE::Slate::FPreprocessedFontGeometry::AddGlyph ( const int32  GlyphIndex,
const FPreprocessedGlyphGeometryView GlyphView 
)

Adds a single preprocessed glyph, identified by the numeric glyph index.

◆ GetAllocatedSize()

SIZE_T UE::Slate::FPreprocessedFontGeometry::GetAllocatedSize ( ) const

Returns the object's total allocated size

◆ GetDataSize()

SIZE_T UE::Slate::FPreprocessedFontGeometry::GetDataSize ( ) const

Returns the object's actual data size

◆ SetGlobalWindingReversal()

void UE::Slate::FPreprocessedFontGeometry::SetGlobalWindingReversal ( bool  InGlobalWindingReversal)
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

◆ ViewGlyph()

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.

Friends And Related Symbol Documentation

◆ operator<< [1/2]

FArchive & operator<< ( FArchive Ar,
FGlyphHeader &  GlyphHeader 
)
friend

◆ operator<< [2/2]

FArchive & operator<< ( FArchive Ar,
FPreprocessedFontGeometry FontGeometry 
)
friend

Serializes the font geometry object to/from an archive


The documentation for this class was generated from the following files: