Class Type1MetricFont

Type1MetricFont class

Type1 metric font implementation. This type1 font is created using metrics only. Glyphs retrieval functions and some other that require real font are not allowed, not allowed functions throw exception Type1NotSupportedException. Other properties (FontName, Weight, Metrics and Encoding) are used from metrics file.

public class Type1MetricFont : Type1Font

Properties

NameDescription
override Encoding { get; }Encoding is defined in metrics file. StandardAdobeEncoding: the encoding is populated automatically
override FontDefinition { get; }Gets Font definition.
override FontFamily { get; }Gets Font family.
override FontName { get; }Gets Font name.
override FontNames { get; }Gets Font names.
FontSaver { get; }Gets Font save functionality.
override FontStyle { get; }Gets Font style. This is a value computed and represented in generalized type.
override FontType { get; }Gets Font type. Returns FontType.Type1 value.
GlyphAccessor { get; }Font glyph accessor. Retrieves glyphs and glyph identifiers.
override GlyphIdType { get; }Glyph id type specification.
override Metrics { get; }Gets Font metrics.
override NumGlyphs { get; }Gets number of glyphs in the Font.
override PostscriptNames { get; }Gets postscript Font names.
override Style { get; }Gets Font style.

Methods

NameDescription
override Convert(FontType)Converts the Font into another format.
override GetAllGlyphIds()Returns all glyph ids, available in the Font. Not supported for Type1MetricFont type.
override GetGlyphById(GlyphId)Returns glyph by glyph id. Not supported for Type1MetricFont type.
override GetGlyphById(string)Returns glyph by glyph id. Not supported for Type1MetricFont type.
GetGlyphById(uint)Returns glyph by glyph id.
virtual GetGlyphsForText(string)Gets glyphs representation for text.
virtual Save(Stream)Saves the Font into original format.
virtual Save(string)Saves the Font into original format.
SaveToFormat(Stream, FontSavingFormats)Saves the Font into format specified.

Examples

Note: If metrics file defines Encoding as “FontSpecific”, user should provide the specific encoding with following way:

string[] zapfDingbatsEncoding = new string[256] {null, null, ... , "space", "a1", ...};
FontEnvironment.Current.FontSpecificEncodings.RegisterEncoding("ZapfDingbats", zapfDingbatsEncoding);

System::ArrayPtr<System::String> zapfDingbatsEncoding = System::MakeArray<System::String>({nullptr, nullptr, …, u"space", u"a1", …}); FontEnvironment::get_Current()->get_FontSpecificEncodings()->RegisterEncoding(u"ZapfDingbats", zapfDingbatsEncoding);

See Also