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
  • Constructor Details

    • SkijaFontMetrics

      public SkijaFontMetrics​(io.github.humbleui.skija.Font skijaFont, Font awtFont)
      Creates a new instance.
      Parameters:
      skijaFont - the Skija font (null not permitted).
      awtFont - the AWT font (null not permitted).
  • Method Details

    • getLeading

      public int getLeading()
      Returns the leading.
      Overrides:
      getLeading in class FontMetrics
      Returns:
      The leading.
    • getAscent

      public int getAscent()
      Returns the ascent for the font.
      Overrides:
      getAscent in class FontMetrics
      Returns:
      The ascent.
    • getDescent

      public int getDescent()
      Returns the descent for the font.
      Overrides:
      getDescent in class FontMetrics
      Returns:
      The descent.
    • charWidth

      public int charWidth​(char ch)
      Returns the width of the specified character.
      Overrides:
      charWidth in class FontMetrics
      Parameters:
      ch - the character.
      Returns:
      The width.
    • charsWidth

      public int charsWidth​(char[] data, int off, int len)
      Returns the width of a character sequence.
      Overrides:
      charsWidth in class FontMetrics
      Parameters:
      data - the characters.
      off - the offset.
      len - the length.
      Returns:
      The width of the character sequence.