-
Notifications
You must be signed in to change notification settings - Fork 92
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
Allow to import character subsets other than Latin #45
base: master
Are you sure you want to change the base?
Conversation
@KyleAMathews could you look at this, please? |
@KyleAMathews , any progress? Please add font subsets |
@KyleAMathews ping :) |
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.
Looking good!
@@ -13,8 +13,8 @@ const { packageJson, fontFace, readme } = require(`./templates`) | |||
const download = require(`./download-file`) | |||
const commonWeightNameMap = require(`./common-weight-name-map`) | |||
|
|||
//const baseurl = `https://google-webfonts-helper.herokuapp.com/api/fonts/` | |||
const baseurl = `http://localhost:9000/api/fonts/` | |||
const baseurl = `https://google-webfonts-helper.herokuapp.com/api/fonts/` |
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.
Revert this
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.
Sure! Done :)
Tried it locally but it doesn't seem to be working. Try running it locally:
|
Okay, I admit I didn't test with local URL, I'll try this. |
👍 Please post h ere the diff you get when it works. |
@KyleAMathews, which version of node do you use? |
8 |
Alright, I cannot make |
Video link isn't working. |
Agrr, sorry for this. Privacy settings. Try it now. |
Oh hmmm sorry — I ran So yeah, managed to generate a bunch of new css files. I'm not familiar with loading font files for additional languages. Can you really just require the latin & greek versions together? And the browser will figure it out? Looking at the CSS files, it seems they'd clash with each other since the @font-face stuff is the same except for which file it's pointing to. |
Yeah, this solution has a major flaw - it's not possible to include Greek AND Cyrillic charsets on the same page. I've copied default behavior of Well, there is probably better (I mean "ultimate") solution for this issue, like dynamically created CSS files for every possible combination of charsets, but until we want to stick to static files (which is quite good in my opinion, because it's simple), this one is the best approach I came with. Notice this one isn't breaking change, it shouldn't be major version update even :) So next iteration may be making it more generic/elastic. The other idea I have is to create second sets of packages, like |
@KyleAMathews Is there a chance for you to come back to it this week? :) |
@KyleAMathews ping |
Hey, it's now more than two months since I've opened the PR. Could we do something with it, just move on? |
It's three months now :( |
Just a note, while waiting for this to be merged, would be useful to add usage instructions to the README.md |
@ryall It is in README. The one inside generated package :) Look at |
Ah sorry! I didn't realise it was generated :) |
Would love to see this feature too. Waiting for ya, Kyle! |
And what we must to do now to install specific subsets? |
@koutsenko you can get this particular one through this package: https://www.npmjs.com/package/typeface-roboto-multilang. I've published it with code from this PR. |
@erykpiast thnx, but i already switched to roboto-fontface package. |
Yeah, I also found this project because of Material UI :) |
@KyleAMathews ping about merging this please? Lack of support for Latin Extended stopped me from using typeface-hind (which looked really promising to streamline font installation and deployment), having to unfortunately devise some manual method of downloading and importing fonts which I am doing right now. Life would be just so much easier if I could use typeface-hind for Latin Extended (and not only for Latin). Thanks. |
how about including just the "full" source font file and let the user build the needed fonts by them self? you could include a simple import gulp from 'gulp';
import fontUbuntu from 'typeface-ubuntu';
gulp.task('font', () => fontUbuntu({
charsets: ['greek', 'latin'],
styles: ['regular', '300'],
dest: 'path_to_dest_directory',
})); |
@KyleAMathews one of the issues with not using GF API is that the API now uses unicode-range; it would be good to avoid this whole issue by doing the same :) |
@KyleAMathews could this PR work? would need this too! |
@cezarneaga I've published this version of the project (Roboto font only) as the [separate package] (https://www.npmjs.com/package/typeface-roboto-multilang). Readme is not adjusted, so use it like |
I need koho not roboto |
@cezarneaga Take a look at this fork https://github.com/bedlaj/openfonts/tree/master/packages/koho_all |
Solves #21