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

Allow to pass directory to generated font url in css #1

Closed
olegstepura opened this issue Apr 19, 2015 · 3 comments
Closed

Allow to pass directory to generated font url in css #1

olegstepura opened this issue Apr 19, 2015 · 3 comments

Comments

@olegstepura
Copy link

Hi!

Great plugin! The only issue is that you cannot control where generated css links fonts to. It's always current dir.
But in case you concatenate generated css file to your main css file, fonts may be located in other dir, so it would be very helpful to have ability to control this.

example:
knowing that my fonts would be located in dir ../fonts/ relative to css file location I add an option

cssFontPath: '../fonts/'

to gulp plugin and the generated css has urls like url(../fonts/myfont.ttf) (notice the ../fonts/ in front of font name).

Also please note there are different comma symbols in comments of generated css

chrome、firefox、opera、Safari, 
      ↑                       ↑
   strange                 regular

Thanks!

@otakustay
Copy link
Member

The symbol is simply a Chinese symbol which means "these words are tightly relative", for an internationalized lib it should be fixed to comma , @junmer

@junmer
Copy link
Contributor

junmer commented Apr 20, 2015

@olegstepura @otakustay Thanks for your issue.
It's a useful feature.
I have added option fontPath for font file location.
and, is my carelessness, I fixed it into , lastest version.

Please use npm i [email protected] 😃

@olegstepura
Copy link
Author

Great job! It works as expected.

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

3 participants