videojs / font

Icon font used for Video.js
https://videojs.github.io/font/
Apache License 2.0
60 stars 79 forks source link

Feature custom json #24

Closed ivanovyordan closed 6 years ago

ivanovyordan commented 7 years ago
gkatsev commented 7 years ago

Thanks for the PR. Can you elaborate on what this does and how to use it? Not quite sure just from reading the code.

ivanovyordan commented 7 years ago

I need to add more icons to my player and at the same time I want to be able to update the package easily.

So if I need the remove_red_eye for example, I can create custom_icons.json file:

{
  "icons": [{
    "name": "visibility",
    "svg": "image/svg/production/ic_remove_red_eye_48px.svg"
  }]
}

After that I just need to call grunt default:../custom_icons.json and my icon will be added.

ivanovyordan commented 7 years ago

Sorry. I just made a new test and it looks my previous merging functions were buggy. It should be OK now.

thijstriemstra commented 6 years ago

This looks very useful, any way to prevent duplication of code from this repository is great. My videojs-record plugin also contains code copied from this repository, would be great to get PR this merged and released @gkatsev

@ivanovyordan can you add documentation to the readme file?

ivanovyordan commented 6 years ago

Sure. Will do it in the next few days.

thijstriemstra commented 6 years ago

Also, I'm using the usual video.js font + a custom font, both generated by this plugin. So my icons.json only contains a few additional fonts. I think this would be better default behavior (for this PR).

gkatsev commented 6 years ago

Had some trouble getting this to work at first with the directions above but got it to work with:

grunt generate-font:../custom.json update-base64 sass

Going to merge this and probably make a separate PR to make it a bit easier to do this. Also, want to write docs for it as well.