Skip to content

Repository files navigation

GitHub release GitHub downloads CI status License

VersaTiles Fonts

VersaTiles Fonts provides free font glyphs tailored for map rendering.

Installation

Clone the repository:

git clone git@github.com:versatiles-org/versatiles-fonts.git
cd versatiles-fonts

Building requires the versatiles_glyphs binary. Install it with:

curl -Ls "https://github.com/versatiles-org/versatiles-glyphs-rs/raw/refs/heads/main/scripts/install.sh" | sh

Building

To generate the font files, run:

npm run build

This will create:

  • A dist/fonts.tar.gz archive containing all glyphs.
  • Separate archives dist/{font_family}.tar.gz for each individual font family.

Which families are packaged is driven by fonts.config.ts (the build section), so no font list is hardcoded in the build script.

Available Fonts

VersaTiles Fonts includes the following font families:

Adding Custom Fonts

To add your own fonts:

  1. Create a folder within fonts containing the *.ttf or *.otf files of the desired font.
  2. Ensure that the font files adhere to the following naming convention:
    • $family: The font family name, including any variations (e.g., "Condensed", "Extra Condensed", "Narrow", ...).
    • $style: The font style, such as "Thin", "Extra Light", "Light", "Medium", "Regular", "Semi Bold", "Bold", "Extra Bold", or "Black", optionally followed by "Italic".
    • File naming format: fonts/$family/$family - $style.ttf.
  3. If you need custom file names or want to merge multiple *.ttf/*.otf files (e.g., when combining character sets exceeding 64K chars), create a fonts.json file. Refer to the fonts/Noto Sans/ directory for an example configuration.

About

Repository of open-source SDF fonts optimized for MapLibre GL JS rendering.

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages