# FontButton

A button that opens a font selector dialog.

{% hint style="warning" %}
Currently it is not possible to select the font programmatically. The default selected font is platform specific.
{% endhint %}

## Properties

### font

type: libui.FontDescriptor

A read-only property of the FontButton element which returns information about the currently selected font. The returned object has the following methods:

* getFamily() - return the font family
* getSize() - return the font size
* getWeight() - return the font weight
* getItalic() - return the italic style
* getStretch() - return the font stretch

{% hint style="info" %}
For more information, see the [libui-node documentation](https://github.com/parro-it/libui-node/blob/master/docs/attributedstring.md#fontdescriptor).
{% endhint %}

## Events

### change

Emitted when the selected font is changed. The current font descriptor is passed as an argument.

## Example

```markup
<FontButton v-on:change="onFontChange"/>
```


---

# 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://vuido.mimec.org/built-in-components/widgets/fontbutton.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.
