Getting StartedSetupCustom Fonts

Custom Fonts

Upload your own fonts in the dashboard, then use them in txt-font on images and video.

Built-in: txt-font=Georgia
sandbox-demo
Custom: txt-font=Spectral
sandbox-demo

Account-wide or Source-scoped

Every font you upload belongs to your account. You decide where it can be used:

Account-wideSource-scoped
Dashboard settingAll sourcesOnly selected sources
Where the font worksEvery Source in your account, including new onesOnly the Sources you select
Good forBrand fonts used everywhereFonts for one site, brand or client

For example, an account with Sources shop, blog and client-x can make its brand font account-wide and limit a client’s font to client-x. On shop and blog, the client’s font name is ignored.

You can change a font’s scope at any time. Fonts are never shared with other accounts.

Quickstart

  1. In the dashboard, open Fonts and upload your font files.

  2. Choose All sources or Only selected sources.

  3. When a font is Ready, copy its txt-font value and add it to a URL:

    https://assets.imgix.net/examples/blueberries.jpg?w=600&h=400&fit=crop&blur=150&txt=Fresh%20Picked&txt-size=64&txt-color=fff&txt-align=middle,center&txt-font=Spectral

You can also set the value as a default parameter on any Source the font is enabled for.

A font is ready to render shortly after it turns Ready. A URL requested before then is drawn in a fallback font and cached that way until you purge it.

Font Names

A typeface usually comes as one file per weight and style: Spectral-Regular.ttf, Spectral-Bold.ttf, Spectral-Italic.ttf and so on. Upload the ones you want to use. The Fonts page reads each file’s names and shows its txt-font value.

The family name is the regular file. Add txt-weight=bold, txt-style=italic or both, and Imgix switches to the bold, italic or bold italic file you uploaded:

txt-font=Spectral
sandbox-demo
txt-font=Spectral&txt-weight=bold
sandbox-demo
txt-font=Spectral&txt-style=italic
sandbox-demo
txt-font=Spectral&txt-weight=bold&txt-style=italic
sandbox-demo

Any other weight is its own font, with its own value:

txt-font=Spectral Light
sandbox-demo
txt-font=Spectral ExtraBold Italic
sandbox-demo
  • A font also answers to the full name and PostScript name in its file (Spectral Regular, Spectral-Regular). Case, spaces and punctuation don’t matter.
  • A custom font takes precedence over a built-in typeface with the same name.
  • If a font’s names are already taken by one of your fonts, the upload is rejected. Rename the existing font and upload again.
  • If no custom font matches, txt-font falls back to the built-in typeface with that name, then to the default font.

Video

The same fonts and values work on video text overlays:

Renaming and Deleting

Open a font in the dashboard to Rename or Delete it. A rename replaces all of the font’s names. Changes reach new renders shortly after; cached renders keep the old font until you purge them.

Limits

  • TTF, OTF, WOFF, WOFF2 and collections (TTC, OTC), up to 50 MB per file.
  • 50 fonts per account. Each face in a collection counts as one font.