stipub / stixfonts

OpenType Unicode fonts for Scientific, Technical, and Mathematical texts
SIL Open Font License 1.1
687 stars 41 forks source link

adding webfonts (should I do a PR)? #193

Open mireille-raad opened 3 years ago

mireille-raad commented 3 years ago

To use fonts on the web, the mdn documentation says that we need:

The mdn link docs have a link for a web font generator at fontsquirrel. That page has 18 trackers! It is also one more step for everybody.

Can I submit a PR that adds the files for the web? or would you guys do it? I can also add to the documentation how to use the font in webpages (self-hosting).

tiroj commented 3 years ago

The new build process for the STIX Two fonts generates both WOFF and WOFF2 webfonts (for both the CFF and TTF flavour fonts). At present, only the WOFF2 fonts are included in the fonts folder, since these are all that is needed for most modern browsers, and are the most compact of the formats. We can easily add the WOFF files if there is a desire for them.

EOT is pretty antiquated now, and was only ever supported in Internet Explorer. Unless someone is running an old version of IE, chances are that EOT is unnecessary.

SVG fonts were formally deprecated by the W3C.

mireille-raad commented 3 years ago

Thank you for taking the time to reply with a detailed explanation. The update should probably be for Mozilla's mdn article :)

Before I close the issue, do you think it is worth it to add to the documentation/README here how to use STIX in webpages (modern browsers)?

tiroj commented 3 years ago

Pinging @davidmjones re. the documentation.

BTW, the STIX Two fonts are going to be available on Google Fonts—at least the Text fonts, hopefully the Math font too—so that will be an option for some website creators.

davidmjones commented 3 years ago

Pinging @davidmjones re. the documentation.

I'd rather link to someone else's documentation on how to use webfonts in general, but if someone wants to write something appropriate, I'd be open to including it.

mireille-raad commented 3 years ago

@tiroj thanks for you comment about svg and eot fonts. I ended up researching this a bit more and updating the mdn article about webfonts:

Hopefully me and the future web font users won't be as confused about how to use your fonts on the web 😄.

If you want, you can link to that documentation now that it is updated. I can also do an example here that showcases different typography settings for the web, especially with variable fonts. Let me know what you think.

If it is not much hassle, I think it would be great to have the WOFF font as well as part of the build process. I looked at https://caniuse.com/?search=woff2. I saw that support for woff2 in some older or mobile browsers is not that great. It will save most users from having to use a font conversion tool like font squirrel, but this is up to you to decide if it is worth it.

tiroj commented 3 years ago

If it is not much hassle, I think it would be great to have the WOFF font as well as part of the build process.

The build process does output WOFF files as well as WOFF2. They’re just not included in the distribution of the pre-built Fonts folder. If you make a local copy of the repo on your system, you can run the build process and get the WOFF files. In the meantime, I’ll ask @davidmjones to consider whether we should add the WOFF files to the Fonts folder.

pkra commented 3 years ago

@davidmjones asked me to comment.

Here are a couple of reasons why I would argue against adding woff v1 versions at this time.

On a more personal note, I find the size of the STIX Two fonts to be prohibitive for use as webfonts - unless font subsetting is part of the workflow. In that case, creating other formats after subsetting is usually extremely easy.