IT. Expert System.

Android Reference



Class Font

  • Deprecated.
    in API 16

    This class gives users a simple way to draw hardware accelerated text. Internally, the glyphs are rendered using the Freetype library and an internal cache of rendered glyph bitmaps is maintained. Each font object represents a combination of a typeface, and point size. You can create multiple font objects to represent styles such as bold or italic text, faces, and different font sizes. During creation, the Android system quieries device's screen DPI to ensure proper sizing across multiple device configurations.

    Fonts are rendered using screen-space positions and no state setup beyond binding a font to the Renderscript is required. A note of caution on performance, though the state changes are transparent to the user, they do happen internally, and it is more efficient to render large batches of text in sequence. It is also more efficient to render multiple characters at once instead of one by one to improve draw call batching.

    Font color and transparency are not part of the font object and you can freely modify them in the script to suit the user's rendering needs. Font colors work as a state machine. Every new call to draw text uses the last color set in the script.

    public class Font
    extends BaseObj
    • Method Detail

      • createFromFile

        public static Font createFromFile(RenderScript rs,
                          Resources res,
                          String path,
                          float pointSize)
        Deprecated. in API 16 Takes a specific file name as an argument
      • createFromResource

        public static Font createFromResource(RenderScript rs,
                              Resources res,
                              int id,
                              float pointSize)
        Deprecated. in API 16
      • create

        public static Font create(RenderScript rs,
                  Resources res,
                  String familyName,
                  Font.Style fontStyle,
                  float pointSize)
        Deprecated. in API 16 Accepts one of the following family names as an argument and will attempt to produce the best match with a system font: "sans-serif" "arial" "helvetica" "tahoma" "verdana" "serif" "times" "times new roman" "palatino" "georgia" "baskerville" "goudy" "fantasy" "cursive" "ITC Stone Serif" "monospace" "courier" "courier new" "monaco" Returns default font if no match could be found.


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 405 / 158856319. Delta: 0.03309 с