w3c / csswg-drafts

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

[css-fonts] Add generic font family, Khmer Mul #10036

Open r12a opened 8 months ago

r12a commented 8 months ago

https://www.w3.org/TR/css-fonts-5/#generic-font-families https://www.w3.org/TR/css-fonts-4/#generic-font-families

Per https://github.com/w3c/csswg-drafts/issues/8128#issuecomment-1962180465 i would like to propose a new generic font label for Khmer âksâr mul (pronounced /ʔɑːksɑː muːl/) font style, which is commonly used for headings and other distinctive text in Khmer. For more information, see https://r12a.github.io/scripts/khmr/km.html#writingstyles

'Mul' is spelled in a variety of ways, including 'mul', 'mool', 'moul', and 'muul'. I'm not sure whether the name for the font family label is sufficient as just 'mul', or whether it should be 'khmer-mul', or perhaps 'askar-mul'.

km_moul

Khmer has some other font styles, too, but this seems to be the one you'd most likely want to be able to control fallback behaviour for.

css-meeting-bot commented 1 month ago

The CSS Working Group just discussed [css-fonts] Add generic font family, Khmer Mul, and agreed to the following:

The full IRC log of that discussion <TabAtkins> addison: Richard has a proposal for a new generic family for Khmer mul
<TabAtkins> addison: specific generic type used in Khmer language
<ChrisL> q+
<TabAtkins> addison: we've done some generics, and those have mostly been things with widely-installed font bases, and in langs that are more familiar
<TabAtkins> addison: this one is less familiar, and the install base is more questionable. so maybe probing the boundaries of the rules for adding a generic
<TabAtkins> addison: Richard has a description for what is a "true" generic for this language, should we add it?
<TabAtkins> florian: I think, having talked with Richard, an argument is that this is similar to nastaliq, not visually but in terms of what kind of generic it is
<TabAtkins> florian: it's a distinctive type of lettering in this language, there's multiple fonts that do it. maybe some are preinstalled on windows, but not a lot of other platforms
<TabAtkins> ChrisL: in addition to what richard has written, i'll need a string of text in this language rendered as an image
<TabAtkins> florian: that's in the issue
<TabAtkins> ChrisL: good
<TabAtkins> dbaron: I don't know if we have this for other generics, but is there metadata in a font that identifies this?
<TabAtkins> xfq: no
<TabAtkins> addison: don't think so
<TabAtkins> dbaron: do we have it for other generics?
<TabAtkins> emilio: no
<TabAtkins> xfq: unlike nastaliq, which is a different - for regular Arabic speakers you can recognize the nast font, but for Urdu you might need to use nastaliq
<TabAtkins> xfq: but for this is more like for headings
<astearns> ack ChrisL
<TabAtkins> florian: this is more like nastaliq in Persian than Urdu. In Urdu you always use nastaliq, in Persian it's a distinct style that is valid.
<TabAtkins> florian: to dbaron's point, two ways
<xfq> s/nast font/Naskh font
<TabAtkins> florian: you ship in an OS that's well known, you know the set of fonts shipped with it, you assign those to this keyword
<TabAtkins> florian: alternative is a setting screen where users can say which font to use for a particular font
<dbaron> s/nast/naskh/
<TabAtkins> florian: maybe also browsers could have a big database of fonts that exist, but less likely
<emilio> q+
<astearns> ack emilio
<TabAtkins> emilio: on some OSes, mostly Android and other non-Mac Unix variants, font lookup is generally forwarded to the OS
<TabAtkins> emilio: so you can ask fontconfig for a "sans-serif" font
<TabAtkins> emilio: that's what I think all browsers do on Android/linux
<xfq> MoolBoran on Windows in this case
<TabAtkins> emilio: should we forward this request also?
<TabAtkins> emilio: so browsers aren't responsible for making this choice, bc we don't necessarily know it
<TabAtkins> emilio: like, is this a higher level request to other software as well?
<TabAtkins> astearns: do we specify how other generics work?
<TabAtkins> [no]
<astearns> s/work/select fonts/
<TabAtkins> emilio: we can specify it in CSS, but if there's no way to actually query it
<TabAtkins> emilio: without that we'd have to make things up, or bundle fonts
<TabAtkins> addison: can bundle config and the fonts
<TabAtkins> addison: to step back, the reason we're adding generics is to get us out of the trap of jamming local styles into the four buckets we had
<TabAtkins> addison: allowing to refer to things the way they would naturally
<TabAtkins> addison: so when we talk to people with a typographic system they tell us what their generic names are
<TabAtkins> addison: I think that's valuable; we're gonna continue to face this
<TabAtkins> astearns: we're over time, I think we should resolve to add this, or punt it back to the issue
<TabAtkins> astearns: proposed resolution is to add the new generic, any objections?
<fantasai> +1 to emilio's concerns
<TabAtkins> emilio: no objections, but we should file tickets to OS vendors/freetype/etc if we really expect this to get momentum
<TabAtkins> dbaron: there are also several more new generics, right?
<TabAtkins> florian: not too many, but yes
<xfq> https://www.w3.org/TR/css-fonts-4/#generic-font-families
<TabAtkins> emilio: right, would be great to not add to a pile of things we also can't implement
<TabAtkins> ChrisL: clarification, is this going in fonts 4 or 5?
<TabAtkins> fantasai: are there generic things in 4?
<TabAtkins> ChrisL: some
<TabAtkins> fantasai: I think 4 should be wrapping up
<TabAtkins> astearns: yeah, agree with 5
<TabAtkins> fantasai: so maybe kick the whole generic system to 5
<TabAtkins> astearns: is it enough to resolve to add it to 5?
<Bert> (B.t.w., some of the old generic families are somewhat encoded in the fonts themselves, in the form of Panose. Not sure if the data is reliable.)
<TabAtkins> florian: we can pull it back later if needed
<TabAtkins> ChrisL: the general structure about generic() and fang-song and nastaliq is in 4
<TabAtkins> fantasai: are there impls?
<TabAtkins> ChrisL: don't know, we don't have tests
<TabAtkins> florian: add it to a level, at the editor's discretion
<TabAtkins> astearns: so let's resolve to add to 4, alongside the existing ones. if it needs to move later, it can
<xfq> there are some tests in https://github.com/w3c/clreq/issues/587
<TabAtkins> RESOLVED: add the new keyword to Fonts 4
Crissov commented 1 month ago

I’m a bit surprised that #10037 has not been discussed together with this.