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

# font-optical-sizing

APISummary
## 介绍

`font-optical-sizing` 属性用于设置文本渲染是否针对不同大小进行显示优化。

## 使用示例

**下面是一个示例: css-api**

**Entry:** `src/font-optical-sizing`
**Bundle:** `dist/font-optical-sizing.lynx.bundle`

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

const FontOpticalSizing = () => {
  return (
    <view style={{ display: "linear", width: "300px" }}>
      <text>normal</text>
      <text className="variable-font-normal">
        On this particular Thursday, something was moving quietly through the ionosphere many miles above the surface of
        the planet; several somethings in fact, several dozen huge yellow chunky slablike somethings, huge as office
        blocks, silent as birds.
      </text>
      <view style={{ height: "10px" }}></view>
      <text>font-optical-sizing: auto</text>
      <text className="variable-font-normal font-optical-sizing">
        On this particular Thursday, something was moving quietly through the ionosphere many miles above the surface of
        the planet; several somethings in fact, several dozen huge yellow chunky slablike somethings, huge as office
        blocks, silent as birds.
      </text>
    </view>
  );
};

root.render(<FontOpticalSizing />);

```

v0.11.0



## 语法

```css
font-optical-sizing: auto;
```

## 形式定义

| 初始值 | none |
| 适用元素 | text |
| 是否支持继承 | yes |
| 是否支持动画 | no |


## 形式语法

```
font-optical-sizing =
  auto | none
```

## 与 Web 的区别

- 与 Web 默认值是 `auto` 不同，Lynx 中默认值为 `none`。 `font-optical-sizing` 属性是对 `font-variation-settings` 属性的补充，光学尺寸变化轴在 `font-variation-settings` 中由 `opsz` 表示。

## 兼容性

**Compatibility Table**

**Query:** `css.properties.font-optical-sizing`

[Source](https://github.com/lynx-family/lynx/blob/develop/tools/css_generator/css_defines/219-font-optical-sizing.json) · [MDN](https://developer.mozilla.org/zh-CN/docs/Web/CSS/font-optical-sizing)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| font-optical-sizing | Yes (3.4) | No | Yes (3.4) | No | No | Yes |

**`font-optical-sizing`**

**Specifications:**

