public class Type1MetricFont extends Type1Font
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.
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);
| Modifier and Type | Method and Description |
|---|---|
GlyphId[] |
getAllGlyphIds()
Returns all glyph Ids, available in the Font.
|
IFontEncoding |
getEncoding()
Encoding is defined in metrics file.
|
String |
getFontFamily()
Gets Font family.
|
String |
getFontName()
Gets Font name.
|
int |
getFontStyle()
Gets Font style.
|
Glyph |
getGlyphById(GlyphId id)
Returns glyph by glyph Id.
|
Glyph |
getGlyphById(String id)
Returns glyph by glyph Id.
|
int |
getNumGlyphs()
Gets number of glyphs in the Font.
|
String |
getStyle()
Gets Font style.
|
convert, getFontDefinition, getFontNames, getFontType, getGlyphById, getGlyphIdType, getMetrics, getPostscriptNames, setFontFamily, setFontName, setStylegetFontSaver, getGlyphAccessor, getGlyphsForText, open, open, open, open, save, save, saveToFormatpublic IFontEncoding getEncoding()
Encoding is defined in metrics file. StandardAdobeEncoding: the encoding is populated automatically
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);
getEncoding in interface IFontgetEncoding in class Type1Fontpublic String getFontFamily()
Gets Font family.
getFontFamily in interface IFontgetFontFamily in class Type1Fontpublic String getFontName()
Gets Font name.
getFontName in interface IFontgetFontName in class Type1Fontpublic String getStyle()
Gets Font style.
public int getFontStyle()
Gets Font style. This is a value computed and represented in generalized type.
getFontStyle in interface IFontgetFontStyle in class Type1Fontpublic int getNumGlyphs()
Gets number of glyphs in the Font.
getNumGlyphs in interface IFontgetNumGlyphs in class Type1Fontpublic Glyph getGlyphById(String id)
Returns glyph by glyph Id. Not supported for (@code Type1MetricFont} type.
getGlyphById in class Type1Fontid - Glyph identifier.public Glyph getGlyphById(GlyphId id)
Returns glyph by glyph Id. Not supported for (@code Type1MetricFont} type.
getGlyphById in interface IGlyphAccessorgetGlyphById in class Type1Fontid - Glyph identifier.public GlyphId[] getAllGlyphIds()
Returns all glyph Ids, available in the Font.
Not supported for Type1MetricFont type.
getAllGlyphIds in interface IGlyphAccessorgetAllGlyphIds in class Type1FontCopyright © 2025 Aspose. All Rights Reserved.