Type1MetricFont
Inheritance: java.lang.Object, com.aspose.font.Font, com.aspose.font.Type1Font
public class Type1MetricFont extends Type1Font
Type1-Metrik-Schriftart-Implementierung. Diese Type1-Schriftart wird ausschließlich anhand von Metriken erstellt. Glyph‑Abruffunktionen und einige andere, die eine echte Schriftart benötigen, sind nicht erlaubt; nicht erlaubte Funktionen werfen die Ausnahme Type1NotSupportedException. Andere Eigenschaften (FontName, Weight, Metrics und Encoding) werden aus der Metrikdatei übernommen.
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);
Methoden
| Methode | Beschreibung |
|---|---|
| convert(FontType fontType) | Konvertiert die Font in ein anderes Format. |
| equals(Object arg0) | |
| getAllGlyphIds() | Gibt alle Glyph‑IDs zurück, die in der Font verfügbar sind. |
| getClass() | |
| getEncoding() | Kodierung ist in der Metrikdatei definiert. |
| getFontDefinition() | Liefert Font‑Definition. |
| getFontFamily() | Liefert Font‑Familie. |
| getFontName() | Ermittelt den Font‑Namen. |
| getFontNames() | Liefert Font‑Namen. |
| getFontSaver() | Liefert Font‑Speicherfunktionalität. |
| getFontStyle() | Liefert Font‑Stil. |
| getFontType() | Liefert Font‑Typ. |
| getGlyphAccessor() | Font‑Glyph‑Zugriff. |
| getGlyphById(GlyphId id) | Gibt das Glyph anhand der Glyph‑ID zurück. |
| getGlyphById(String id) | Gibt das Glyph anhand der Glyph‑ID zurück. |
| getGlyphById(long id) | Gibt Glyph nach Glyph-ID zurück. |
| getGlyphIdType() | Glyph id Typenspezifikation. |
| getGlyphsForText(String text) | Liest Glyphenrepräsentation für Text. |
| getMetrics() | Liefert Font‑Metriken. |
| getNumGlyphs() | Ermittelt die Anzahl der Glyphen im Font. |
| getPostscriptNames() | Liest Postscript-Schriftnamen. |
| getStyle() | Liefert Font‑Stil. |
| hashCode() | |
| notify() | |
| notifyAll() | |
| open(FontDefinition fontDefinition) | Öffnet einen Font mithilfe eines FontDefinition-Objekts. |
| open(FontType fontType, byte[] fontData) | Öffnet einen Font mithilfe des Font-Typs und eines Byte-Arrays mit Font-Daten. |
| open(FontType fontType, StreamSource fontStreamSource) | Öffnet einen Font mithilfe des Font-Typs und einer Stream-Quelle. |
| open(FontType fontType, String fileName) | Öffnet einen Font mithilfe des Font-Typs und des Font-Dateinamens. |
| save(OutputStream stream) | Speichert den Font im Originalformat. |
| save(String fileName) | Speichert den Font im Originalformat. |
| saveToFormat(OutputStream stream, FontSavingFormats outFormat) | Speichert den Font im angegebenen Format. |
| setFontFamily(String value) | Der Setter für die Schriftfamilie ist noch nicht implementiert. |
| setFontName(String value) | Der Setter für den Schriftartnamen ist noch nicht implementiert. |
| setStyle(String value) | Der Setter für den Stil ist noch nicht implementiert. |
| toString() | |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
convert(FontType fontType)
public Font convert(FontType fontType)
Konvertiert die Font in ein anderes Format.
Note: TTF Font type is now supported only.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| fontType | FontType | Font-Formattyp, in den konvertiert werden soll. |
Returns: Font - Font converted into new format.
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
getAllGlyphIds()
public GlyphId[] getAllGlyphIds()
Gibt alle Glyph‑IDs zurück, die in der Font verfügbar sind. Nicht unterstützt für den Typ Type1MetricFont.
Returns: com.aspose.font.GlyphId[] - Alle Glyph‑Bezeichner, die in der Font verfügbar sind.
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getEncoding()
public IFontEncoding getEncoding()
Kodierung ist in der Metrikdatei definiert. StandardAdobeEncoding: Die Kodierung wird automatisch gefüllt.
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);
Returns: IFontEncoding
getFontDefinition()
public FontDefinition getFontDefinition()
Liefert Font‑Definition.
Returns: FontDefinition - Font definition.
getFontFamily()
public String getFontFamily()
Liefert Font‑Familie.
Returns: java.lang.String - Font‑Familie.
getFontName()
public String getFontName()
Ermittelt den Font‑Namen.
Returns: java.lang.String - Schriftartname.
getFontNames()
public MultiLanguageString getFontNames()
Liefert Font‑Namen.
Returns: MultiLanguageString - Font names.
getFontSaver()
public IFontSaver getFontSaver()
Liefert Font‑Speicherfunktionalität.
Returns: IFontSaver - Font save functionality.
getFontStyle()
public int getFontStyle()
Ermittelt den Font-Stil. Dies ist ein Wert, der berechnet und in einem generalisierten Typ dargestellt wird.
Returns: int - Ermittelt den Font‑Stil. In der Regel eine Kombination von Konstanten‑Flag‑Werten der FontStyle‑Klasse oder 0.
getFontType()
public FontType getFontType()
Ermittelt den Font-Typ. Gibt den Wert FontType.Type1 zurück.
Returns: FontType - Font type.
getGlyphAccessor()
public IGlyphAccessor getGlyphAccessor()
Schriftzeichen-Glyph-Zugriff. Ruft Glyphs und Glyph-Identifikatoren ab.
Returns: IGlyphAccessor - Font glyph accessor.
getGlyphById(GlyphId id)
public Glyph getGlyphById(GlyphId id)
Gibt das Glyph anhand der Glyph‑ID zurück. Nicht unterstützt für den Typ (@code Type1MetricFont}.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| id | GlyphId | Glyph‑Bezeichner. |
Returns: Glyph - Glyph.
getGlyphById(String id)
public Glyph getGlyphById(String id)
Gibt das Glyph anhand der Glyph‑ID zurück. Nicht unterstützt für den Typ (@code Type1MetricFont}.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| id | java.lang.String | Glyph‑Bezeichner. |
Returns: Glyph - Glyph.
getGlyphById(long id)
public Glyph getGlyphById(long id)
Gibt Glyph nach Glyph-ID zurück.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| id | long | Glyph-ID. |
Returns: Glyph - Glyph.
getGlyphIdType()
public GlyphIdType getGlyphIdType()
Glyph id Typenspezifikation.
Returns: GlyphIdType
getGlyphsForText(String text)
public GlyphId[] getGlyphsForText(String text)
Liest Glyphenrepräsentation für Text.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| text | java.lang.String | Eingabetext. |
Returns: com.aspose.font.GlyphId[] – GlyphId-Array.
getMetrics()
public IFontMetrics getMetrics()
Liefert Font‑Metriken.
Returns: IFontMetrics - Font metrics.
getNumGlyphs()
public int getNumGlyphs()
Ermittelt die Anzahl der Glyphen im Font.
Returns: int – Anzahl der Glyphs in der Schrift.
getPostscriptNames()
public MultiLanguageString getPostscriptNames()
Liest Postscript-Schriftnamen.
Returns: MultiLanguageString - Postscript Font names
getStyle()
public String getStyle()
Liefert Font‑Stil.
Returns: java.lang.String – Schriftstil.
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
open(FontDefinition fontDefinition)
public static Font open(FontDefinition fontDefinition)
Öffnet einen Font mithilfe eines FontDefinition-Objekts.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| fontDefinition | FontDefinition | Schriftdefinitions-Objekt. |
Returns: Font - Font loaded.
open(FontType fontType, byte[] fontData)
public static Font open(FontType fontType, byte[] fontData)
Öffnet einen Font mithilfe des Font-Typs und eines Byte-Arrays mit Font-Daten.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| fontType | FontType | Schrifttyp. |
| fontData | byte[] | Byte-Array, aus dem die Schrift geladen wird. |
Returns: Font - Font loaded.
open(FontType fontType, StreamSource fontStreamSource)
public static Font open(FontType fontType, StreamSource fontStreamSource)
Öffnet einen Font mithilfe des Font-Typs und einer Stream-Quelle.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| fontType | FontType | Schrifttyp. |
| fontStreamSource | StreamSource | Stream-Quelle für die Schrift. |
Returns: Font - Font loaded.
open(FontType fontType, String fileName)
public static Font open(FontType fontType, String fileName)
Öffnet einen Font mithilfe des Font-Typs und des Font-Dateinamens.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| fontType | FontType | Schrifttyp. |
| fileName | java.lang.String | Schriftdateiname. |
Returns: Font - Font loaded.
save(OutputStream stream)
public void save(OutputStream stream)
Speichert den Font im Originalformat.
Note: following Font types are supported for saving: New TTF fonts; TTF Font subsets; CFF Font subsets; Type1 Font subsets.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| stream | java.io.OutputStream | Stream zum Speichern der Schrift. |
save(String fileName)
public void save(String fileName)
Speichert den Font im Originalformat.
Note: following Font types are supported for saving: New TTF fonts; TTF Font subsets; CFF Font subsets; Type1 Font subsets.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| fileName | java.lang.String | Datei zum Speichern der Schrift. |
saveToFormat(OutputStream stream, FontSavingFormats outFormat)
public void saveToFormat(OutputStream stream, FontSavingFormats outFormat)
Speichert den Font im angegebenen Format.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| stream | java.io.OutputStream | Stream zum Speichern der Schrift |
| outFormat | FontSavingFormats | gewünschtes Format |
setFontFamily(String value)
public void setFontFamily(String value)
Der Setter für die Schriftfamilie ist noch nicht implementiert.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| Wert | java.lang.String | Neue Schriftfamilie. |
setFontName(String value)
public void setFontName(String value)
Der Setter für den Schriftartnamen ist noch nicht implementiert.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| Wert | java.lang.String | Neuer Schriftartname. |
setStyle(String value)
public void setStyle(String value)
Der Style-Setter ist noch nicht implementiert. Dies ist ein Rohzeichenfolgenwert, der von der Font-Datei bereitgestellt wird.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| Wert | java.lang.String | Neuer Schriftstil. |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| arg0 | long | |
| arg1 | int |