# カスタムフォントリスト

- Human documentation: [https://docs.univer.ai/ja-JP/guides/boards/ui/fonts](https://docs.univer.ai/ja-JP/guides/boards/ui/fonts)

- Agent Markdown: [https://docs.univer.ai/ja-JP/guides/boards/ui/fonts.md](https://docs.univer.ai/ja-JP/guides/boards/ui/fonts.md)

- Requested language: `ja-JP`

- Content language: `ja-JP`

- Documentation version: `1.2.0`

- Source: [boards/ui/fonts.ja-JP.mdx](https://github.com/dream-num/documentation/blob/dev/content/guides/boards/ui/fonts.ja-JP.mdx)

---

Boards はフォントの選択を Board データに保存します。Board テーマでは `fontScheme.heading` と `fontScheme.body` を定義でき、個々のテキスト要素では `textStyle` によりフォントファミリー、サイズ、強調を上書きできます。

## テキスト要素のフォントを設定する

```ts
const board = univerAPI.getActiveBoard()
if (!board) throw new Error('No active Board')

const label = board.insertText({
  text: 'Milestone',
  left: 120,
  top: 96,
  width: 240,
  height: 64,
  textStyle: {
    fontFamily: 'Inter',
    fontSize: 18,
    bold: true,
  },
})
if (!label) throw new Error('Cannot insert label')
```

Board のテキスト編集は、`@univerjs-pro/boards-ui` の技術的依存関係である共通 Docs UI テキストパイプラインを使用します。フォントの置換や文字寸法の変化を避けるため、Board の描画前にホストページで Web フォントを読み込んでください。

共通のアプリケーションテーマについては[テーマとダークモード](https://docs.univer.ai/ja-JP/guides/fundamentals/ui/themes.md)を参照してください。Board 文書テーマはスナップショットに保存されます。
