Class CffStandardStrings
The Compact Font Format's predefined data (Adobe Technical Note #5176, appendices A and B): the 391 standard strings that string ids (SIDs) below 391 name, and the Standard and Expert encodings as glyph names by code.
public static class CffStandardStrings
- Inheritance
-
CffStandardStrings
- Inherited Members
Examples
// Converting a Type 1 font to CFF: standard glyph names take their standard SIDs, others go in the String INDEX.
int sid = CffStandardStrings.TryGetSid("Aacute", out int standard) ? standard : -1;
string atCode65 = CffStandardStrings.StandardEncoding[65]; // "A"
Fields
Count
The number of standard strings; SIDs from this one on index a font's own String INDEX.
public const int Count = 391
Field Value
Properties
ExpertEncoding
Gets the 256 glyph names of the Expert Encoding by code, ".notdef" for codes it leaves unused.
public static IReadOnlyList<string> ExpertEncoding { get; }
Property Value
StandardEncoding
Gets the 256 glyph names of the Standard Encoding by code, ".notdef" for codes it leaves unused.
public static IReadOnlyList<string> StandardEncoding { get; }
Property Value
Methods
Get(int)
Gets a standard string by its SID.
public static string Get(int sid)
Parameters
sidintThe SID, 0 to 390.
Returns
- string
The string, such as "space" for 1.
Exceptions
- ArgumentOutOfRangeException
sidis negative or 391 or more.
TryGetSid(string, out int)
Finds the SID of a standard string.
public static bool TryGetSid(string name, out int sid)
Parameters
namestringThe string, such as "Aacute"; compared ordinally.
sidintThe SID, or -1 when the string is not a standard one.
Returns
Exceptions
- ArgumentNullException
nameis null.