TrueTypeFont
Vue de l’ensemble
‘TrueTypeFont’ est une classe dans Aspose.PDF FOSS pour Java.Déduit de: `PdfFon’.
Type de texte (/Subtype /TrueType) - ISO 32000-1:2008, 9.6.3.
Cette classe fournit 15 méthodes pour travailler avec des objets TrueTypeFont dans les programmes Java. Les méthodologies disponibles comprennent: ‘TrueTYpeCode’, ‘decode’ , ‘fromDictionary’, getBaseFonte', ‘getEncoding', ’getFonDescriptor’, 'getMontMetrics', ''getToUnicode, ‘getTrypeReader’, ‚getWidth‘, glyphOutlineForCODE et 3 méthode supplémentaires. Tous les membres publics sont accessibles à toute application Java après l’installation de l’Aspose.PDF FOSS pour le package Java . Propriétés : ‘base-Fontaine’, ‘’composition’, ‘encodement’, `fontdiction’, 2 fonts, plus.
Propriétés
| Name | Type | Access | Description |
|---|---|---|---|
trueTypeReader | TrueTypeReader | Read | Returns the TrueTypeReader if the font program was loaded. |
baseFont | String | Read | Returns the base font name (/BaseFont). |
encoding | FontEncoding | Read | Returns the font encoding. |
toUnicode | ToUnicodeCMap | Read | Returns the ToUnicode CMap. |
fontDescriptor | FontDescriptor | Read | Returns the font descriptor. |
composite | boolean | Read | Returns {@code true} when this is a Type0 composite font whose |
| content-stream encoding uses multi-byte character codes (e.g. | |||
fontMetrics | FontMetrics | Read | Returns the font metrics. |
fontDictionary | PdfDictionary | Read | Returns the underlying font dictionary. |
méthodes
| Signature | Description |
|---|---|
TrueTypeFont(fontDict: PdfDictionary, parser: PDFParser) | Creates a TrueTypeFont from a font dictionary. |
decode(charCodes: byte[]) → String | |
getWidth(charCode: int) → double | |
getTrueTypeReader() → TrueTypeReader | Returns the TrueTypeReader if the font program was loaded. |
resolveGlyphId(code: int) → int | Maps a character code to a glyph id in the embedded program, following the |
| TrueType glyph-selection rules of 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. |
Voir aussi
- Aspose.PDF pour Java — API d’entreprise