w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.5k stars 661 forks source link

[css-fonts] generic font families may vs should map to multiple concrete font families #5053

Open frivoal opened 4 years ago

frivoal commented 4 years ago

This issue is partly relevant for existing generic font families, but I think gets more pressing if we decide we're going to add more.

css-fonts-4 says:

However, a single generic font family may be a composite face combining different typefaces based on such things as the Unicode range of the character …

I like that this is a possibility, but I think in some cases it ought to stronger than a "may", and probably a "should", for generic font families that are meant to be international.

For instance, it doesn't seem particularly important that fangsong, or a possible other language / script specific additions like nastaliq.

However, for generic font families that are meaningful across multiple scripts (sans serif, rounded…), then I think it should be a composite face trying to cover a broad range of Unicode.

It feels like be able to make that distinction, we'd have to classify generics into "general-purpose generics" and "script-specific generics". That doesn't seem particularly hard at the moment, but with a bigger set, we might get into gray areas.

svgeesus commented 3 years ago

It feels like be able to make that distinction, we'd have to classify generics into "general-purpose generics" and "script-specific generics".

It does and I think that would be valuable.

Although we need to guard against the implicit bias that latin-script-specific === general-purpose.

svgeesus commented 3 years ago

Okay, I plan to attempt some "should" wording

svgeesus commented 3 years ago

for generic font families that are meaningful across multiple scripts

we'd have to classify generics into "general-purpose generics" and "script-specific generics"

we need to guard against the implicit bias that latin-script-specific === general-purpose.

This needs a concrete proposal for which generics are general purpose which is harder than it looks. Is cursive general purpose? Can we quietly kill fantasy in the same rewrite?

svgeesus commented 3 years ago

Ok since it is easier to criticize a proposal than create one, I propose that "general purpose" be:

which leaves, as "script-specific" (or at least, not necessarily defined or useful for all scripts)

Related: [meta] [css-fonts] Criteria for generic font families

frivoal commented 3 years ago

The proposed "general purpose" above makes sense to me. For the second category, a few comments:

r12a commented 3 years ago

Here are a couple of thoughts:

  1. 'serif' and 'sans-serif' only apply to a small handful of writing scripts. For my font-finder tool i ended up dividing fonts into 'modulated' and 'monoline' (although some were a bit of both). Serif and sans-serif map mostly to those two classifications – at least they do so better than serif and sans-serif map to most non-latin fonts.
  2. i classified the fonts in my lists by various writing styles, such as arabic thuluth, ruqa, kano, kufi, etc. Anything that didn't have an alternative 'generic type' was then classified as either monoline or modulated. I'm thinking of redoing those groupings to fall better along writing style lines, so don't get hung up on the current classifications. What does come out of that, however, is that a ruqa font would never be classified as a kufi or nastaliq font: those are exclusive denominations. However, a ruqa font could be either monoline or modulated. So this suggests that the distinction kind of holds as described above, although i wouldn't use those terms. I think that 'general purpose' should possibly be 'stylised', though 'script-specific' may be ok. But i would mover cursive and fantasy into the stylised bucket.
  3. One other category that can also be a script-specific style and a modulated/monoline style is handwritten. Also my (not very scientific) group of 'heavy' styles may be the same. So we may need a 3rd dimension for classifying these things.
svgeesus commented 3 years ago

Even if the connotations of using a cursive script can be very different from script to script, then notion that there exists a cursive variants seems applicable to most (all?) writing systems. What does classifying it as "script-specific" get us?

It means I don't believe that it is applicable to most writing systems. Remember the Kai != Cursive discussion. Cursive may somewhat map to "brush or pen strokes" but mapping that in turn to "informal, playful" is culturally specific.

And if it's something else, I don't know what.

I don't recall the discussions around adding that one and confess to not really understanding it. It it equates to "colorful, not monochrome" then it should be renamed.

putting fantasy in "script-specific" is probably fine. But putting it in "deprecated", with behavior up to the UA (including an allowance to just ignore it) might work too.

Can we kill it with fire? Please?

svgeesus commented 3 years ago

@r12a moduated vs. monoline is a much nicer classification, agreed - although we have an unfortunate quarter-century of legacy content that depends on the Western-centric terms (and in fact depends on serif having the exact width metrics of Times New Roman).

I wonder though if there is still value in introducing those two as generics. Or is it more of a continuum?

svgeesus commented 12 months ago

This example mentions mapping to multiple concrete families, but is non-normative as it is an example:

The script above should not have any knowledge of how ''system-ui'' is expanded to include a collection of system user interface fonts. In particular, the above script should yield a result of "system-ui" on every platform.