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

# @font-face

APISummary
The `@font-face` CSS at-rule specifies a custom font with which to display text;
the font can be loaded from either a remote server or a locally-installed font
on the user's own computer.

## Syntax

```css
@font-face {
  [ font-family: <string>; ] ||
  [ src: url(<string>) | local(<string>); ]
}
```

## Values

### `font-family`

Specifies a name that will be used as the font face value for `font` or `font-family` properties.

### `src`

Use a comma-separated list to specify available fonts. Use `url()` function for remote fonts and Base64-encoded fonts.Use `local()` function for local fonts.

:::info
On Android:use local(file://absolute/path) for absolute font paths
On iOS:use local(font-name) for system-installed font names (e.g. local(xxx-light))
:::

:::caution
Supported font formats:

Android: TTF, OTF, TTC

iOS: TTF, OTF, WOFF (iOS 10+), WOFF2 (iOS 10+)
:::

## Example

**This is an example below: text**

**Entry:** `src/font_face`
**Bundle:** `dist/font_face.lynx.bundle` | Web: `dist/font_face.web.bundle`

```tsx
import { root } from "@lynx-js/react";
import { Component } from "@lynx-js/react";

import "./index.scss";

export default class FontFaceExample extends Component {
  render() {
    return (
      <view
        style={{
          display: "flex",
          flexDirection: "column",
          alignItems: "center",
          width: "100%",
        }}
      >
        <text>Whereas recognition of the inherent dignity</text>
        <text style={{ fontFamily: "Inter" }}>Whereas recognition of the inherent dignity</text>
        <text style={{ fontFamily: "Icon" }}>&#xEA01;</text>
      </view>
    );
  }
}
root.render(<FontFaceExample />);

if (import.meta.webpackHot) {
  import.meta.webpackHot.accept();
}

```

v0.7.1



## Difference from W3C

Not support font-style,font-weight and font-variant.

## Compatibility

**Compatibility Table**

**Query:** `css.at-rule.font-face`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/css/at-rule/font-face.json) · [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| font-face | Yes (1.0) | Yes (3.4) | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |

**`font-face`**

**Specifications:**

