TrueTypeFont
Resumo geral
TrueTypeFont é uma classe em Aspose.PDF FOSS para Java. Herdeiros de: PdfFont.
Fonte TrueType (/Subtipo /TrueType) - ISO 32000-1:2008, 9.6.3. A fonte deve ser a mesma que o tipo de letra.
Esta classe fornece 15 métodos para trabalhar com objetos TrueTypeFont em programas Java. Os métodos disponíveis incluem: TrueTypeFont, decode, fromDictionary, getBaseFont, getEncoding, getFontDescriptor, getFontDictionary, getFontMetrics, getToUnicode, getTrueTypeReader, getWidth, glyphOutlineForCode, e 3 métodos adicionais. Todos os membros públicos são acessíveis a qualquer aplicação Java após instalar o pacote Aspose.PDF FOSS para Java. Propriedades: baseFont, composite, encoding, fontDescriptor, fontDictionary, fontMetrics,E mais dois.
Propriedades
| Nome: | Tipo de veículo: | Acessos | Descrição: |
|---|---|---|---|
trueTypeReader | TrueTypeReader | Leia. | Retorna o TrueTypeReader se o programa de fonte foi carregado. |
baseFont | String | Leia. | Retorna o nome da fonte de base (/BaseFont). |
encoding | FontEncoding | Leia. | Retorna a codificação da fonte. |
toUnicode | ToUnicodeCMap | Leia. | Retorna o mapa CMap ToUnicode. |
fontDescriptor | FontDescriptor | Leia. | Retorna o descritivo da fonte. |
composite | boolean | Leia. | Retorna {@code true} quando esta é uma fonte composta de Tipo0 cuja |
| A codificação de fluxo de conteúdo utiliza códigos de caracteres multi-byte (por exemplo,. | |||
fontMetrics | FontMetrics | Leia. | Retorna as métricas de fonte. |
fontDictionary | PdfDictionary | Leia. | Retorna o dicionário de fontes subjacente. |
Métodos de avaliação
| Assinatura | Descrição: |
|---|---|
TrueTypeFont(fontDict: PdfDictionary, parser: PDFParser) | Cria um TrueTypeFont a partir de um dicionário de fontes. |
decode(charCodes: byte[]) → String | |
getWidth(charCode: int) → double | |
getTrueTypeReader() → TrueTypeReader | Retorna o TrueTypeReader se o programa de fonte foi carregado. |
resolveGlyphId(code: int) → int | Mapeia um código de caracteres para uma id glifo no programa incorporado, seguindo o |
| Regras de seleção dos glifos da 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. |
Ver também: