-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add improvements from mrdrogdrog/master #61
Conversation
9a57f7d
to
92323e3
Compare
Thanks for your suggestions/contribution! Could I ask you to split this into individual commits for each item, which can be considered/merged separately? Regarding each of the items mentioned:
Please make it "TwemojiMozilla.ttf" (i.e. just eliminate the space, but keep the Mozilla suffix because we want to be clear that this is not part of the upstream Twemoji project itself, it's a Mozilla derivative). This will match how it is actually shipped in Firefox (see https://hg.mozilla.org/mozilla-central/file/tip/browser/fonts).
I don't necessarily agree with this. TTF is the canonical font format for an OpenType font with TrueType outlines. WOFF2 is a compression/packaging of this targeted at webfont use, but is not necessarily optimal for all use cases. (E.g. a TTF file can be directly mapped into memory and used, whereas the WOFF2 has to first go through a decompression to a separate memory buffer. So depending on the usage scenario, the runtime RAM footprint of WOFF2 may actually be larger.)
These changes sound fine, although I haven't looked at the details yet. |
Need to mention that a lot of applications other than web browsers cannot use WOFF2 format, so TTF is still necessary. |
cd94a36
to
64b7697
Compare
Okay, I changed some things:
|
What do you think @jfkthame ? |
Thanks for the update. One question (as I haven't pulled this and tried a build myself yet):
Does this rename the font itself (internally) so that its family name no longer has a space? What I'd really prefer to see is that the font family name remains "Twemoji Mozilla" (with a space), while the filename becomes TwemojiMozilla.ttf. Can we get that result? |
64b7697
to
325dd1a
Compare
Hm as far as I can see no because grunt-webfonts uses the internal name as file name. Well. The name thing isn't that important. I dropped it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you're tidying things up, would you mind also fixing the whitespace in Gruntfile.js? It seems to have an ugly mix of tabs and spaces, which can make it look confusing depending on the tab settings in the editor/viewer.
Unless "real" tabs are strictly required for some reason, I'd prefer to just use spaces so that the indentation is stable regardless of editor settings.
Thanks!
Fixed it |
LGTM - thanks for doing this. |
No problem. I have many more improvements waiting for a PR 😏 (as soon as they're finished) |
@mrdrogdrog As it was mentioned in previous comments, replacing TTF by WOFF2 will create issues. Even if Fontconfig seems to support WOFF2 thanks to FreeType, it seems it still has problems. Some people (including me) directly use Twemoji as a font in terminal emulators or other GUI programs. |
I really like this project (despite the fact that it's quite a mess. 😅 ) so I want to give back some of my personal improvements.
The white space in the file name is rather annoying
It's 2021. Nobody should use ttf files
Corrected some white spaces, indentations and added triple equal signs
I altered layerize.js so you don't have to repackage twe-svg.zip anymore
Node lib updates
Hope you like it!