Interface Font

All Known Implementing Classes:
EmojiFont, OutlineFont

public interface Font
Platform abstract font face, may represent a single font file. For standard font, this may represent a fake font or logical font.
  • Method Details

    • getStyle

      int getStyle()
      Returns the intrinsic style of this font. For standard fonts, may return the style that this object is simulating. This indicates that this font can directly provide glyph images in this style.
    • getFullName

      default String getFullName()
    • getFullName

      String getFullName(@NonNull Locale locale)
    • getFamilyName

      default String getFamilyName()
    • getFamilyName

      String getFamilyName(@NonNull Locale locale)
    • getMetrics

      int getMetrics(@NonNull FontPaint paint, @Nullable FontMetricsInt fm)
      Expand the font metrics.
      Parameters:
      paint - a paint object used for retrieving font metrics.
      fm - a nullable destination object. If null is passed, this function only retrieve recommended interline spacing. If non-null is passed, this function expands to font metrics to it.
      Returns:
      the font's interline spacing.
    • hasGlyph

      @Internal boolean hasGlyph(int ch, int vs)
    • calcGlyphScore

      @Internal default int calcGlyphScore(char[] buf, int start, int limit)
    • doSimpleLayout

      @Internal float doSimpleLayout(char[] buf, int start, int limit, FontPaint paint, it.unimi.dsi.fastutil.ints.IntArrayList glyphs, it.unimi.dsi.fastutil.floats.FloatArrayList positions, float x, float y)
    • doComplexLayout

      @Internal float doComplexLayout(char[] buf, int contextStart, int contextLimit, int layoutStart, int layoutLimit, boolean isRtl, FontPaint paint, it.unimi.dsi.fastutil.ints.IntArrayList glyphs, it.unimi.dsi.fastutil.floats.FloatArrayList positions, float[] advances, int advanceOffset, Rect bounds, float x, float y)
    • getNativeTypeface

      @Internal Typeface getNativeTypeface()