-
Notifications
You must be signed in to change notification settings - Fork 16
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
Address ambiguity in 'tts:lineHeight' normal algorithm (#1241). #1242
Open
skynavga
wants to merge
1
commit into
main
Choose a base branch
from
issue-1241-line-height-first-font
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+21
−3
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't recognise this intent as anything that TTWG discussed. However, I think it's obvious that the CSS algorithm needs to be considered a valid implementation.
Rather than duplicating the definition of the CSS algorithm, can we reference it instead, simplifying this text? Something along the lines of "This requirement is intended to be compatible with the CSS3 font algorithm for selecting the first font obtained; however if that algorithm is used, then it effectively overrides any semantic defined by
tts:fontSelectionStrategy
when determining line height."There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that won't work for a number of reasons, which I would be happy to explain in a ttwg call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The next TTWG call will be in September, so it would be worth sketching out the reasons here in order to make progress sooner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Primarily:
<font/>
element, but instead has a@font-face
rule, so we need language that refers to the unicode-range, i.e., our@range
attribute (either specified or defaulted);Bottom line is we can't reference CSS Font Module Level 3 for the language we need, and we still need to add language about the meaning of unicode-range, all together ending up with about the same (if not more) text in the note.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that CSS Fonts 4 probably needs some further work here, which means the CSS algorithm with which we should be compatible is effectively unstable right now. That suggests to me that we should not make any change until it is stable, and we should highlight the issues regarding
unicode-range
on that specification.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just added a comment at w3c/csswg-drafts#4796 (comment) relating to this.
It seems to me that any font selection needs to happen after processing any
<font>
s and be based on thetts:fontFamily
list. This is actually the same in both CSS and TTML, if we can assume the same intent of processing any font loading directives beforehand.To do that would require alternative wording though, both here and in CSS, to refer to the existence of the 0x0020 character in the font's "character map" regardless of how that map has been derived.
Does this seem reasonable to you @skynavga ? I'm slightly worried that I've missed something...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The solution at w3c/csswg-drafts@abbc961 for CSS (that closed w3c/csswg-drafts#4796) looks like it could be applied here too, even if by using similar phrasing rather than by reference, in other words:
font
element'srange
attribute.Alternatively we could say that for interpreting as per CSS the
font
element'srange
attribute must be taken to define theunicode-range
descriptor as in CSS.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this issue, i.e., for finding the first font having a mapping for 0x0020 (SPACE), it would be best to phrase the first bullet above as "the unicode range of a built-in font resource must include U+0020 for it to be a candidate for the first font obtained" or something to this effect.