FontMetrics

Vue de l’ensemble

‘FontMetrics’ est une classe dans Aspose.PDF FOSS pour Java.

Il maintient des métrics de caractère calculés dérivées d’un {@link FontDescriptor} et des données spécifiques à la caractéristique.

Cette classe fournit 10 méthodes pour travailler avec des objets FontMetrics dans les programmes Java. Les méthodologies disponibles comprennent: ‘FontMétriques’, ‘getAscent’, getCapHeight', ‘getDescent’, ' getMissingWidth', ’getWitths', ‚setAscents',‘setDessent, ‘setWith’ . 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 : ‘ascent’, ‘‘capHeights , 'descents et ‘missing Wid’ ; ‘width’

Propriétés

NameTypeAccessDescription
ascentdoubleReadReturns the ascent (maximum height above baseline) in glyph units (typically 1/1000 em).
descentdoubleReadReturns the descent (maximum depth below baseline, usually negative).
capHeightdoubleReadReturns the cap height (height of uppercase letters).
missingWidthdoubleReadReturns the missing width — default width for characters not in the font’s width table.
widthsdouble[]ReadReturns the custom width table if set.

méthodes

SignatureDescription
FontMetrics(descriptor: FontDescriptor)Creates FontMetrics from a FontDescriptor.
FontMetrics(ascent: double, descent: double, missingWidth: double)Creates FontMetrics with explicit values.
getAscent()doubleReturns the ascent (maximum height above baseline) in glyph units (typically 1/1000 em).
getDescent()doubleReturns the descent (maximum depth below baseline, usually negative).
getCapHeight()doubleReturns the cap height (height of uppercase letters).
getMissingWidth()doubleReturns the missing width — default width for characters not in the font’s width table.
getWidths()double[]Returns the custom width table if set.
setWidths(widths: double[])Sets the custom width table.
setAscent(ascent: double)Sets the ascent.
setDescent(descent: double)Sets the descent.

Voir aussi

  • Aspose.PDF pour Java — API d’entreprise
 Français