Class of snx.android.hwui · Text.java
public final class Text
Fonts and text shaping, the HLE of minikin over HarfBuzz (src/android/hwui/text.c). A font is a handle of the runtime; sizes are in pixels.
public static synchronized int loadFont(String path, int index) sourceA font file's face (index for a collection's): its handle, 0 when it can't be read.
public static synchronized Object[] file(int font) sourceA font's file and its face's index in it, or null for a handle not loaded
public static native void metrics(int font, float size, float[] out) native sourceThe metrics of a font at a size: ascent (negative), descent, leading, top, bottom, underline position and thickness, x-height, cap height.
public static native int shape(int font, float size, float scaleX, float letterSpacing, char[] text, int start, int count, int contextStart, int contextEnd, boolean rtl, int[] glyphs, float[] positions, float[] advances, float[] total) native sourceThe glyphs of text[start, start + count) in its context, shaped: their IDs into glyphs, their positions (x, y pairs, from the run's start) into positions, each char's advance into advances (a cluster's on its first char, 0 on the others; may be null). Its count of glyphs, and the run's advance in total[0]. Arrays too small get nothing and the count still comes back.
public static native boolean hasGlyph(int font, int codePoint) native sourceWhether the font has a glyph for the code point.
public static native void bounds(int font, float size, int[] glyphs, float[] positions, int count, float[] out) native sourceThe bounds (left, top, right, bottom) of glyphs at positions, at a size.
public static synchronized int defaultFont() sourceMade from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.