Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-fonts][css-conditional] Case of font-technology feature queries. #6621

Closed
svgeesus opened this issue Sep 16, 2021 · 11 comments
Closed

[css-fonts][css-conditional] Case of font-technology feature queries. #6621

svgeesus opened this issue Sep 16, 2021 · 11 comments

Comments

@svgeesus
Copy link
Contributor

Context: I'm about to harmonize the syntax used in CSS Fonts 4 @font-face src to that used in CSS Conditional 4 feature queries. Currently the former uses color(COLRv1) while the latter uses color-colrv1.

font-technology feature queries are (I believe) ascii-case-insensitive.

For those which are defined by OpenType table names (where case is significant), should the examples

  1. use the casing from the OpenType specification (which is what the relevant section of CSS Fonts 4 currently does ) - for example sbix, CBDT
  2. use consistent lower case (which is what the relevant section of CSS Conditional 4 currently does) - for example color-sbix, color-cbdt

I'm tending towards the latter, with the move to hyphenated rather than functional form.

@LeaVerou @fantasai @litherum @drott

@drott
Copy link
Collaborator

drott commented Sep 17, 2021

No strong opinion. I personally don't always exactly remember the OpenType case for all of them anyway, and perhaps lowercase makes the examples less confusing, so going with lowercase sounds fine to me.

@LeaVerou
Copy link
Member

Very slightly tending towards lowercase, as it's more consistent with the rest of CSS, even though it's less consistent with OpenType.

@Lorp
Copy link

Lorp commented Sep 17, 2021

I believe there is little danger of uppercase table tags being reused in lowercase (unlike, say, variable axis names when they become registered). So Chris’s suggestion sounds safe. Lowercase table names are simply reserved by Apple.

@tabatkins
Copy link
Member

As these will be language-defined keywords, they should definitely be ASCII case-insensitive. How we write them in the spec doesn't matter too much, but I also lean towards consistent lowercase (the only place I violate that in my specs is the NaN keyword, which is spelled consistently with that casing across so many contexts).

Are there any OpenType keywords where case actually distinguishes things, or is it just that they have a particular defined casing?

@svgeesus
Copy link
Contributor Author

I'm not aware of any tag which conflicts with another one if both are uppercased.

Unless an Apple-reserved one became standardized without a name change.

@svgeesus
Copy link
Contributor Author

OK lets go for all-lowercase

@svgeesus svgeesus self-assigned this Sep 17, 2021
@khaledhosny
Copy link

FWIW, AAT has feat table and Graphite has Feat table.

@svgeesus
Copy link
Contributor Author

Thanks, @khaledhosny ! Great example.

Although so far, we don't use that table name in the font-technology strings, so it won't be a problem.

(We do allow differentiating between OpenType, AAT and Graphite layout, though).

@yisibl
Copy link
Contributor

yisibl commented Oct 17, 2021

I prefer lowercase, which is consistent with other parts of CSS. And many CSS developers are not clear about the case of table names in OpenType.

@svgeesus
Copy link
Contributor Author

I'm seeing a general preference for lowercase to be used in the specification.

@svgeesus
Copy link
Contributor Author

As agreed, in the newly relocated Font Technologies section (which was previously a sub-sub section inside the src descriptor) I used lowercase for the arguments to technology() and when specific OpenType, TrueType or Graphite table names were being referenced I used the case that specification uses.

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

No branches or pull requests

7 participants