Skip to content

Conversation

matiasbenedetto
Copy link
Contributor

@matiasbenedetto matiasbenedetto commented Jun 15, 2023

What ?

If you upload a font with spaces in any of the components that end up in the file name of the font asset the resulting font URL has a space and that causes problems.

For example: if you upload a variable font with a font weight of "100 900", the resulting font path in theme.json would be font-name_normal_100 900.ttf and that can be problematic.

With this change, we would have font-name_normal_100-900.ttf.

How to test:

  1. Upload a font with variable width. Example: Literata variable (external link because GitHub doesn't allow ttf files).
  2. Test that the font asset filename and font path in theme.json don't have white spaces.

Copy link
Member

@mikachan mikachan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM 👍

@matiasbenedetto matiasbenedetto merged commit 6495f16 into trunk Jun 15, 2023
@mikachan mikachan deleted the no-spaces-in-font-path branch June 15, 2023 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants