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 עוד.

נכסים

שםסוגגישהתיאור
trueTypeReaderTrueTypeReaderקראוהחזיר את TrueTypeReader אם תוכנית האותיות הועלה.
baseFontStringקראוהחזיר את שם האות הבסיסית (/BaseFont).
encodingFontEncodingקראוהחזיר את הקוד של הפורט.
toUnicodeToUnicodeCMapקראוהחזיר את ה-CMAP ToUnicode.
fontDescriptorFontDescriptorקראוהחזיר את תיאור הפורט.
compositebooleanקראוחוזר {@code true} כאשר זה סוג של טופס קומפוזיטי אשר
קוד תוכן זרם משתמש בקוד תרשים רב-בייט (לדוגמה,.
fontMetricsFontMetricsקראוהחזיר את מטריית הפורט.
fontDictionaryPdfDictionaryקראוהחזיר את מילון הפורט הבסיסי.

שיטות

חתימהתיאור
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:
  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. |

    ראה גם

 עברית