Watch Face Format version <button value="5" default="">Version 5</button> <button value="4">Version 4</button> <button value="3">Version 3</button> <button value="2">Version 2</button> <button value="1">Version 1</button>

*** ** * ** ***

Provides rendering instructions for a specific text element.

Introduced in Wear OS 4.

## Syntax

```xml
<Font family="string | SYNC_TO_DEVICE" size="float"
      color="argb-color | rgb-color" slant="NORMAL | ITALIC"
      letterSpacing="em-value"
      width="ULTRA_CONDENSED | EXTRA_CONDENSED | CONDENSED | SEMI_CONDENSED |
             NORMAL | SEMI_EXPANDED | EXPANDED | EXTRA_EXPANDED |
             ULTRA_EXPANDED"
      weight="THIN | ULTRA_LIGHT | EXTRA_LIGHT | LIGHT | NORMAL | MEDIUM |
              BOLD | SEMI_BOLD | ULTRA_BOLD | EXTRA_BOLD | BLACK | EXTRA_BLACK">
    <!-- Inner elements consist of text decoration and text formatting
         options. Here, "Lower" is used as an example. -->
    <Lower ... />
</Font>
```

## Attributes

The `Font` element has the following attributes. Some attributes are
required while others are optional.

### Required attributes

The following attributes are required:

`family`

:   The name of the font used for rendering the text. To use the same font
    family as the system, set this value to `SYNC_TO_DEVICE`.

:   To use a custom font, place the font file in `res/font/`, using one of the
    following accepted font file extensions: TTF, OTF, TTC, or XML. Then, set this
    value to the name of the font file, excluding the extension at the end. For
    example, for a file named `res/font/pacifico.ttf`, the `family` should be set to
    `pacifico`.

:   If the font file cannot be resolved, the system font is used.

`size`

:   A floating-point value that specifies the text size.

### Optional attributes

The following attributes are optional:

`color`

:   The color of the text. If provided, you must specify the color using either
    the ARGB format (`#ff000000` = opaque black) or the RGB format (`#000000` =
    black).

    From version 4, this attribute is [transformable](https://developer.android.com/training/wearables/wff/common/transform/transform).

`letterSpacing`

:   The space between letters, specified in EM units. The default value is 0.
    An example for slight expansion could be 0.05. Negative values tighten text.

`slant`

:   Whether to use a `NORMAL` font slant (default) or an `ITALIC` slant.

`width`

:   An enumeration of several hints for a font family variant to use. The default
    value is `NORMAL`, which applies the "normal" variant of the font.

    The following list contains the other enumeration values and the respective
    font family variants that they use, if that variant is available for the font:

    - `ULTRA_CONDENSED` and `EXTRA_CONDENSED` use the "condensed-light" variant.
    - `CONDENSED` uses the "condensed" variant.
    - `SEMI_CONDENSED` uses the "condensed-medium" variant.
    - `SEMI_EXPANDED`, `EXPANDED`, `EXTRA_EXPANDED`, and `ULTRA_EXPANDED` each use the "normal" variant.

`weight`

:   An enumeration of several possible font weights. The default value is
    `NORMAL`, which applies a weight of `400`.

    The following list contains the other enumeration values and their respective
    font weights:

    - `THIN` uses a font weight of `100`.
    - `ULTRA_LIGHT` uses a font weight of `150`.
    - `EXTRA_LIGHT` uses a font weight of `200`.
    - `LIGHT` uses a font weight of `300`.
    - `MEDIUM` uses a font weight of `500`.
    - `SEMI_BOLD` uses a font weight of `600`.
    - `ULTRA_BOLD` uses a font weight of `750`.
    - `EXTRA_BOLD` uses a font weight of `800`.
    - `BLACK` uses a font weight of `900`.
    - `EXTRA_BLACK` uses a font weight of `1000`.

`minSize`

:   The minimum font size used when `isAutoSize` is enabled on the parent [Text](https://developer.android.com/training/wearables/wff/group/part/text/text) or [TextCircular](https://developer.android.com/training/wearables/wff/group/part/text/text-circular). Defaults to 12px.

## Inner elements

The `Font` element can contain the following inner elements:

- [`Shadow`](https://developer.android.com/training/wearables/wff/group/part/text/decoration/shadow)
- [`Outline`](https://developer.android.com/training/wearables/wff/group/part/text/decoration/outline)
- [`OutGlow`](https://developer.android.com/training/wearables/wff/group/part/text/decoration/out-glow)
- [`Underline`](https://developer.android.com/training/wearables/wff/group/part/text/decoration/underline)
- [`StrikeThrough`](https://developer.android.com/training/wearables/wff/group/part/text/decoration/strike-through)
- [`InlineImage`](https://developer.android.com/training/wearables/wff/group/part/text/formatter/inline-image)
- [`Template`](https://developer.android.com/training/wearables/wff/group/part/text/formatter/template)
- [`Upper`](https://developer.android.com/training/wearables/wff/group/part/text/formatter/upper)
- [`Lower`](https://developer.android.com/training/wearables/wff/group/part/text/formatter/lower)
- [`Transform`](https://developer.android.com/training/wearables/wff/common/transform/transform)
- [`Reference`](https://developer.android.com/training/wearables/wff/common/reference/reference)

## Recommended for you

- Note: link text is displayed when JavaScript is off
- [Font](https://developer.android.com/training/wearables/wff/v2/group/part/text/font)
- [Outline](https://developer.android.com/training/wearables/wff/v2/group/part/text/decoration/outline)
- [Outline](https://developer.android.com/training/wearables/wff/group/part/text/decoration/outline)