Package icyllis.modernui.graphics.text

# Class OutlineFont

java.lang.Object
icyllis.modernui.graphics.text.OutlineFont

All Implemented Interfaces:
  `Font`

public final class OutlineFont extends Object implements Font

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OutlineFont(Font font)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `calcGlyphScore(char[] buf, int start, int limit)`
  `Font`
  `chooseFont(int size)`
  `Font`
  `chooseFont(Paint paint)`
  `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)`
  `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)`
  `String`
  `getFamilyName(Locale locale)`
  `static FontRenderContext`
  `getFontRenderContext(Paint paint)`
  `String`
  `getFullName(Locale locale)`
  `int`
  `getMetrics(FontPaint paint, FontMetricsInt fm)`
  Expand the font metrics.
  `Typeface`
  `getNativeTypeface()`
  `int`
  `getStyle()`
  Returns the intrinsic style of this font.
  `boolean`
  `hasGlyph(int ch, int vs)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface icyllis.modernui.graphics.text.Font

  `getFamilyName, getFullName`

- ## Constructor Details

  - ### OutlineFont

    public OutlineFont(Font font)

- ## Method Details

  - ### getFontRenderContext

    public static FontRenderContext getFontRenderContext(@NonNull Paint paint)

  - ### getStyle

    public int getStyle()
    Description copied from interface: `Font`
    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.
    Specified by:
      `getStyle` in interface `Font`

  - ### getFullName

    public String getFullName(@NonNull Locale locale)
    Specified by:
      `getFullName` in interface `Font`

  - ### getFamilyName

    public String getFamilyName(@NonNull Locale locale)
    Specified by:
      `getFamilyName` in interface `Font`

  - ### chooseFont

    @NonNull public Font chooseFont(int size)

  - ### chooseFont

    @NonNull public Font chooseFont(@NonNull Paint paint)

  - ### getMetrics

    public int getMetrics(@NonNull FontPaint paint, @Nullable FontMetricsInt fm)
    Description copied from interface: `Font`
    Expand the font metrics.
    Specified by:
      `getMetrics` in interface `Font`
    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

    public boolean hasGlyph(int ch, int vs)
    Specified by:
      `hasGlyph` in interface `Font`

  - ### calcGlyphScore

    public int calcGlyphScore(char[] buf, int start, int limit)
    Specified by:
      `calcGlyphScore` in interface `Font`

  - ### doSimpleLayout

    public 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)
    Specified by:
      `doSimpleLayout` in interface `Font`

  - ### doComplexLayout

    public 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)
    Specified by:
      `doComplexLayout` in interface `Font`

  - ### getNativeTypeface

    public Typeface getNativeTypeface()
    Specified by:
      `getNativeTypeface` in interface `Font`