TrueTypeFont
סקירה כללית
TrueTypeFont הוא שיעור ב Aspose.PDF FOSS עבור Java. מורשת מ : PdfFont.
טופס TrueType (/Subtype /TrueTyp) - 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 עבור חבילת Java. רכוש : baseFont, composite, encoding, fontDescriptor, fontDictionary, fontMetrics,ועוד 2 עוד.
נכסים
| שם | סוג | גישה | תיאור |
|---|---|---|---|
trueTypeReader | TrueTypeReader | קראו | החזיר את TrueTypeReader אם תוכנית האותיות הועלה. |
baseFont | String | קראו | החזיר את שם האות הבסיסית (/BaseFont). |
encoding | FontEncoding | קראו | החזיר את הקוד של הפורט. |
toUnicode | ToUnicodeCMap | קראו | החזיר את ה-CMAP ToUnicode. |
fontDescriptor | FontDescriptor | קראו | החזיר את תיאור הפורט. |
composite | boolean | קראו | חוזר {@code true} כאשר זה סוג של טופס קומפוזיטי אשר |
| קוד תוכן זרם משתמש בקוד תרשים רב-בייט (לדוגמה,. | |||
fontMetrics | FontMetrics | קראו | החזיר את מטריית הפורט. |
fontDictionary | PdfDictionary | קראו | החזיר את מילון הפורט הבסיסי. |
שיטות
| חתימה | תיאור |
|---|---|
TrueTypeFont(fontDict: PdfDictionary, parser: PDFParser) | יצירת TrueTypeFont מתוך מילון טקסט. |
decode(charCodes: byte[]) → String | |
getWidth(charCode: int) → double | |
getTrueTypeReader() → TrueTypeReader | החזיר את TrueTypeReader אם תוכנית האותיות הועלה. |
resolveGlyphId(code: int) → int | תכנן קוד אופי ל-Glyph ID בתוכנית המובילה, בעקבות הכתובת: |
| כללי בחירת הגליק של 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. |
ראה גם