reckfellENGINE

SystemFont

Resolves a font family installed in the operating system.

On this page
class SystemFontReckfellSharpInherits Font

SystemFont resolves FontNames in the user environment. A developer-installed family may be missing elsewhere; the result, metrics and fallback depend on the system.

For predictable appearance, distribute a licensed FontFile with the project. SystemFont suits system tools and deliberate OS-font selection. Checking one Windows family does not prove identical cross-platform results.

Working example.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

SystemFontConstructor
# SystemFont
C#
public SystemFont();

Properties17

AllowSystemFallbackProperty
# AllowSystemFallback
C#
public bool AllowSystemFallback { get; set; }

If set to true, system fonts can be automatically used as fallbacks.

AntialiasingProperty
# Antialiasing
C#
public TextServer.FontAntialiasing Antialiasing { get; set; }

Font anti-aliasing mode.

DisableEmbeddedBitmapsProperty
# DisableEmbeddedBitmaps
C#
public bool DisableEmbeddedBitmaps { get; set; }

If set to true, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property).

FontItalicProperty
# FontItalic
C#
public bool FontItalic { get; set; }

If set to true, italic or oblique font is preferred.

FontNamesProperty
# FontNames
C#
public string[] FontNames { get; set; }

Family names to resolve through the OS. Family availability and final metrics vary between machines. Use FontFile for consistent distributed appearance.

FontStretchProperty
# FontStretch
C#
public int FontStretch { get; set; }

Preferred font stretch amount, compared to a normal width. A percentage value between 50% and 200%.

FontWeightProperty
# FontWeight
C#
public int FontWeight { get; set; }

Preferred weight (boldness) of the font. A value in the 100...999 range, normal font weight is 400, bold font weight is 700.

ForceAutohinterProperty
# ForceAutohinter
C#
public bool ForceAutohinter { get; set; }

If set to true, auto-hinting is supported and preferred over font built-in hinting.

GenerateMipmapsProperty
# GenerateMipmaps
C#
public bool GenerateMipmaps { get; set; }

If set to true, generate mipmaps for the font textures.

HintingProperty
# Hinting
C#
public TextServer.Hinting Hinting { get; set; }

Font hinting mode.

KeepRoundingRemaindersProperty
# KeepRoundingRemainders
C#
public bool KeepRoundingRemainders { get; set; }

If set to true, when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled.

ModulateColorGlyphsProperty
# ModulateColorGlyphs
C#
public bool ModulateColorGlyphs { get; set; }

If set to true, color modulation is applied when drawing colored glyphs, otherwise it's applied to the monochrome glyphs only.

MsdfPixelRangeProperty
# MsdfPixelRange
C#
public int MsdfPixelRange { get; set; }

The width of the range around the shape between the minimum and maximum representable signed distance. If using font outlines, SystemFont.MsdfPixelRange must be set to at least twice the size of the largest font outline. The default SystemFont.MsdfPixelRange value of 16 allows outline sizes up to 8 to look correct.

MsdfSizeProperty
# MsdfSize
C#
public int MsdfSize { get; set; }

Source font size used to generate MSDF textures. Higher values allow for more precision, but are slower to render and require more memory. Only increase this value if you notice a visible lack of precision in glyph rendering.

MultichannelSignedDistanceFieldProperty
# MultichannelSignedDistanceField
C#
public bool MultichannelSignedDistanceField { get; set; }

If set to true, glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.

OversamplingProperty
# Oversampling
C#
public float Oversampling { get; set; }

If set to a positive value, overrides the oversampling factor of the viewport this font is used in. See Viewport.Oversampling. This value doesn't override the [code skip-lint]oversampling parameter of [code skip-lint]draw_* methods.

SubpixelPositioningProperty
# SubpixelPositioning
C#
public TextServer.SubpixelPositioning SubpixelPositioning { get; set; }

Font glyph subpixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use TextServer.SubpixelPositioning.Auto to automatically enable it based on the font size.

Methods33

GetAntialiasingTextServer.FontAntialiasing
# GetAntialiasing
C#
public TextServer.FontAntialiasing GetAntialiasing();
Returns TextServer.FontAntialiasing
GetDisableEmbeddedBitmapsbool
# GetDisableEmbeddedBitmaps
C#
public bool GetDisableEmbeddedBitmaps();
Returns bool
GetFontItalicbool
# GetFontItalic
C#
public bool GetFontItalic();
Returns bool
GetFontNamesstring[]
# GetFontNames
C#
public string[] GetFontNames();
Returns string[]
GetGenerateMipmapsbool
# GetGenerateMipmaps
C#
public bool GetGenerateMipmaps();
Returns bool
GetHintingTextServer.Hinting
# GetHinting
C#
public TextServer.Hinting GetHinting();
Returns TextServer.Hinting
GetKeepRoundingRemaindersbool
# GetKeepRoundingRemainders
C#
public bool GetKeepRoundingRemainders();
Returns bool
GetMsdfPixelRangeint
# GetMsdfPixelRange
C#
public int GetMsdfPixelRange();
Returns int
GetMsdfSizeint
# GetMsdfSize
C#
public int GetMsdfSize();
Returns int
GetOversamplingfloat
# GetOversampling
C#
public float GetOversampling();
Returns float
GetSubpixelPositioningTextServer.SubpixelPositioning
# GetSubpixelPositioning
C#
public TextServer.SubpixelPositioning GetSubpixelPositioning();
Returns TextServer.SubpixelPositioning
IsAllowSystemFallbackbool
# IsAllowSystemFallback
C#
public bool IsAllowSystemFallback();
Returns bool
IsForceAutohinterbool
# IsForceAutohinter
C#
public bool IsForceAutohinter();
Returns bool
IsModulateColorGlyphsbool
# IsModulateColorGlyphs
C#
public bool IsModulateColorGlyphs();
Returns bool
IsMultichannelSignedDistanceFieldbool
# IsMultichannelSignedDistanceField
C#
public bool IsMultichannelSignedDistanceField();
Returns bool
SetAllowSystemFallbackvoid
# SetAllowSystemFallback
C#
public void SetAllowSystemFallback(bool allowSystemFallback);
Parameters
NameTypeDefault
allowSystemFallbackbool—
SetAntialiasingvoid
# SetAntialiasing
C#
public void SetAntialiasing(TextServer.FontAntialiasing antialiasing);
Parameters
NameTypeDefault
antialiasingTextServer.FontAntialiasing—
SetDisableEmbeddedBitmapsvoid
# SetDisableEmbeddedBitmaps
C#
public void SetDisableEmbeddedBitmaps(bool disableEmbeddedBitmaps);
Parameters
NameTypeDefault
disableEmbeddedBitmapsbool—
SetFontItalicvoid
# SetFontItalic
C#
public void SetFontItalic(bool italic);
Parameters
NameTypeDefault
italicbool—
SetFontNames2 overloads
# SetFontNames · 1/2
C#
public void SetFontNames(ReadOnlySpan<string> names);
Parameters
NameTypeDefault
namesReadOnlySpan<string>—
# SetFontNames · 2/2
C#
public void SetFontNames(string[] names);
Parameters
NameTypeDefault
namesstring[]—
SetFontStretchvoid
# SetFontStretch
C#
public void SetFontStretch(int stretch);
Parameters
NameTypeDefault
stretchint—
SetFontWeightvoid
# SetFontWeight
C#
public void SetFontWeight(int weight);
Parameters
NameTypeDefault
weightint—
SetForceAutohintervoid
# SetForceAutohinter
C#
public void SetForceAutohinter(bool forceAutohinter);
Parameters
NameTypeDefault
forceAutohinterbool—
SetGenerateMipmapsvoid
# SetGenerateMipmaps
C#
public void SetGenerateMipmaps(bool generateMipmaps);
Parameters
NameTypeDefault
generateMipmapsbool—
SetHintingvoid
# SetHinting
C#
public void SetHinting(TextServer.Hinting hinting);
Parameters
NameTypeDefault
hintingTextServer.Hinting—
SetKeepRoundingRemaindersvoid
# SetKeepRoundingRemainders
C#
public void SetKeepRoundingRemainders(bool keepRoundingRemainders);
Parameters
NameTypeDefault
keepRoundingRemaindersbool—
SetModulateColorGlyphsvoid
# SetModulateColorGlyphs
C#
public void SetModulateColorGlyphs(bool modulate);
Parameters
NameTypeDefault
modulatebool—
SetMsdfPixelRangevoid
# SetMsdfPixelRange
C#
public void SetMsdfPixelRange(int msdfPixelRange);
Parameters
NameTypeDefault
msdfPixelRangeint—
SetMsdfSizevoid
# SetMsdfSize
C#
public void SetMsdfSize(int msdfSize);
Parameters
NameTypeDefault
msdfSizeint—
SetMultichannelSignedDistanceFieldvoid
# SetMultichannelSignedDistanceField
C#
public void SetMultichannelSignedDistanceField(bool msdf);
Parameters
NameTypeDefault
msdfbool—
SetOversamplingvoid
# SetOversampling
C#
public void SetOversampling(float oversampling);
Parameters
NameTypeDefault
oversamplingfloat—
SetSubpixelPositioningvoid
# SetSubpixelPositioning
C#
public void SetSubpixelPositioning(TextServer.SubpixelPositioning subpixelPositioning);
Parameters
NameTypeDefault
subpixelPositioningTextServer.SubpixelPositioning—
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.