> For the complete documentation index, see [llms.txt](https://help.brickspacelab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.brickspacelab.com/keystone/advanced-customizations/using-custom-fonts.md).

# Use custom fonts

{% hint style="warning" %}
**We do not provide support for code customizations**

If you are not comfortable making code changes, we highly recommend [hiring an expert developer](broken://pages/Fyss7M7PkIKyON7bVWSI).
{% endhint %}

We rely on [Shopify's Font Picker](https://www.shopify.ca/partners/blog/font-picker) to provide a font selection for your store. To access these settings go to Theme settings > Typography. Installing a font not available in the default selection will involve making some code customizations.

## Installing a custom font

{% stepper %}
{% step %}
**Prepare your font files**

{% hint style="info" %}
Please ensure you have a valid license to use the font you are trying to install
{% endhint %}

* Download your font in webfont file types such as `.woff2` or `.woff`
* If you don't have a webfont version of your font, you can use a generator to convert it. Font Squirrel has [a tool you can use](https://www.fontsquirrel.com/tools/webfont-generator) for this.
  {% endstep %}

{% step %}
**Upload font files**

* Open your Shopify admin and navigate to **Content > Files**.
* Upload each file for your font.
  {% endstep %}

{% step %}
**Edit theme code**

* Open up the theme editor and select `theme__styles.liquid` from within the snippets folder
* Add the below code after the `{% style %}` tag. Be sure to replace `MY_FONT` with your font name and ensure the URLs are correctly linking to your uploaded font.

  <pre class="language-css" data-title="theme__styles.liquid"><code class="lang-css">@font-face { 
    font-family: "MY_FONT"; 
    src: url('{{ "MY_FONT.woff2" | file_url }}') format("woff2"),  
      url('{{ "MY_FONT.woff" | file_url }}') format("woff"); 
  }
  </code></pre>
* From here you can include your font by updating the below code inside the same file. The variables `--type-font-body-family` , `--type-font-header-family` and `--type-font-nav-family` control the font family used for body, headings and navigation text.

  <pre class="language-css" data-title="theme__styles.liquid"><code class="lang-css">--type-font-body-family: {{ settings.type_font_body.family }}, {{ settings.type_font_body.fallback_families }};
  --type-font-body-style: {{ settings.type_font_body.style }}; 
  --type-font-body-weight: {{ settings.type_font_body.weight }}; 
  --type-font-header-family: {{ settings.type_font_heading.family }}, {{ settings.type_font_heading.fallback_families }};
  --type-font-header-style: {{ settings.type_font_heading.style }}; --type-font-header-weight: {{ settings.type_font_heading.weight }}; 
  --type-font-nav-family: {{ settings.type_font_nav.family }}, {{ settings.type_font_nav.fallback_families }};
  </code></pre>
* The updated code should look something like this

  <pre class="language-css" data-title="theme__styles.liquid"><code class="lang-css">--type-font-body-family: 'MY_FONT';
  --type-font-body-style: {{ settings.type_font_body.style }};
  --type-font-body-weight: {{ settings.type_font_body.weight }}; 
  --type-font-header-family: 'MY_FONT'; 
  --type-font-header-style: {{ settings.type_font_heading.style }}; --type-font-header-weight: {{ settings.type_font_heading.weight }}; 
  --type-font-nav-family: 'MY_FONT';
  </code></pre>

{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.brickspacelab.com/keystone/advanced-customizations/using-custom-fonts.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
