/custom-fonts

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.

Primary LanguageJavaScript

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

Installation

In the setup screen, use the URL https://github.com/arcanistzed/custom-fonts/releases/latest/download/module.json to install the module.

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!

Support

Please consider supporting me on my Patreon if you like my work. You can see a list of all my projects on my website.

Bugs

You can submit bugs via Github Issues or on my Discord server.

Contact me

Come hang out on my my Discord server or click here to send me an email.

Acknowledgments

  • Thanks to Forien for originally creating this amazing module
  • Grenze Gotisch, Lobster and Indie Flower are fonts available on Google Fonts via Open Font License.

License

Copyright © 2021 arcanist

Forien's Custom Fonts is a module for Foundry VTT by Forien and is licensed under a Creative Commons Attribution 4.0 International License.

All changes to the original module are licensed under the MIT license and the Foundry Virtual Tabletop Limited License Agreement for module development. A detailed comparison can be found in the commit history.