WICG / local-font-access

Web API for enumerating fonts on the local system
https://wicg.github.io/local-font-access
Apache License 2.0
75 stars 16 forks source link

"This must be a valid PostScript name." #85

Closed annevk closed 2 years ago

annevk commented 2 years ago

This seems like a conformance requirements for people creating fonts? I'm not sure how this requirement helps implementers. What should they do if it's not a valid PostScript name, for instance?

inexorabletash commented 2 years ago

An implementation shouldn't return items with non-valid PostScript names. So if there were a malformed file, it should not be presented to the web site / returned via the enumeration, since this would be unexpected.

This is the one place where I felt sanitizing/filtering the data should be explicit, given that PostScript names are likely to be used as unique IDs in many cases, so saying something about those IDs seemed important.

annevk commented 2 years ago

But where is that required? Or if that is somehow required due to how fonts are defined this can be an assert, right?

inexorabletash commented 2 years ago

An assert is a good suggestion - I'll change it. thx!