# queryFont()

[`createFont???()`](/0.9-1/references/untitled/twefont/createfont.md) によりフォント生成したクラスオブジェクトを参照します。

## 関数定義

```cpp
const FontDef& queryFont(uint8_t id)
```

idにはフォント生成時に指定したフォントIDを指定します。

戻り値は [`FontDef&`](/0.9-1/references/untitled/twefont/fontdef.md) で、ライブラリ内のフォント管理配列内に格納されたオブジェクトへの参照です。

idに0を指定すると、フォントID=0のデフォルトフォントを戻します。存在しないIDを指定した場合も、どうようにデフォルトフォントを戻します。`FontDef`オブジェクトがデフォルトフォントかどうかはメソッド`.is_default()`により判定できます。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mwm5.twelite.info/0.9-1/references/untitled/twefont/queryfont.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
