> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# -x-auto-font-size-preset-sizes

APISummary
## Description

The `-x-auto-font-size-preset-sizes` property specifies an array of preset font sizes. When text auto-scaling is enabled, the most suitable font size will be selected from this array - the largest size that satisfies the width constraints.

## Examples

**This is an example below: css-api**

**Entry:** `src/-x-auto-font-size-preset-sizes`
**Bundle:** `dist/-x-auto-font-size-preset-sizes.lynx.bundle`

```tsx
import { root } from "@lynx-js/react";
import "./index.scss";

const XAutoFontSizePresetSizes = () => {
  const containerStyle = {
    display: "linear" as const,
    backgroundColor: "white",
  };

  const baseTextStyle = {
    backgroundColor: "gray",
    fontSize: "20px",
    overflow: "hidden",
  };

  const autoFontStyle = {
    ...baseTextStyle,
    XAutoFontSize: "true",
  };

  const autoFontWithSizeStyle = {
    ...baseTextStyle,
    XAutoFontSize: "true 10px",
  };

  const autoFontWithRangeStyle = {
    ...baseTextStyle,
    XAutoFontSize: "true 10px 50px",
  };

  const autoFontWithStepStyle = {
    ...baseTextStyle,
    XAutoFontSize: "true 10px 50px 3px",
  };

  const presetSizesStyle = {
    ...baseTextStyle,
    XAutoFontSize: "true",
    XAutoFontSizePresetSizes: "10px 16px 25px",
  };

  const sampleText = "This is a test text for auto-sizing font This is a test text for auto-sizing font";

  return (
    <view className="intro" style={containerStyle}>
      <text text-maxline="1" style={autoFontStyle}>
        {sampleText}
      </text>

      <text text-maxline="1" style={autoFontWithSizeStyle}>
        {sampleText}
      </text>

      <text text-maxline="1" style={autoFontWithRangeStyle}>
        {sampleText}
      </text>

      <text text-maxline="1" style={autoFontWithStepStyle}>
        {sampleText}
      </text>

      <text text-maxline="1" style={presetSizesStyle}>
        {sampleText}
      </text>
    </view>
  );
};

root.render(<XAutoFontSizePresetSizes />);

```

v0.11.0



## Syntax

```css
-x-auto-font-size: true;
-x-auto-font-size-preset-sizes: 10px 12px 15px;
```

### Values

- One or more space-separated [`<length>`](/next/api/css/data-type/length.md) values specifying the preset font sizes.

## Formal definition

| Initial value | [] |
| Applies to | text |
| Inherited | no |
| Animatable | no |


## Formal syntax

```
-x-auto-font-size-preset-sizes = <length>+
```

## Differences from the Web

- This is a Lynx-specific property.

## Notes

- This property is only effective when `-x-auto-font-size` is enabled, and it overrides the minimum and maximum font size settings in `-x-auto-font-size`.

## Compatibility

**Compatibility Table**

**Query:** `css.properties.-x-auto-font-size-preset-sizes`

[Source](https://github.com/lynx-family/lynx/blob/develop/tools/css_generator/css_defines/198--x-auto-font-size-preset-sizes.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| -x-auto-font-size-preset-sizes | Yes (1.0) | No | Yes (1.0) | Yes (3.2) | Yes (3.2) | No |

**`-x-auto-font-size-preset-sizes`**

**Specifications:**

- **Web — Not supported:** This native property is not implemented by the Web style transformer.

