TrueTypeFont
TrueTypeFont
Összefoglaló
TrueTypeFont egy osztály a Aspose.PDF FOSS-ban Java számára. Az örökölők: PdfFont.
TrueType betűtípus (/Altípust /TrueType) - ISO 32000-1:2008, 9.6.3.
Ez a osztály 15 módszert kínál az TrueTypeFont objektumokkal való munkavégzéshez Java programokban. A rendelkezésre álló módszerek közé tartozik: TrueTypeFont, decode, fromDictionary, getBaseFont, getEncoding, getFontDescriptor, getFontDictionary, getFontMetrics, getToUnicode, getTrueTypeReader, getWidth, glyphOutlineForCode, és 3 további módszer. Minden nyilvános tag hozzáférhető bármely Java alkalmazás után telepítése a Aspose.PDF FOSS for Java csomag. A tulajdonságok: baseFont, composite, encoding, fontDescriptor, fontDictionary, fontMetrics, és még kettő.
A tulajdonságok
| A neve: | A típus: | Hozzáférés | Leírás |
|---|---|---|---|
trueTypeReader | TrueTypeReader | Olvasd! | Visszaadja a TrueTypeReader-t, ha a betűtípus programot feltöltötték. |
baseFont | String | Olvasd! | Az alap betűtípus nevét adja vissza (/BaseFont). |
encoding | FontEncoding | Olvasd! | Visszaadja a betűtípus kódolását. |
toUnicode | ToUnicodeCMap | Olvasd! | Visszaadja a ToUnicode CMap-ot. |
fontDescriptor | FontDescriptor | Olvasd! | Visszaadja a betűtípus leírását. |
composite | boolean | Olvasd! | Visszaadja a {@code true}-t, ha ez egy Type0 összetett betűtípus, amelynek |
| A tartalomáramok kódolása többbázisos karakterkódokat használ (pl. | |||
fontMetrics | FontMetrics | Olvasd! | Visszaadja a betűtípus mérőszámokat. |
fontDictionary | PdfDictionary | Olvasd! | Visszaadja az alapul szolgáló betűtípus szótárát. |
Módszerek
| Az aláírás: | Leírás |
|---|---|
TrueTypeFont(fontDict: PdfDictionary, parser: PDFParser) | A font szótárból létrehoz egy TrueTypeFont-t. |
decode(charCodes: byte[]) → String | |
getWidth(charCode: int) → double | |
getTrueTypeReader() → TrueTypeReader | Visszaadja a TrueTypeReader-t, ha a betűtípus programot feltöltötték. |
resolveGlyphId(code: int) → int | A beágyazott program egy karakterkódját a glyph id-hez mutatja, az alábbiakat követve: |
| Az ISO 32000-1:2008 §9.6.6.4 szabályainak a TrueType jelkép kiválasztására vonatkozó szabályai: |
- 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. |
Lásd még: