Package org.jfree.skija
Class SkijaFontMetrics
java.lang.Object
java.awt.FontMetrics
org.jfree.skija.SkijaFontMetrics
- All Implemented Interfaces:
Serializable
public class SkijaFontMetrics extends FontMetrics
Returns font metrics.
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class java.awt.FontMetrics
font -
Constructor Summary
Constructors Constructor Description SkijaFontMetrics(io.github.humbleui.skija.Font skijaFont, Font awtFont)Creates a new instance. -
Method Summary
Modifier and Type Method Description intcharsWidth(char[] data, int off, int len)Returns the width of a character sequence.intcharWidth(char ch)Returns the width of the specified character.intgetAscent()Returns the ascent for the font.intgetDescent()Returns the descent for the font.intgetLeading()Returns the leading.Methods inherited from class java.awt.FontMetrics
bytesWidth, charWidth, getFont, getFontRenderContext, getHeight, getLineMetrics, getLineMetrics, getLineMetrics, getLineMetrics, getMaxAdvance, getMaxAscent, getMaxCharBounds, getMaxDecent, getMaxDescent, getStringBounds, getStringBounds, getStringBounds, getStringBounds, getWidths, hasUniformLineMetrics, stringWidth, toString
-
Constructor Details
-
SkijaFontMetrics
Creates a new instance.- Parameters:
skijaFont- the Skija font (nullnot permitted).awtFont- the AWT font (nullnot permitted).
-
-
Method Details
-
getLeading
Returns the leading.- Overrides:
getLeadingin classFontMetrics- Returns:
- The leading.
-
getAscent
Returns the ascent for the font.- Overrides:
getAscentin classFontMetrics- Returns:
- The ascent.
-
getDescent
Returns the descent for the font.- Overrides:
getDescentin classFontMetrics- Returns:
- The descent.
-
charWidth
Returns the width of the specified character.- Overrides:
charWidthin classFontMetrics- Parameters:
ch- the character.- Returns:
- The width.
-
charsWidth
Returns the width of a character sequence.- Overrides:
charsWidthin classFontMetrics- Parameters:
data- the characters.off- the offset.len- the length.- Returns:
- The width of the character sequence.
-