Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not report font axes after subsetting variable font #89

Closed
strarsis opened this issue Jan 14, 2024 · 5 comments
Closed

Does not report font axes after subsetting variable font #89

strarsis opened this issue Jan 14, 2024 · 5 comments

Comments

@strarsis
Copy link

Variable fonts that were subsetted using pyftsubset are reported by sama as not having font axes.
Other tools like this report font axes for the subsetted font file.

@Lorp
Copy link
Owner

Lorp commented Jan 14, 2024

I have not seen this issue. If you provide an example font, I’ll look into this.

@strarsis
Copy link
Author

strarsis commented Jan 14, 2024

Steps to reproduce:

  1. Get a variable font, in this example Open Sans from Google Fonts (Download family; extract downloaded ZIP file Open_Sans.zip).

  2. Subset the variable font file:
    2.a. Using glyphhanger:
    glyphhanger --formats=woff2 --LATIN --subset=./OpenSans-VariableFont_wdth,wght.ttf
    2.b. Alternatively using pyftsubset (used by glyphhanger) (LATIN subset being used with that unicode range):
    pyftsubset OpenSans-VariableFont_wdth,wght.ttf --flavor=woff2 --output-file="OpenSans-VariableFont_wdth,wght-subset.woff2" --unicodes="U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD"

  3. Upload (as drag and drop) the original, full font file OpenSans-VariableFont_wdth,wght.ttf into Samsa tool. Note that font axes are available.

  4. Upload (as drag and drop) the subsetted font file OpenSans-VariableFont_wdth,wght-subset.woff2 into Samsa tool. Note that font axes are not available: This font does not contain variation axes.

@Lorp
Copy link
Owner

Lorp commented Jan 14, 2024

Samsa does not handle WOFF2 fonts. Please try again without the --flavor=woff2 option, and use .ttf as suffix.

@strarsis
Copy link
Author

strarsis commented Jan 14, 2024

@Lorp: Well, this explains it. IMHO the tool should show a warning/error that WOFF2 font is unsupported, hence the reported information being incorrect. As this is a nice/useful tool, it would be great when WOFF2 is added to it.

@Lorp
Copy link
Owner

Lorp commented Jan 14, 2024

Thanks. Regarding handy warnings, there’s already issue #81. And indeed, allowing WOFF2 is on my list too. I’ll get to both of these when I upgrade the entire GUI app to Samsa Core v2.

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

No branches or pull requests

2 participants