RFC: Add a list of all fonts as JSON file to the frontend #21
Closed
MichaelKreil
started this conversation in
Ideas
Replies: 2 comments
-
|
looks good to me |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
https://github.com/versatiles-org/versatiles-fonts/releases/tag/v1.1.0 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We should add a list of the available fonts to the frontend. Not only for Maputnik, but also for our own frontend tools.
For example, let's use a subset of "Fira Sans" and generate glyphs for:
The folder
/assets/fonts/would look like this:The default
fonts.jsonused by Maputnik would just be an array of these 8 folder names:But for our own frontends, we can generate an additional JSON
font_families.jsonwith more information. I suggest this format:{ "fira_sans": { "name": "Fira Sans", "fontFace": { "fira_sans_bold": { "name": "Bold", "italic": false, "weight": 700 }, "fira_sans_bold_italic": { "name": "Bold Italic", "italic": true, "weight": 700 }, "fira_sans_italic": { "name": "Italic", "italic": true, "weight": 400 }, "fira_sans_regular": { "name": "Regular", "italic": false, "weight": 400 } } }, "fira_sans_condensed": { "name": "Fira Sans Condensed", "fontFace": { "fira_sans_condensed_bold": { "name": "Bold", "italic": false, "weight": 700 }, "fira_sans_condensed_bold_italic": { "name": "Bold Italic", "italic": true, "weight": 700 }, "fira_sans_condensed_italic": { "name": "Italic", "italic": true, "weight": 400 }, "fira_sans_condensed_regular": { "name": "Regular", "italic": false, "weight": 400 } } } }What do you think?
Beta Was this translation helpful? Give feedback.
All reactions