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-4] Confusing sentence about the color-0 descriptor #2678

Closed
jfkthame opened this issue May 14, 2018 · 4 comments
Closed

[css-fonts-4] Confusing sentence about the color-0 descriptor #2678

jfkthame opened this issue May 14, 2018 · 4 comments

Comments

@jfkthame
Copy link
Contributor

See https://www.w3.org/TR/css-fonts-4/#palette-integer-desc

I don't understand the sentence (referring to 'color-' descriptors):

These descriptors are zero-indexed, so the initial palette in the font is represented by the color-0 descriptor.

In what sense does the 'color-0' descriptor "represent the initial palette in the font"? Surely it simply refers to the color at index 0 in the palette being specified. Or am I totally missing something?

@svgeesus
Copy link
Contributor

svgeesus commented May 14, 2018

Yes, the palette selection is done by the base-palette descriptor. This text is about overriding individual palette entries in the selected palette.

So that should be something like

so the color specified by the first palette entry in the selected palette is overidden by the color-0 descriptor.

(The term palette entry taken from the CPAL spec )

@litherum
Copy link
Contributor

litherum commented May 15, 2018

Yeah, I didn’t want to use the word “first” because I thought that would be confusing (when talking about zero-indexing things). I’m happy to clarify the sentence if we can find the right language.

@svgeesus
Copy link
Contributor

@litherum I see your point but, from the CPAL spec:

The first color record of each palette is provided in the colorRecordIndices array.

The first palette, palette index 0, is the default palette

Offset from the beginning of CPAL table to the first ColorRecord.

Index of each palette’s first color record in the combined color record array.

So I think it is okay to use first here, as the CPAL spec uses it the same way.

@svgeesus
Copy link
Contributor

Better suggested wording (re-using CPAL terminology):

so the color specified by the first color record in the selected palette is overidden by the color-0 descriptor.

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

3 participants