-
Notifications
You must be signed in to change notification settings - Fork 681
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] What does fangsong map to for non chinese text #4425
Comments
Good point (and the same for I was going to say that maybe it doesn't match anything and we go to the next in the list but no:
|
That rule doesn't need to be extended to all new keywords. We could divide the list of generic font keywords according to those that do need to have full coverage and those that don't. We've already discussed this in #4107 (about new system-* font keywords). |
Agree with Amelia; we should make it clearer that not all generic fonts need to map to a face. That said, I think |
For Latin text, that's the right thing to do AFAICT, but at the same time |
Perhaps, but the point of
If we did that, then authors could decide between fallback to sans and fallback to serif, by putting the appropriate generic font family after fangsong in the stack. |
The word "fangsong" indicates very specific style for CJK users. Mapping to any other typefaces looks very strange to me. We don't have active plan to implement this at this moment, but if we do, I think we want to limit only to "fangsong" style fonts. It looks like wikipedia has a list of fangsong CJK fonts. |
As currently defined, it has to map to something, as it is a generic font family type that always matches. If we keep that, we really should say what it maps too. Having fangsong match serif outside of the CJK range doesn't sound much worse to me than saying that "serif" matches "mincho" (which we already do). However, changing it being more normal and allowing fallbacks, so that the authors can pick what they want if the fangsong font doesn't cover their language also sounds ok to me. (as for math and emoji, I'm not sure I understand how they work: emoji isn't a style of font, it's a subset of Unicode... but that's probably a separate topic) |
We resolved at TPAC that the I understand that it’s valuable for the generic font families to match on every platform so authors can specify them and they will work everywhere. However, the font they match to doesn’t have to support every character. In fact, the matched font can support only a single character, not present anywhere on the webpage. So I don’t quite understand the reasoning behind the fact that all platforms must have a mapping for every generic font family. |
Not 100% sure if we are in agreement or not. Let me try again to state my position, and hopefully it'll be clear enough that you can tell me if we agree :)
My mental model here of how the current system works is: generic font families don't match a single font; they match a font stack, and the stack does cover as much of Unicode as the system can. There's no fallback after the generic font if the glyph isn't found, because the generic font (stack) is the fallback. If I ask for Of course, what will be in that font stack depends on what's available on the system, and there could be systems where for instance there's a single CJK font, so you cannot ensure that switching from serif to sans serif will always result in switching from a Mincho font to a Gothic one for Japanese. But you do express that intent. That's what generic font families mean to me: within what's available on the system, you pick what sort of fonts will be used if all else fails. I don't know if it would be web compatible to switch to that model for the existing/traditional generic font families. That could be interesting to look into, as a separate question. Now, for the newer ones, like I don't particularly want However, if we don't do that, and keep it as something that matches no matter what, I think we ought to characterize what sort of font it does match. And as a first approximation, outside of the CJK range, I think that the intent of Putting it in the same bucket as |
I can't speak for other browsers, but at least in WebKit, all of the generic font families except
The point I was trying to make is that there's no guarantee of how much of Unicode is actually covered. Stated another way: The spec currently says:
If the goal here is to provide interoperability between browsers, then this statement doesn't actually provide any interoperability guarantees. In order to provide those guarantees, some requirements would have to be added about unicode coverage. I don't quite understand why the spec places the requirement on generic font families always matching at least one face, if it doesn't actually accomplish its goal. I'm trying to argue that, instead of having some generic font families that always match something on the system and some that don't, we should just say that all of them don't. Because that's effectively the world we already live in today. But, I'm on a tangent. I should move this into another issue. |
Are you saying that for Can anyone answer how it works in other browsers? Do the existing generics always guarantee complete character coverage? |
Every browser has a "last resort" font that they use for any characters unmapped by the font stack, but that's shared by every font stack, and so isn't really part of the generic family system. |
Same for Blink.
No. There's a system fallback which kicks in after all specified families are exhausted. That tries as much coverage as possible. |
Tab is right, the "last resort font" is more common terminology than the "system fallback". |
Yes.
This isn't quite right. LastResort is the font that only has a handful of glyphs, the glyphs all look like em boxes, and it maps all of Unicode as those boxes. It isn't really applicable here, since users almost never see it. If an engine falls off the end of the |
The difference between |
OK, bringing this back to the original issue, then: Generic font families are not required to have full script coverage, or even any script coverage. So that answers @frivoal's original question: the fangsong font doesn't need match to anything outside of what is normally in a fangsong font. Authors can use the font stack to control fallback. But: should we say more than that?
(I suspect that these last two approaches could result in contradictory results.) |
(Migrated above issue to #4442) |
Well, |
If i apply
i would expect the word 'first' to be rendered using the glyphs in the fangsong font. Is this consistent with the direction in which this thread is going? (I couldn't tell for sure.) I think that that behaviour would be important, not only for aesthetic reasons related to glyph shapes, but also because if you did something similar with, say, arabic+latin text and ended up substituting different fonts for arabic and latin letters, you'd almost certainly have significant headaches around baseline alignment and relative font sizes. |
With the recent resolution of issue: 4442 Don't require browsers to always match every generic font family to a concrete font family, it is now clearer that a) the other (new) generic font families may not map to at one matched face |
The different between Song (the current simplified chinese equivalent to serif) and Fangsong in Simplified Chinese typography is really not that big (see comparison chart in https://zhuanlan.zhihu.com/p/66725620 with red = Song, green = Fangsong), that while design feature of both of them are distinctive enough to separately categorize them as two different font families, I believe it would be fine to correspond both of them to serif fonts in almost all other languages. |
So the specification now: clearly distinguishes universal generics, may-match generics and script-specific (may match) generics. It also states that
|
Yes. The steps are a) does it exist and b) does it have glyph coverage for the codepoint. |
I believe that with recent edits, this issue is ready to be closed. Any disagreement? |
In principle Fangsong is an oblique roman. It slants toward the upper-right corner because Chinese used to be written ttb. The structure is roman (Ming) and it has a slant but it does not have flow (italic-ness). |
The real script specificity here is that historically the script was ttb, so the angle of slant is towards the upper right along tthe vertical axis, as opposed to (say obliques for Latin) towards the right along the horizontal axis. |
The description of the fangsong generic font families should include some guidance as to what sort of font it should map to for characters outside of Chinese. If you pick fangsong and write in Latin, or Arabic, or Hebrew, or Thai, what do you get?
I believe the actual expectation is that for languages/writing-systems where fangsong isn't really a concept, the result should be a serif font. At least that seems to be what the Latin part of FangSong fonts tends to look like.
The text was updated successfully, but these errors were encountered: