Home | History | Annotate | Download | only in renderscript

Lines Matching full:font

35  * rendered glyph bitmaps is maintained. Each font object represents a combination of a typeface,
36 * and point size. You can create multiple font objects to represent styles such as bold or italic text,
37 * faces, and different font sizes. During creation, the Android system quieries device's screen DPI to
40 * font to the Renderscript is required. A note of caution on performance, though the state changes
44 * <p>Font color and transparency are not part of the font object and you can freely modify
45 * them in the script to suit the user's rendering needs. Font colors work as a state machine.
48 public class Font extends BaseObj {
50 //These help us create a font by family name
137 Font(int id, RenderScript rs) {
144 static public Font createFromFile(RenderScript rs, Resources res, String path, float pointSize) {
150 throw new RSRuntimeException("Unable to create font from file " + path);
152 Font rsFont = new Font(fontId, rs);
157 static public Font createFromFile(RenderScript rs, Resources res, File path, float pointSize) {
161 static public Font createFromAsset(RenderScript rs, Resources res, String path, float pointSize) {
168 throw new RSRuntimeException("Unable to create font from asset " + path);
170 Font rsFont = new Font(fontId, rs);
174 static public Font createFromResource(RenderScript rs, Resources res, int id, float pointSize) {
196 throw new RSRuntimeException("Unable to create font from resource " + id);
198 Font rsFont = new Font(fontId, rs);
204 * and will attempt to produce the best match with a system font:
211 * Returns default font if no match could be found.
213 static public Font create(RenderScript rs, Resources res, String familyName, Style fontStyle, float pointSize) {