Using Google fonts
Below is a sample embedded agent using theMerriweather font from Google fonts.

fontFamily parameter with the Google font name to the customFontTheme attribute of the mindset.init() method, as follows:
Using custom fonts
You can use self-hosted fonts to customize your agent. If you want to use a custom font, you should host it so it can be accessed, and then obtain the URL and checksum of the font. Please skip to the ‘Hosting Custom Fonts’ section for more information on hosting fonts. If you want to use a custom font, you need to add a few more parameters describing the font:
When applying a custom font, ensure that it includes all required characters, including special symbols, punctuation, and multilingual character sets, if applicable.
Customizing the font style of the agent UI elements
Whether you use a Google font or a custom font, you can customize the font style of the agent UI elements by using thetextStyles attribute in the customFontTheme object.
For example, let’s say we would like to change the Thread title font size of the agent UI, we can override it this way:

You need to give the values you want to override.In our previous example, we only changed the
titleSmall font size to 50.
Other values of the type scale (titleSmall) will be kept as the default values.
And all others, like displayLarge, headlineMedium, etc., will be retained as the default values.Overriding default font styles
The agent UI uses a set of textStyles parameters to define font styles like size, weight, and line height. ThosetextStyles parameters are called type scale tokens.
By default, the agent applies a predefined set of values. If you need to align the agent’s typography with your app’s brand or design system, you can override any of these values directly in your configuration.
Below are the default values for the textStyles parameters used in the agent UI. If you need to customize a value, you can override it with your value.
Applied Typography Tokens
The agent UI uses a subset of Material type tokens. These define text styles for key agent UI elements.Hosting custom fonts
If you’d like to host a custom font, here’s a quick guide and some options you should consider.- GitHub / GitHub Pages
https://raw.githubusercontent.com/username/repo/branch/path-to/font.ttf
- Firebase Storage
- Amazon S3 or other cloud storage (Azure Blob, Google Cloud Storage)
- Your backend or CDN