Class NullEncoding
A no-op encoding that always returns NotDefId.
Used as a placeholder before a real CMap table is parsed.
Assembly: DRIT.Drawing.dll
Syntax
public sealed class NullEncoding : IFontEncoding
Fields
Instance
Shared singleton instance.
Declaration
public static readonly NullEncoding Instance
Field Value
Methods
DecodeToGid(char)
Convenience overload that accepts a char (UTF-16 BMP code unit).
For code points outside the BMP, use DecodeToGid(uint) directly.
Declaration
public GlyphId? DecodeToGid(char ch)
Parameters
| Type |
Name |
Description |
| char |
ch |
|
Returns
DecodeToGid(uint)
Resolves the Unicode codePoint to a glyph identifier.
Returns NotDefId when the font has no glyph
for the given code point, or null when the encoding map is absent.
Declaration
public GlyphId? DecodeToGid(uint codePoint)
Parameters
| Type |
Name |
Description |
| uint |
codePoint |
|
Returns
HasGlyph(uint)
Returns true when the font provides a real glyph (not .notdef)
for codePoint.
Declaration
public bool HasGlyph(uint codePoint)
Parameters
| Type |
Name |
Description |
| uint |
codePoint |
|
Returns
TryGetGlyph(uint, out uint)
Returns true when the font provides a real glyph (not .notdef)
for codePoint. Used by the fallback resolver to decide
whether to substitute a fallback font.
Declaration
public bool TryGetGlyph(uint codePoint, out uint glyphId)
Parameters
| Type |
Name |
Description |
| uint |
codePoint |
The Unicode code point to test.
|
| uint |
glyphId |
When this method returns true, the resolved glyph identifier; otherwise 0.
|
Returns
Implements