Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Export the embedded font names in CSS comments #175

ghost opened this Issue · 5 comments

1 participant


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


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?


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.


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


@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.


Please reopen if necessary.

@coolwanglu coolwanglu closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.