The BitmapFont element has the following attributes. Some attributes are
required while others are optional.
Required attributes
The following attributes are required:
family
A string representing the name of the bitmap character set. This name should
match the name given to a standalone BitmapFont element defined elsewhere
in the watch face file.
size
A floating-point value that specifies the bitmap font size.
Optional attributes
The color attribute is optional. If you include this attribute, you must
specify the color using either the ARGB format (#ff000000 = opaque black) or
the RGB format (#000000 = black).
Fromversion4,thisattributeis[transformable][6].
Inner elements
The BitmapFont element can contains the following inner elements:
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-20 UTC.
[null,null,["Last updated 2025-05-20 UTC."],[],[],null,["# BitmapFont\n\nWatch Face Format version Version 4 Version 3 Version 2 Version 1\n\n*** ** * ** ***\n\nProvides rendering instructions for a specific instance of [`BitmapFont`](/training/wearables/wff/bitmap-fonts#bitmap-font)\nthat appears in a text-based element.\n\nIntroduced in Wear OS 4.\n\nSyntax\n------\n\n```xml\n\u003cBitmapFont family=\"string\" size=\"float\"\n color=\"argb-color | rgb-color\"\u003e\n \u003c!-- Inner elements consist of text formatting options. Here, \"Lower\" is\n used as an example. --\u003e\n \u003cLower ... /\u003e\n\u003c/BitmapFont\u003e\n```\n\nAttributes\n----------\n\nThe `BitmapFont` element has the following attributes. Some attributes are\nrequired while others are optional.\n\n### Required attributes\n\nThe following attributes are required:\n\n`family`\n: A string representing the name of the bitmap character set. This name should\n match the name given to a standalone [`BitmapFont`](/training/wearables/wff/bitmap-fonts#bitmap-font) element defined elsewhere\n in the watch face file.\n\n`size`\n: A floating-point value that specifies the bitmap font size.\n\n### Optional attributes\n\nThe `color` attribute is optional. If you include this attribute, you must\nspecify the color using either the ARGB format (`#ff000000` = opaque black) or\nthe RGB format (`#000000` = black). \n\n From version 4, this attribute is [transformable][6].\n\nInner elements\n--------------\n\nThe `BitmapFont` element can contains the following inner elements:\n\n- [`InlineImage`](/training/wearables/wff/group/part/text/formatter/inline-image)\n- [`Template`](/training/wearables/wff/group/part/text/formatter/template)\n- [`Upper`](/training/wearables/wff/group/part/text/formatter/upper)\n- [`Lower`](/training/wearables/wff/group/part/text/formatter/lower)\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [BitmapFont](/training/wearables/wff/v2/group/part/text/bitmap-font)\n- [Font](/training/wearables/wff/v2/group/part/text/font)\n- [Font](/training/wearables/wff/group/part/text/font)"]]