-
Notifications
You must be signed in to change notification settings - Fork 661
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-text] Better describe the likely outcomes of hyphenation (editorial) #5973
Comments
Polish language is one I believe? I understand the OpenOffice hyphenation rules for Polish apply a hyphen to both the end of the first line and the start of the next. As you're looking at this, we noticed that |
Here's another example of the visual marker appearing at the beginning of a line. Unicode Standard, v11, p536:
|
Do you have a suggestion for a short example that we could include, for instance right after the first paragraph of 5.4? If we do add something, it would be good to keep it short, just to illustrate the point that hyphenation can be different / more complicated than what is typical of English. But I wouldn't attempt to list too many cases. As much as I find that sort of things interesting, css-text cannot scale to describing all the peculiarities of all the world's languages :) |
(Given generic language in the spec that generically allows and expects "the right thing" for all languages, automated tests in wpt might be a more effective place to highlight the specificity of various languages) |
The line breaking / hyphenation of pinyin can be an example too, but it may be less common than the above examples (and may be more suitable for css-ruby?). (Related clreq issue: w3c/clreq#351) |
…phenation opportunities, too. #5973
@r12a @xfq We've added a short table of examples illustrating the spelling changes (which are normatively noted in the paragraph above) here: If you have other examples you want to add, we can do that; but please remember we're not trying to make the spec examples exhaustive. :) It might be useful to compile your more exhaustive notes into the Typography index, though, and we can link there if you want. We also clarified the spec to say that hyphenation character changes must, and spelling changes should, apply. (The SHOULD is because, if the spelling differs between hyphenated and unhyphenated forms, depending on where the author ended up inserting the UA might not be able to match up the author's chosen hyphenation opportunity against its hyphenation dictionary.) We did not make any changes for WBR, see @frivoal's comments in #5972 (comment) and whatwg/html#6326 (comment) . Note that if HTML does introduce a way to mark up explicit hyphenation opportunities in the future, the spec is written to be generic to such mechanisms already. Agenda for CSSWG review. |
…tion, a=testonly Automatic update from web-platform-tests Add tests for i18n variations on hyphenation See w3c/csswg-drafts#5973 -- wpt-commits: b63c4e6e1c7b4f0ce9deb4a2ef76e90b7758f4ed wpt-pr: 37694
…tion, a=testonly Automatic update from web-platform-tests Add tests for i18n variations on hyphenation See w3c/csswg-drafts#5973 -- wpt-commits: b63c4e6e1c7b4f0ce9deb4a2ef76e90b7758f4ed wpt-pr: 37694
…phenation opportunities, too. w3c#5973
Follow-up on the fix for w3c#5973
[1] The Uighur example is missing the 'hyphen'. It should be a short baseline extension, separated from the last letter by a small space. Here's an example. It's not entirely clear how the line should be produced. Some say that the font should automatically drop and lengthen a normal hyphen, but others say you should use ـ U 0640 ARABIC TATWEEL. In the meantime, perhaps an SVG image would be better here. [2] Although the introductory text mentions that other symbols may be used, rather than a hyphen, the list of examples doesn't back that up convincingly - it only shows hyphens. I can provide one extra example for you, but how would you like it? I can provide text, but others may not be able to see the text, or i could provide an SVG image which could be displayed at approximately normal text size. |
@r12a The backing store is actually using U 0640 but it looks like it needs some kind of thin space to create the visual separation. What do you recommend here? |
As otherwise the browser-supplied rendering in the spec isn't necessarily quite right. See #5973
@r12a I've updated the spec to use the images you provided. As for this:
Should we consider that the Uyghur example is using a U 0640 ARABIC TATWEEL and call it done, or do you want to supply some alternative example? If you want to offer something else, SVG is indeed good, as that provides reliable rendering. |
I don't think we need to worry (for this context) about which character is used if we use the images. The answer to the question about which character should be used – for implementers of Uighur hyphenation – is not clear, afaict even among the Unicode folks, and needs further discussion. My personal preference is to use tatweel, fwiw. |
At this point, I am not sure what the request is on the spec. Do we consider the examples already present good enough to show some diversity, or not? |
@frivoal i think we're almost done, but here are some final suggestions:
SVG images for Cree example: |
Done (af3f01a). Also added a test in WPT for Cree (web-platform-tests/wpt#42523). Thanks for supplying this example. |
…only Automatic update from web-platform-tests Add hyphenatin example for cree See w3c/csswg-drafts#5973 -- wpt-commits: b79a9b9a36e3165401fb2a70106969d65c0f749a wpt-pr: 42523
…only Automatic update from web-platform-tests Add hyphenatin example for cree See w3c/csswg-drafts#5973 -- wpt-commits: b79a9b9a36e3165401fb2a70106969d65c0f749a wpt-pr: 42523
…only Automatic update from web-platform-tests Add hyphenatin example for cree See w3c/csswg-drafts#5973 -- wpt-commits: b79a9b9a36e3165401fb2a70106969d65c0f749a wpt-pr: 42523 UltraBlame original commit: 70077f8f643cfc86c0d1a32074dccc26cdf40091
…only Automatic update from web-platform-tests Add hyphenatin example for cree See w3c/csswg-drafts#5973 -- wpt-commits: b79a9b9a36e3165401fb2a70106969d65c0f749a wpt-pr: 42523 UltraBlame original commit: 70077f8f643cfc86c0d1a32074dccc26cdf40091
…only Automatic update from web-platform-tests Add hyphenatin example for cree See w3c/csswg-drafts#5973 -- wpt-commits: b79a9b9a36e3165401fb2a70106969d65c0f749a wpt-pr: 42523 UltraBlame original commit: 70077f8f643cfc86c0d1a32074dccc26cdf40091
8 Breaking Within Words
https://drafts.csswg.org/css-text-4/#hyphenation
https://drafts.csswg.org/css-text-3/#hyphenation
I think it would be worthwhile to add a note which explains that hyphenation should produce a number of effects, depending on the language in question, and give examples, in order to remind implementers to implement a solution that is open to cultural adaptation. These examples include:
It should also be made clear that such effects are triggered not only by browser code applying algorithms, but by
­
orwbr
(see #5972) when they fall within a range to which thehyphens
property has been applied (with relevant values), and that­
should only produce a glyph at the end of a line that looks like a hyphen if that is appropriate for the language in question.The text was updated successfully, but these errors were encountered: