TrueTypeFont
Opinie generală
TrueTypeFont este o clasă în Aspose.PDF FOSS pentru Java. Moștenitorii de la: PdfFont.
Fontul TrueType (/Subtip /TrueType) - ISO 32000-1:2008, 9.6.3.
Această clasă oferă 15 metode pentru a lucra cu obiecte TrueTypeFont în programele Java. Metodele disponibile includ: TrueTypeFont, decode, fromDictionary, getBaseFont, getEncoding, getFontDescriptor, getFontDictionary, getFontMetrics, getToUnicode, getTrueTypeReader, getWidth, glyphOutlineForCode, și 3 metode suplimentare. Toți membrii publicului sunt accesibili oricărei aplicații Java după instalarea pachetului FOSS pentru Java. Proprietăți: baseFont, composite, encoding, fontDescriptor, fontDictionary, fontMetrics, şi încă două.
Proprietăți
| Numele de proprietate | Tipul de vehicul | Accesul | Descriere: |
|---|---|---|---|
trueTypeReader | TrueTypeReader | Citeşte. | Întoarce TrueTypeReader dacă programul de font a fost încărcat. |
baseFont | String | Citeşte. | Întoarce numele fontului de bază (/BaseFont). |
encoding | FontEncoding | Citeşte. | Întoarce codarea fontului. |
toUnicode | ToUnicodeCMap | Citeşte. | Întoarce ToUnicode CMap. |
fontDescriptor | FontDescriptor | Citeşte. | Întoarce descriptorul fontului. |
composite | boolean | Citeşte. | Întoarce {@code true} atunci când este o fontă compusă de tip 0 a cărei |
| Codarea fluxului de conținut utilizează coduri cu caractere multi-baitice (de exemplu,. | |||
fontMetrics | FontMetrics | Citeşte. | Întoarce fontul metric. |
fontDictionary | PdfDictionary | Citeşte. | Întoarce dicționarul de font. |
Metode de evaluare
| Semnătura | Descriere: |
|---|---|
TrueTypeFont(fontDict: PdfDictionary, parser: PDFParser) | Creează un TrueTypeFont dintr-un dicționar de fonturi. |
decode(charCodes: byte[]) → String | |
getWidth(charCode: int) → double | |
getTrueTypeReader() → TrueTypeReader | Întoarce TrueTypeReader dacă programul de font a fost încărcat. |
resolveGlyphId(code: int) → int | Mape un cod de caractere la un id glif în programul integrat, urmând |
| Normele de selectare a glifosilor din ISO 32000-1:2008 §9.6.6.4: |
- 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. |
Vezi și: