Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Adrian: A platform for hosting web fonts

CodeFactor GitHub GitHub release (latest by date)

Meet my friend Adrian!

Adrian is a web server, like Apache or Nginx, but just for fonts. Really, just fonts. Point Adrian toward a directory of font files; it'll generate CSS to use all styles and weights you have, and serve everything up for your visitors. If you’ve used Google Fonts, you should find Adrian quite familiar.

Adrian supports these font formats:

  • otf
  • ttf
  • woff
  • woff2

Do you have a project that you’ve open-sourced but you can't put the commercial fonts you bought in your repo? Put your code up on GitHub and load your fonts off your private Adrian server.

Did you actually read the license for that font you bought, and your head is spinning after reading things like “adequate technical protection measures that restrict the Use of and/or access to the Licensed Web Fonts, for instance by utilizing JavaScript or access control mechanisms for cross-origin resource sharing”? Yeah, Adrian's got your back.

Getting Started


  1. Grab the most recent Adrian release for your operating system. Extract the files somewhere on your server or local development environment.
  2. Copy adrian.yaml.example to a new file named adrian.yaml
  3. Edit adrian.yaml to configure Adrian
  4. Run adrian to begin serving

To use a YAML config file in a different location, specify it with the --config parameter when starting Adrian. For example: ./adrian --config /etc/adrian/adrian.yaml

Test it by loading a font CSS file, such as (replace with your server's hostname and Arial with the name of a font available to Adrian.

Configuring Adrian with adrian.yaml


  # Port number Adrian responds to
  port: 80
  # Adrian will only allow fonts to be used on these URLs (CORS functionality)
  # Directories where Adrian should look for fonts
    - /usr/share/fonts
  # If true, replace font filenames with hashes so they can't be guessed as easily
  obfuscate filenames: false

  # Used to set the cache-control header in responses
  cache-control lifetime: 2628000

  # Paths for writing logs to disk
    access: "/var/log/adrian/access.log"
port: <integer>

The TCP/IP port Adrian will listen to. Defaults to port 80.


A whitelist of domains allowed to use fonts hosted by this instance


A list of directories where Adrian should look for font files. On Linux, system-wide fonts are usually found in /usr/share/fonts.

obfuscate filenames: <boolean>

If true, the filenames of font files are replaced with hashes so they can't be guessed as easily.

cache-control lifetime: <seconds>

Used to set the cache-control header sent to browsers and CDNs. This header instructs everyone downstream to cache Adrian's CSS and font files for this amount of time.

access: <string>

Path where Adrian should write an access log. Access logs use Common Log Format for easy parsing.


CSS Import

In your site's CSS, import Adrian's CSS for the fonts you want to use:

@import "|Times+New+Roman;

URL formats

Generates CSS for including the Arial font and all of its variants in a web project.

Get one CSS file for muliple fonts by separating the names with pipe characters. For example:|Courier%20New

The display query parameter allows you to set the font-display style for all of the requested fonts. For example, the display=swap value tells browsers to render text with fallback fonts until custom ones are downloaded.

Built With

  • Go
  • Echo - The web framework used
  • Fastcache - In-memory caching library
  • sfnt - Font file parsing


Please consider opening a Pull Request to submit changes to this project.


We use SemVer for versioning. For the versions available, see the tags on this repository.



This project is licensed under the MIT License - see the LICENSE file for details