Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Export the embedded font names in CSS comments #175

ghost opened this Issue Jun 17, 2013 · 5 comments


None yet
1 participant

ghost commented Jun 17, 2013

This would be useful for post processing as discussed in #117.
Such meta data are very valuable.


coolwanglu commented Jun 18, 2013

The comments are useless in CSS, I don't want to expose them, plus I have to handle special characters in order to prevent injection.
How about export them in a log file?


ghost commented Jun 18, 2013

Feel free to sanitize font names with a whitelist of allowed characters [a-zA-Z0-9_-\+ ] or even [a-zA-Z0-9 ].
I don't think comments are useless in CSS, it would be easier for post processing code to take hints from a CSS comment closer to the embedded font. .f1{/* Arial */ @font-face...}. If log file is easier to implement, that's fine. As long as meta data does not get lost.


coolwanglu commented Jun 18, 2013

I think I will add the name to the list of font-family, which should make sense.


coolwanglu commented Jul 6, 2013

@drinkupper Now I make font names printed if you use the --debug 1 parameter, is that enough for you?

I've just checked the CSS standard about identity names, and there are quite some rules, e.g. an identity name cannot start with a digit. So I don't think it's easy and safe to put it in font-family. But debug output is always safe to me.


coolwanglu commented Jul 11, 2013

Please reopen if necessary.

@coolwanglu coolwanglu closed this Jul 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment