TrueTypeFont

Общ преглед

TrueTypeFont е клас в Aspose.PDF FOSS за Java. Наследници от: PdfFont.

TrueType шрифт (/подтип /TrueType) - ISO 32000-1:2008, 9.6.3.

Този клас предоставя 15 метода за работа с TrueTypeFont обекти в Java програми. Наличните методи включват: TrueTypeFont, decode, fromDictionary, getBaseFont, getEncoding, getFontDescriptor, getFontDictionary, getFontMetrics, getToUnicode, getTrueTypeReader, getWidth, glyphOutlineForCode, и 3 допълнителни методи. Всички публични членове са достъпни за всяко приложение на Java след инсталиране на пакета Aspose.PDF FOSS for Java. Свойства: baseFont, composite, encoding, fontDescriptor, fontDictionary, fontMetrics, и още 2 .

Свойства на веществата

Име на фирмата:Тип на изпитванеДостъп до информацияОписание на състоянието
trueTypeReaderTrueTypeReaderПрочети.Връща TrueTypeReader, ако програмата за шрифтове е била заредена.
baseFontStringПрочети.Връща името на основния шрифт (/BaseFont).
encodingFontEncodingПрочети.Връща кодирането на шрифта.
toUnicodeToUnicodeCMapПрочети.Връща CMap.
fontDescriptorFontDescriptorПрочети.Връща описателя на шрифта.
compositebooleanПрочети.Връща {@code true}, когато това е тип 0 композитен шрифт, чийто
Кодирането на потока от съдържание използва многобайтови символни кодове (напр.
fontMetricsFontMetricsПрочети.Връща метриката на шрифта.
fontDictionaryPdfDictionaryПрочети.Връща основния словар на шрифта.

Методи за изчисляване на данните

ПодписътОписание на състоянието
TrueTypeFont(fontDict: PdfDictionary, parser: PDFParser)Създава TrueTypeFont от речник за шрифтове.
decode(charCodes: byte[])String
getWidth(charCode: int)double
getTrueTypeReader()TrueTypeReaderВръща TrueTypeReader, ако програмата за шрифтове е била заредена.
resolveGlyphId(code: int)intКартиране на код за символи към идентификатор на глифа в вградената програма, след като се използва:
TrueType Правилата за подбор на знаци по ISO 32000-1:2008 §9.6.6.4:
  1. symbolic font with no explicit /Encoding → embedde | | `glyphOutlineForCode(code: int)` → `java.awt.geom.GeneralPath` | Returns the em-normalised, Y-up outline of the glyph selected by {@link #resolveGlyphId(int)} for the given character code, or {@code null} when no embedded program is present or the glyph cannot be resolved. | | `hasExplicitEncoding()` → `boolean` | Returns true if the font dictionary carries an explicit /Encoding (a base-encoding name or an encoding dictionary). | | `getBaseFont()` → `String` | Returns the base font name (/BaseFont). | | `getEncoding()` → `FontEncoding` | Returns the font encoding. | | `getToUnicode()` → `ToUnicodeCMap` | Returns the ToUnicode CMap. | | `getFontDescriptor()` → `FontDescriptor` | Returns the font descriptor. | | `isComposite()` → `boolean` | Returns {@code true} when this is a Type0 composite font whose content-stream encoding uses multi-byte character codes (e.g. | | `getFontMetrics()` → `FontMetrics` | Returns the font metrics. | | `getFontDictionary()` → `PdfDictionary` | Returns the underlying font dictionary. | | `fromDictionary(fontDict: PdfDictionary, parser: PDFParser)` → `PdfFont` | Creates the appropriate PdfFont subclass from a font dictionary. |

    Вижте също:

 Български