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-5] Extend font-size-adjust #6382

Merged
merged 4 commits into from Jun 17, 2021
Merged

Conversation

fantasai
Copy link
Collaborator

DO NOT SQUASH WHEN MERGING!!!!!!!!!!!!!!!!!!!!

css-fonts-5/Overview.bs Outdated Show resolved Hide resolved
css-fonts-5/Overview.bs Show resolved Hide resolved
css-fonts-5/Overview.bs Outdated Show resolved Hide resolved
<dt><dfn>ch</dfn>
<dd>
Normalize the narrow pitch of the fonts,
using the advance measure of “0” (ZERO, U+0030)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The advance measure of 0 is different depending on the writing mode (general case vs vertical upright). Does this mean that when specified with ch font-size-adjust is expect to stretch things by a different amount depending on the writing mode? I suspect not, but then it would be good to be clear that we're talking about the width of the glyph, since advance measure is defined to vary based on writing modes.

Alternatively, we do want to be writing-mode sensitive, but then ch probably should be paired with 2 rather than 1 numbers.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you adapt your comment to #6288 ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having font-size-adjust be writing-mode sensitive seems to me unlikely to really be useful/desired, so I feel it would add complexity without adding value.

What could make sense would be to accept explicit vertical-measure values ch-height and ic-height, which could be used when a design is focused on vertical writing modes.

I would also propose renaming the ch and ic keywords here to ch-width and ic-width to make it clear what they represent, as they do not correspond directly with the similarly-named units (which are writing-mode dependent).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jfkthame Let's tackle this discussion in the issue you filed? :) Rather than here.

Copy link
Contributor

@svgeesus svgeesus Jun 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is no glyph corresponding to "0"? Edit ah okay existing issue

css-fonts-5/Overview.bs Show resolved Hide resolved
css-fonts-5/Overview.bs Show resolved Hide resolved
css-fonts-5/Overview.bs Show resolved Hide resolved
@@ -381,8 +603,15 @@ No new security or privacy considerations have been raised on this specification
<h2 id="acknowledgments">
Acknowledgments</h2>

The CSS Working group would like to thank:
Firstly, the editors would like to thank all of the
<a href="https://www.w3.org/TR/css-fonts-4/#acknowledgments">contributors to the previous level of this module</a>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Improving the Fonts 4 ack list is on my todo)

Copy link
Contributor

@svgeesus svgeesus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me

@svgeesus svgeesus merged commit 7dd2bc3 into w3c:main Jun 17, 2021
<dt><dfn>from-font</dfn>
<dd>
Computes to the <<number>> corresponding to
the <a>aspect value</a> of the [=first available font=].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the actual effect of 'from-font' for the primary font? Maybe, no size adjustment, right? Because m and m' are the same in the equation below.

u  =  ( m / m′ ) s
s  =  computed 'font-size-property' value
m  =  metric as specified by the 'font-size-adjust' property
m′ =  metric as specified in the actual font
u  =  adjusted font-size to use

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly. The intent is that from-font makes it easy to leave the primary font untouched, and adjust fallbacks appropriately to match it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Thanks for the clarification.

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

Successfully merging this pull request may close these issues.

None yet

5 participants