[css-fonts-4] compat problem with 'system' generic font family?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[css-fonts-4] compat problem with 'system' generic font family?

Alan Stearns
Hey all,



Given Medium’s experiment [1] with a font stack that looks like:

font-family: system, -apple-system, …

Where ‘system’ matched a bitmap font apparently still included in Windows installations, do we need to pick a different unprefixed name for this new generic font family?

Thanks,

Alan

[1] https://medium.com/@mwichary/system-shock-6b1dc6d6596f
Reply | Threaded
Open this post in threaded view
|

Re: [css-fonts-4] compat problem with 'system' generic font family?

Tab Atkins Jr.
On Thu, Nov 5, 2015 at 3:39 PM, Alan Stearns <[hidden email]> wrote:
> Given Medium’s experiment [1] with a font stack that looks like:
>
> font-family: system, -apple-system, …
>
> Where ‘system’ matched a bitmap font apparently still included in Windows installations, do we need to pick a different unprefixed name for this new generic font family?

Or people could just wait to use it until enough browsers implement
the new value.  It's not actually a compat problem (unless we think
there is a decent amount of pages actually trying to invoke the
Windows "system" font), just an old-browser issue.

~TJ

Reply | Threaded
Open this post in threaded view
|

Re: [css-fonts-4] compat problem with 'system' generic font family?

Alan Stearns
On 11/5/15, 3:54 PM, "Tab Atkins Jr." <[hidden email]> wrote:

>On Thu, Nov 5, 2015 at 3:39 PM, Alan Stearns <[hidden email]> wrote:
>> Given Medium’s experiment [1] with a font stack that looks like:
>>
>> font-family: system, -apple-system, …
>>
>> Where ‘system’ matched a bitmap font apparently still included in Windows installations, do we need to pick a different unprefixed name for this new generic font family?
>
>Or people could just wait to use it until enough browsers implement
>the new value.  It's not actually a compat problem (unless we think
>there is a decent amount of pages actually trying to invoke the
>Windows "system" font), just an old-browser issue.

Authors will (and should) support older browsers for quite a long time. Even after all of the current browsers support the ‘system’ value it won’t be safe to use on Windows for years. So they’ll add ‘-apple-system’ without the unprefixed generic to their font stacks (as Medium has done now) which may force everyone to implement the prefixed version (I believe Firefox is already considering this).

Unless we want to standardize on ‘-apple-system’ I think we should pick a different generic name that doesn’t have a widely-installed conflict.

Thanks,

Alan
Reply | Threaded
Open this post in threaded view
|

Re: [css-fonts-4] compat problem with 'system' generic font family?

John Daggett

Alan Stearns wrote:

> Authors will (and should) support older browsers for quite a long
> time. Even after all of the current browsers support the ‘system’
> value it won’t be safe to use on Windows for years. So they’ll add
> ‘-apple-system’ without the unprefixed generic to their font stacks
> (as Medium has done now) which may force everyone to implement the
> prefixed version (I believe Firefox is already considering this).

The ancient Windows 3.0-era font 'System' exists on XP but not on
Windows 7 or anything more recent. So I don't really see a great need to
use something more awkward simply to avoid name conflicts with 'system'.
By the time it's implemented in user agents the need to support XP-level
systems will be a thing of the past. Authors can use available
techniques for supporting antique browsers.

There's actually a little bit of a complicated backstory to the use of
'-apple-system' under OSX and iOS. There are several distinct features
that make this a "special" font family:

  o Hidden font family name. Apple considers this a "hidden" family, not
    one that is generally accessible via the family name. The platform
    provides API's to access the "system font" but their use is not
    really well-documented and their use feels like a work in progress.

  o Size-specific font selection. There's one set of faces for text
    sizes and a larger set of faces for display sizes (the cutoff is at
    20pt).

  o Tracking. In addition to choosing a given face (text or display)
    based on the size, there's additional tracking that's applied based
    on the size to aid readability at smaller sizes (via data in the
    'trak' table).

  o Linked fallback fonts. There are other hidden families for other
    scripts to which San Francisco is automagically "linked". So using
    text shaping under OSX 10.11, the system font will automatically
    fallback to the right set of hidden system fonts for Japanese. Note
    that this means that Latin text within Japanese menu items appear in
    San Francisco, not using the Latin glyphs in hidden Japanese system
    fonts.

Under the latest versions of OSX and iOS, having some form of meta-name
for the system font is actually not just a "nice to have", it's a
*requirement*! Eventually a general keyword 'system' can map to the same
thing across platforms but for now using '-apple-system' to deal with
these special, hidden system font families under OSX and iOS is fine.

I added support for '-apple-system' to Firefox rather than create a new,
Firefox-specific name. The Blink folks apparently added "BlinkMacSystemFont"
but frankly that name should be taken out to the woodshed and put out of
its misery. :P Replacing these with a 'system' keyword eventually is a
good thing.

A side note is that it sucks to some degree that authors need to futz
with special lists of system fonts. The CSS2 system font keywords were
designed to fill this need. Unfortunately, on mobile *no* implementation
does them this correctly. Safari/iOS, Chrome/Android and Firefox/Android
all map to random default or weird meta fonts rather than the system UI
font. [2] *sigh*

Regards,

John Daggett
Mozilla Japan

[1] Fabulous intro to new OSX system fonts! Yes, type design is cool...
https://developer.apple.com/videos/play/wwdc2015-804/

[2] I didn't test Windows Phone. Here's a testpage to check:
http://people.mozilla.org/~jdaggett/tests/systemfontlist.html

Reply | Threaded
Open this post in threaded view
|

Re: [css-fonts-4] compat problem with 'system' generic font family?

Alan Stearns
On 11/9/15, 5:55 PM, "John Daggett" <[hidden email]> wrote:

>
>Alan Stearns wrote:
>
>> Authors will (and should) support older browsers for quite a long
>> time. Even after all of the current browsers support the ‘system’
>> value it won’t be safe to use on Windows for years. So they’ll add
>> ‘-apple-system’ without the unprefixed generic to their font stacks
>> (as Medium has done now) which may force everyone to implement the
>> prefixed version (I believe Firefox is already considering this).
>
>The ancient Windows 3.0-era font 'System' exists on XP but not on
>Windows 7 or anything more recent. So I don't really see a great need to
>use something more awkward simply to avoid name conflicts with 'system'.
>By the time it's implemented in user agents the need to support XP-level
>systems will be a thing of the past. Authors can use available
>techniques for supporting antique browsers.

OK - I did not know that this issue was limited to XP-and-back installs. If that’s the case I’m much less worried.

Thanks for the additional details,

Alan


Reply | Threaded
Open this post in threaded view
|

Re: [css-fonts-4] compat problem with 'system' generic font family?

Alan Stearns
On 11/9/15, 6:11 PM, "Alan Stearns" <[hidden email]> wrote:

>On 11/9/15, 5:55 PM, "John Daggett" <[hidden email]> wrote:
>
>>
>>Alan Stearns wrote:
>>
>>> Authors will (and should) support older browsers for quite a long
>>> time. Even after all of the current browsers support the ‘system’
>>> value it won’t be safe to use on Windows for years. So they’ll add
>>> ‘-apple-system’ without the unprefixed generic to their font stacks
>>> (as Medium has done now) which may force everyone to implement the
>>> prefixed version (I believe Firefox is already considering this).
>>
>>The ancient Windows 3.0-era font 'System' exists on XP but not on
>>Windows 7 or anything more recent. So I don't really see a great need to
>>use something more awkward simply to avoid name conflicts with 'system'.
>>By the time it's implemented in user agents the need to support XP-level
>>systems will be a thing of the past. Authors can use available
>>techniques for supporting antique browsers.
>
>OK - I did not know that this issue was limited to XP-and-back installs. If that’s the case I’m much less worried.

Except that I just did a vanilla install of Win10, and I have a ‘System’ font present. So I’m back to worrying again.

Thanks,

Alan
Reply | Threaded
Open this post in threaded view
|

Re: [css-fonts-4] compat problem with 'system' generic font family?

John Daggett
Alan Stearns wrote:

> Except that I just did a vanilla install of Win10, and I have a
> ‘System’ font present. So I’m back to worrying again.

After other folks pinged me about this also, I did some more testing. The problem font does indeed still ship with Windows, vgasys.fon. This is an ancient FON format font. Modern versions of Firefox and Chrome using DirectWrite ignore FON fonts but if GDI fallback rendering is used, the old FON font will be picked up. Additionally, the latest versions of IE and Edge match a font called 'system' and magically map it to Arial (go figure...).

So, sad to say, I think we do indeed need to use something other than "system" as the name of the system UI font generic font family.

How about 'system-ui'? It's simple and captures precisely what it's intended to map to.

Cheers,

John

Reply | Threaded
Open this post in threaded view
|

Re: [css-fonts-4] compat problem with 'system' generic font family?

Myles C. Maxfield

> On Nov 11, 2015, at 6:53 PM, John Daggett <[hidden email]> wrote:
>
> Alan Stearns wrote:
>
> > Except that I just did a vanilla install of Win10, and I have a
> > ‘System’ font present. So I’m back to worrying again.
>
> After other folks pinged me about this also, I did some more testing. The problem font does indeed still ship with Windows, vgasys.fon. This is an ancient FON format font. Modern versions of Firefox and Chrome using DirectWrite ignore FON fonts but if GDI fallback rendering is used, the old FON font will be picked up. Additionally, the latest versions of IE and Edge match a font called 'system' and magically map it to Arial (go figure...).
>
> So, sad to say, I think we do indeed need to use something other than "system" as the name of the system UI font generic font family.
>
> How about 'system-ui'? It's simple and captures precisely what it's intended to map to.

I second this.

>
> Cheers,
>
> John
>
> ​


Reply | Threaded
Open this post in threaded view
|

Re: [css-fonts-4] compat problem with 'system' generic font family?

Christoph Päper-2
In reply to this post by John Daggett
Eight months ago, John Daggett <[hidden email]>:
>
> How about 'system-ui'? It's simple and captures precisely what it's intended to map to.

What about `interface`?
Reply | Threaded
Open this post in threaded view
|

Re: [css-fonts-4] compat problem with 'system' generic font family?

fantasai
On 07/10/2016 11:36 AM, Christoph Päper wrote:
> Eight months ago, John Daggett <[hidden email]>:
>>
>> How about 'system-ui'? It's simple and captures precisely what it's intended to map to.
>
> What about `interface`?

We resolved on system-ui back in November...
   https://lists.w3.org/Archives/Public/www-style/2015Nov/0272.html

~fantasai