Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.

Export the embedded font names in CSS comments #175

Closed
ghost opened this issue Jun 17, 2013 · 5 comments
Closed

Export the embedded font names in CSS comments #175

ghost opened this issue Jun 17, 2013 · 5 comments

Comments

@ghost
Copy link

ghost commented Jun 17, 2013

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

@coolwanglu
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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

@coolwanglu
Copy link
Owner

@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
Copy link
Owner

Please reopen if necessary.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant