-
Notifications
You must be signed in to change notification settings - Fork 0
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
Determine locations for font files #13
Comments
The WOFF2 font at this URL appears to be what we want: https://fonts.gstatic.com/s/notocoloremoji/v25/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFWRxHy9WY8YXt1PQ.woff2 It is 1.9MB (that is comparable to the size of the font created by manually removing the SVG table from the unmodified binary font, after WOFF2-compression). We need confirmation that this is safe to hard-code. Obtained via:
|
Note also that this URL is for the updated Noto Color Emoji with Emoji 15.1 support, whereas testing until now has been with the font covering Emoji 15.0. For reference: new emojis in Emoji 15.0, Emoji 15.1 |
We can also use this location for Noto Emoji (mono): https://fonts.gstatic.com/s/notoemoji/v47/bMrymSyK7YY-MEu6aWjPJGaTe34h0Wq7.woff2 |
The two emoji font references now point to fonts.gstatic.com links mentioned above (commit: 5815fb0) |
Since they are available at fonts.google.com, it’s tempting to use the same technique for Bitter, Foldit and Nabla. However, in each case, the CSS does not point to any single font covering the whole character set; they are split into Latin, Vietnamese and (in the case of Bitter) Cyrillic. A method to get a URL for the non-subset WOFF2 font would be ideal. |
I think https://fonts.gstatic.com/s/foldit/v5/aFTV7PF3Y3c9WdjXozeyCYQ.woff2 has the un-subsetted Foldit. The hashes can be pre-calculated for the specific settings you need (undocumented) |
Thanks for this, looks good! Note that it has 615 glyphs vs 619 glyphs in the binary I’ve been using. Perhaps an optimization based on unused glyphs or a minor version difference. Do you have similar URLs for Bitter, Bitter Italic, Blaka Ink, Bungee Spice, Nabla (those are the other Google fonts I’ve been using in the text fonts menu). |
The Noto Color Emoji font, as well as the default set of fonts in the Text mode, need to be hosted somewhere rather than be delivered with the plugin. Their locations are defined in fontlist.js, and are currently either https://www.axis-praxis.org/ or https://raw.githubusercontent.com/. Neither of these domains is ideal for production — githubusercontent.com is not a CDN, and axis-praxis.org is not set up for heavy traffic.
Note that any domains from which assets may be downloaded by a plugin must be listed in manifest.json — one cannot dynamically download from arbitrary URLs (e.g. by letting users enter a URL).
Note also that, to minimize bandwidth, Noto Color Emoji has had its SVG table removed and is compressed as a WOFF2 file.
The text was updated successfully, but these errors were encountered: