Type1MetricFont
Inheritance: java.lang.Object, com.aspose.font.Font, com.aspose.font.Type1Font
public class Type1MetricFont extends Type1Font
Type1‑metrisk typsnittimplementation. Detta type1‑typsnitt skapas endast med metriska data. Funktioner för hämtning av glyfer och vissa andra som kräver ett riktigt typsnitt är inte tillåtna; otillåtna funktioner kastar undantaget Type1NotSupportedException. Andra egenskaper (FontName, Weight, Metrics och Encoding) hämtas från metrikfilen.
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);
Metoder
| Metod | Beskrivning |
|---|---|
| convert(FontType fontType) | Konverterar Fonten till ett annat format. |
| equals(Object arg0) | |
| getAllGlyphIds() | Returnerar alla glyfid, tillgängliga i typsnittet. |
| getClass() | |
| getEncoding() | Kodning definieras i metrikfilen. |
| getFontDefinition() | Hämtar Font‑definition. |
| getFontFamily() | Hämtar Font‑familj. |
| getFontName() | Hämtar typsnittets namn. |
| getFontNames() | Hämtar Font‑namn. |
| getFontSaver() | Hämtar Font‑sparfunktionalitet. |
| getFontStyle() | Hämtar Font‑stil. |
| getFontType() | Hämtar Font‑typ. |
| getGlyphAccessor() | Font‑glyf‑åtkomst. |
| getGlyphById(GlyphId id) | Returnerar glyf efter glyfid. |
| getGlyphById(String id) | Returnerar glyf efter glyfid. |
| getGlyphById(long id) | Returnerar glyf efter glyfid. |
| getGlyphIdType() | Specifikation av glyph-id-typ. |
| getGlyphsForText(String text) | Hämtar glyfrepresentation för text. |
| getMetrics() | Hämtar Font‑metrik. |
| getNumGlyphs() | Hämtar antalet glyfer i Fonten. |
| getPostscriptNames() | Hämtar PostScript Font-namn. |
| getStyle() | Hämtar Font‑stil. |
| hashCode() | |
| notify() | |
| notifyAll() | |
| open(FontDefinition fontDefinition) | Öppnar en font med FontDefinition-objekt. |
| open(FontType fontType, byte[] fontData) | Öppnar en font med fonttyp och bytearray för fontdata. |
| open(FontType fontType, StreamSource fontStreamSource) | Öppnar en font med fonttyp och strömkälla. |
| open(FontType fontType, String fileName) | Öppnar en font med fonttyp och fontfilnamn. |
| save(OutputStream stream) | Sparar Fonten i originalformat. |
| save(String fileName) | Sparar Fonten i originalformat. |
| saveToFormat(OutputStream stream, FontSavingFormats outFormat) | Sparar Fonten i angivet format. |
| setFontFamily(String value) | Font-familjens inställare är ännu inte implementerad. |
| setFontName(String value) | Font-ansiktsnamnets inställare är ännu inte implementerad. |
| setStyle(String value) | Stil-inställaren är ännu inte implementerad. |
| toString() | |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
convert(FontType fontType)
public Font convert(FontType fontType)
Konverterar Fonten till ett annat format.
Note: TTF Font type is now supported only.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| fontType | FontType | Font-formattyp att konvertera till. |
Returns: Font - Font converted into new format.
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
getAllGlyphIds()
public GlyphId[] getAllGlyphIds()
Returnerar alla glyfid, tillgängliga i typsnittet. Stöds inte för Type1MetricFont‑typen.
Returns: com.aspose.font.GlyphId[] - Alla glyfid‑identifierare, tillgängliga i typsnittet.
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getEncoding()
public IFontEncoding getEncoding()
Kodning definieras i metrikfilen. StandardAdobeEncoding: kodningen fylls i automatiskt
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()
Hämtar Font‑definition.
Returns: FontDefinition - Font definition.
getFontFamily()
public String getFontFamily()
Hämtar Font‑familj.
Returns: java.lang.String - Font-familj.
getFontName()
public String getFontName()
Hämtar typsnittets namn.
Returns: java.lang.String - Teckensnittsnamn.
getFontNames()
public MultiLanguageString getFontNames()
Hämtar Font‑namn.
Returns: MultiLanguageString - Font names.
getFontSaver()
public IFontSaver getFontSaver()
Hämtar Font‑sparfunktionalitet.
Returns: IFontSaver - Font save functionality.
getFontStyle()
public int getFontStyle()
Hämtar Font-stil. Detta är ett värde som beräknas och representeras i en generaliserad typ.
Returns: int - Hämtar typsnittsstil. Vanligtvis en kombination av konstantflaggvärden från FontStyle‑klassen eller 0.
getFontType()
public FontType getFontType()
Hämtar teckensnittstyp. Returnerar värdet FontType.Type1.
Returns: FontType - Font type.
getGlyphAccessor()
public IGlyphAccessor getGlyphAccessor()
Typsnittsglyf‑åtkomst. Hämtar glyfer och glyfidenterifierare.
Returns: IGlyphAccessor - Font glyph accessor.
getGlyphById(GlyphId id)
public Glyph getGlyphById(GlyphId id)
Returnerar glyf efter glyfid. Stöds inte för typen (@code Type1MetricFont}.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| id | GlyphId | Glyfidentifierare. |
Returns: Glyph - Glyph.
getGlyphById(String id)
public Glyph getGlyphById(String id)
Returnerar glyf efter glyfid. Stöds inte för typen (@code Type1MetricFont}.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| id | java.lang.String | Glyfidentifierare. |
Returns: Glyph - Glyph.
getGlyphById(long id)
public Glyph getGlyphById(long id)
Returnerar glyf efter glyfid.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| id | long | Glyfid. |
Returns: Glyph - Glyph.
getGlyphIdType()
public GlyphIdType getGlyphIdType()
Specifikation av glyph-id-typ.
Returns: GlyphIdType
getGlyphsForText(String text)
public GlyphId[] getGlyphsForText(String text)
Hämtar glyfrepresentation för text.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| text | java.lang.String | Indatatext. |
Returns: com.aspose.font.GlyphId[] - GlyphId‑array.
getMetrics()
public IFontMetrics getMetrics()
Hämtar Font‑metrik.
Returns: IFontMetrics - Font metrics.
getNumGlyphs()
public int getNumGlyphs()
Hämtar antalet glyfer i Fonten.
Returns: int - Antal glyfer i typsnittet.
getPostscriptNames()
public MultiLanguageString getPostscriptNames()
Hämtar PostScript Font-namn.
Returns: MultiLanguageString - Postscript Font names
getStyle()
public String getStyle()
Hämtar Font‑stil.
Returns: java.lang.String - Typsnittsstil.
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)
Öppnar en font med FontDefinition-objekt.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| fontDefinition | FontDefinition | Typsnittsdefinitionsobjekt. |
Returns: Font - Font loaded.
open(FontType fontType, byte[] fontData)
public static Font open(FontType fontType, byte[] fontData)
Öppnar en font med fonttyp och bytearray för fontdata.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| fontType | FontType | Typsnittstyp. |
| fontData | byte[] | Byte‑array för att läsa in typsnitt från. |
Returns: Font - Font loaded.
open(FontType fontType, StreamSource fontStreamSource)
public static Font open(FontType fontType, StreamSource fontStreamSource)
Öppnar en font med fonttyp och strömkälla.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| fontType | FontType | Typsnittstyp. |
| fontStreamSource | StreamSource | Strömkälla för typsnitt. |
Returns: Font - Font loaded.
open(FontType fontType, String fileName)
public static Font open(FontType fontType, String fileName)
Öppnar en font med fonttyp och fontfilnamn.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| fontType | FontType | Typsnittstyp. |
| fileName | java.lang.String | Fontfilnamn. |
Returns: Font - Font loaded.
save(OutputStream stream)
public void save(OutputStream stream)
Sparar Fonten i originalformat.
Note: following Font types are supported for saving: New TTF fonts; TTF Font subsets; CFF Font subsets; Type1 Font subsets.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| ström | java.io.OutputStream | Ström för att spara teckensnitt. |
save(String fileName)
public void save(String fileName)
Sparar Fonten i originalformat.
Note: following Font types are supported for saving: New TTF fonts; TTF Font subsets; CFF Font subsets; Type1 Font subsets.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| fileName | java.lang.String | Fil för att spara teckensnitt. |
saveToFormat(OutputStream stream, FontSavingFormats outFormat)
public void saveToFormat(OutputStream stream, FontSavingFormats outFormat)
Sparar Fonten i angivet format.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| ström | java.io.OutputStream | ström för att spara teckensnitt |
| outFormat | FontSavingFormats | önskat format |
setFontFamily(String value)
public void setFontFamily(String value)
Font-familjens inställare är ännu inte implementerad.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| värde | java.lang.String | Ny fontfamilj. |
setFontName(String value)
public void setFontName(String value)
Font-ansiktsnamnets inställare är ännu inte implementerad.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| värde | java.lang.String | Nytt teckensnittsansiktsnamn. |
setStyle(String value)
public void setStyle(String value)
Style-settern är ännu inte implementerad. Detta är ett rått strängvärde som tillhandahålls av teckensnittsfilen.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| värde | java.lang.String | Ny fontstil. |
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 | Beskrivning |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| arg0 | long | |
| arg1 | int |