Class Strike

java.lang.Object
icyllis.arc3d.sketch.Strike

@Experimental public final class Strike extends Object
The font strike holds the results from ScalerContext.
  • Constructor Details

  • Method Details

    • lock

      public void lock()
    • unlock

      public void unlock()
    • getGlyph

      public @NonNull Glyph getGlyph(int packedID)
      Find or create a glyph for the given glyph ID, return the pointer to it.

      Requires lock.

      Parameters:
      packedID - typeface-specified glyph ID
    • digestFor

      public @NonNull Glyph digestFor(int actionType, int packedID)
      Find or create a glyph for the given glyph ID, return the pointer to it. Get or compute the digest for the given action type, ensure that Glyph.actionFor(int) is set.

      Requires lock.

      Parameters:
      actionType - e.g. Glyph.kDirectMask
      packedID - typeface-specified glyph ID
    • prepareForImage

      public boolean prepareForImage(@NonNull Glyph glyph)
      Prepare the glyph to draw an image, and return if the image exists.

      Requires lock.

    • prepareForPath

      public boolean prepareForPath(Glyph glyph)
      Prepare the glyph to draw a path, and return if the path exists.

      Requires lock.

    • getMetrics

      public Glyph @NonNull [] getMetrics(int @NonNull [] glyphs, int glyphOffset, int glyphCount, Glyph @NonNull [] results)
      Compute metrics for a list of glyphs in bulk. The glyph metrics within the given range will be computed, and the glyph pointers will be stored in the results array and returned.

      Excludes lock.

    • getStrikeDesc

      public @NonNull StrikeDesc getStrikeDesc()
    • getSubpixelRounding

      public float getSubpixelRounding()
    • getSubpixelFieldMask

      public int getSubpixelFieldMask()