Register

Custom Fonts

An Add-on Module for Foundry Virtual Tabletop

Author: arcanist Project Source: Project URL Versions 0.7.9+ (Verified 10) Last Updated 1 year, 8 months ago

Custom Fonts

Version Latest Release Download Count Supported Foundry Versions Discord Server Patreon

Facilitates using Custom Fonts in Journal Entries, Text Drawings on the canvas, or for the entire UI! You can upload your own font or load a font directly from Google Fonts.

fonts

Usage

Go to module settings and set the font families you want to use. It's recommended to only use fonts from Google Fonts or in your font directory so that's it's available for all users, but you can enter locally installed fonts as well.

Limitations

Using fonts from Google Fonts requires connection to Internet. You cannot load more than 100 fonts from Google Fonts. You also cannot load more than 50 fonts from more than 50 folders in your local fonts directory.

Font loading issues

Check that you have spelled the font exactly the same as on Google Fonts or as the name of the file in your fonts folder.

If your drawings don't update, run the following in a script macro or the browser console (F12):

canvas.drawings.placeables.filter(d => d.data.type === 't').forEach(d => d.draw());

Using local fonts on The Forge

If you are using The Forge, you need to create a folder in the Asset library first (try calling it fonts, for example) and then select that folder in the file picker in the module settings.

Migrating from the old Forien's Custom Fonts module

  1. Install the latest version of the old module alongside this one
  2. Enable both modules
  3. You'll see a prompt asking you if want to migrate your settings
  4. Click "Migrate"
  5. Disable and uninstall the old module

Downloading font CSS

For developers and content creators, there is a button in module settings to download a CSS file that you can include in your package (under the CC0 license). To use this file, add this to your package's folder and put a styles field in your manifest containing the name of this file. Before doing this, it's suggested that you set Custom Fonts' local folder setting to a folder within your package's folder so that this button generates the correct paths. Don't forget to include all of the local font files when distributing!

Presets

You can specify presets by adding the settings values to your module's manifest flags. See the example module. It's important to note that the "fonts" field must contain valid font names from Google Fonts and that the "directory" field is relative to the module's folder.

Known presets will be listed here:

Please let me know if you have any questions about how to create a preset or if you have created a preset which you would like added to the list!

Acknowledgments


Come hang out on my Discord server if you have questions, suggestions, or need help.

Categories

Available Versions

  1. Version 0.7.2

    1 year, 8 months ago
    Foundry Version 0.7.9+ (Verified 10) Manifest URL Read Notes
  2. Version 0.7.0

    Foundry Version 0.7.9+ (Verified 10) Manifest URL Read Notes
  3. Version 0.6.0

    Foundry Version 0.7.9+ (Verified 9) Manifest URL Read Notes