W3C home > Mailing lists > Public > www-style@w3.org > May 2013

Re: [css3-fonts] font-language-override: substantive comments

From: Andrew Cunningham <lang.support@gmail.com>
Date: Wed, 29 May 2013 18:07:02 +1000
Message-ID: <CAGJ7U-X-OEsevq8X+1rbmmggSPrwoXn93J-9NSuxtpJfXXKnYQ@mail.gmail.com>
To: John Daggett <jdaggett@mozilla.com>
Cc: www-style <www-style@w3.org>
Hi John,

providing a web font is my preferred solution, and i do this for many
languages.

But the situation is that minority languages have limited choices for fonts.

taking the Karen examples again, there are only three Unicode fonts that
properly support Karen languages (Padauk, Padauk Book and Myanmar Text) the
default settings for these are Burmese/Mon typographic conventions and not
Karen. So there are two possible solutions:

1) use 'font-language-override' and 'font-feature-settings' as required; or

2) regenerating the fonts to change the default language system of the
font. I have done this for web projects in the past. Its non-trivial, and
not something most web developers can do. I have four different copies of
the same version of Padauk and Padauk Book which are tailored for different
groups of languages, including both regular and bold, this comes to 16 ttf
files.  And since some problects may support a number of Myanmar script
languages in the same web project, the number of web fonts becomes
ridiculously high.

Also this can be only done for opensource fonts, it shouldn't be done for
closed source or commercial fonts.

Similarly I need about three different versions of the Charis SIL font
generated to cover the Latin script languages in one web project.

The ideal situation is mixing web fonts with 'font-language-override' and
'font-feature-settings'

But to minimise need for downloads in areas that have low connection
speeds, esp in remote rural areas in developing countries, Its better to
provide fallbacks, before you have to resort to downloading web fonts.

In countries with high internet speeds web fonts as primary font makes
sense.

But in a remote regions of a developing country ... the font stack logic
needs to be different. The web font should be the fallback, the last resort.

my two cents worth, but developing content in lesser used languages in
developing countries tends to give a perspective somewhat different from
the norm.

Andrew


On 29 May 2013 17:45, John Daggett <jdaggett@mozilla.com> wrote:

>
> Hi Andrew,
>
> While I think it's an interesting idea to think about language system
> fallback, I think there's a *much* simpler solution - use a
> downloadable font that supports the script/language that you are
> interested in displaying correctly, rather than trying to get the
> browser to do something you might or might not want via fallback
> acrobatics.  *Especially* in the case of scripts that may not be fully
> specified, either from an encoding viewpoint or from a script system
> viewpoint.
>
> This is one of the big wins of downloadable fonts, they free us all
> from having to worry about the complexities of "font stacks" and such.
> In a previous era, font stacks were a necessary evil but not now.
> Authors can work with type designers to create fonts that display text
> just as they want and browsers can avoid the headache of having to
> implement complex behavior that's very hard to get right.
>
> Cheers,
>
> John Daggett
>
> ----- Original Message -----
> From: "Andrew Cunningham" <lang.support@gmail.com>
> To: "John Daggett" <jdaggett@mozilla.com>
> Cc: "www-style" <www-style@w3.org>
> Sent: Wednesday, May 29, 2013 4:23:04 PM
> Subject: Re: [css3-fonts] font-language-override: substantive comments
>
> Hi John,
>
> I am aware of what is meant by 'font-language-override' and in this
> case i meant 'font-language-override' although I am aware that
> lang="ksw" would be sufficient for Padauk. The problem is that such a
> system is not extensible. Browser developers will implement some
> correspondences that occur to them, its not possible to implement more
> than a fraction of the potential correspondences. Its not practical.
> And browser developers would not have access to the data required.
>
> Another problem with assuming and Karen langauge is associated with
> the KAR or KSW langauge system is that Karen langauges can also be
> written with other scripts.
>
> For Pwo Karen languages in Thailand you will find Thai script
> orthographies, and there is also the Leke script which is being
> proposed for inclusion in Unicode.
>
> In essence allowing 'font-language-override' to contain a fall-back
> list would be more extensible and easier to implement than using the
> value of the lang attribute. The lang attribute approach is practical
> and very useful, but not extensible and cannot be comprehensive.
>
> A slightly more concrete example:
>
> assuming i have <p lang="pwo"> ...
>
> or any of the other Karen languages (using Myanmar rather than other
> scripts) ...
>
> I still need
>
> font-language-override: ksw; for Padauk and Padauk Book
>
> and
>
> font-language-override: KAR; for Myanmar Text
>
> alternatively for Padauk and Padauk Book, I could use
>
> font-feature-settings: "wtri" 1,"lldt" 1;
>
> to get the same effect, but this will only work on Firefox and only if
> graphite support is enabled.
>
> and as of yet I haven't delved into the internals of Myanmar Text to
> see if any OT features are available to do something similar.
>
> Andrew
>
>
>
>
> On 29 May 2013 17:03, John Daggett < jdaggett@mozilla.com > wrote:
>
>
>
> Hi Andrew,
>
> Thanks for the example. However, you're mixing up a couple things I think.
>
>
> > A practical example would be the fonts Myanmar Text, a system font
> > on Windows 8 which has a language system "KAR" for the Karen
> > languages ant Padauk and Padaik Book which has a language system for
> > S'gaw Karen 'ksw'.
> >
> > If a web developer uses the Padauk font and if browsers fall back to
> > Myanmar Text, there needs to be a way of expressing that. Default
> > rendering, ie Burmese/Mon rendering isn't suitable.
>
> Language sensitive features are primarily determined by the content
> language of an element, for HTML the 'lang' tag. So language-specific
> behavior can be mapped from a ISO-639 lang tag to the data in the font:
>
> <p lang="ksw">...
>
> I think what you seem to be asking for is language system fallback,
> such that if lang="ksw" wasn't available in the font, you'd use
> lang="kar" instead, rather than the default lang="my". Am I getting
> this right?
>
> The 'font-language-override' is only meant as an *override* for when
> you want to mimic the features of a different language system.
> Specifying the lang attribute is the intended way for authors to
> indicate the language of their content.
>
> The 'font-language-override' property is also defined in terms of
> *OpenType* language codes, not in terms of ISO 639 lang codes. Padauk
> is a Graphite font that supports language-specific features via ISO
> 639 lang codes. It doesn't support OpenType shaping, so
> 'font-language-override' doesn't apply in this case.
>
> Rather than relying on fancy fallback behavior, it would be much better
> to simply use a downloadable font that has the features you need.
>
> Cheers,
>
> John Daggett
>
>
>
>
> --
>
> Andrew Cunningham
> Project Manager, Research and Development
> (Social and Digital Inclusion)
> Public Libraries and Community Engagement
> State Library of Victoria
> 328 Swanston Street
> Melbourne VIC 3000
> Australia
>
> Ph: +61-3-8664-7430
> Mobile: 0459 806 589
> Email: acunningham@slv.vic.gov.au
> lang.support@gmail.com
>
> http://www.openroad.net.au/
> http://www.mylanguage.gov.au/
> http://www.slv.vic.gov.au/
>



-- 
Andrew Cunningham
Project Manager, Research and Development
(Social and Digital Inclusion)
Public Libraries and Community Engagement
State Library of Victoria
328 Swanston Street
Melbourne VIC 3000
Australia

Ph: +61-3-8664-7430
Mobile: 0459 806 589
Email: acunningham@slv.vic.gov.au
          lang.support@gmail.com

http://www.openroad.net.au/
http://www.mylanguage.gov.au/
http://www.slv.vic.gov.au/
Received on Wednesday, 29 May 2013 08:07:36 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 29 May 2013 08:07:36 UTC