Re: Size-specific font selection in a webfonts environment?

Chris Lilley wrote:

> The original @font-face definition, as developed by the first
> webfonts WG and standardised in CSS2, included a font-size descriptor
> 
>   [defn in original CSS2 spec]
> 
> Unfortunately CSS3 Fonts drops this descriptor, presumably on the
> grounds that no-one uses bitmapped fonts anymore (though the
> coloured raster-based fonts from Apple and Google may induce a
> revival) and presumably because no-one seemed to be using optical
> sizing, multiple masters, and so on.

I don't think there's anything "unfortunate" about dropping the
'font-size' descriptor, it was a simple, practical decision for just
the reason you note.  The font formats from Apple/Google for color
fonts embed the size variants in a single SFNT-ish package, so that's
not really relevant.

But as you suggest, and as I've mentioned to John Hudson in the past
when he spoke about size-specific fonts at Typecon 2010, something
like a 'font-size' descriptor along with modifications to the font
matching algorithm could definitely be added to support this sort of
size-specific matching.  I'm somewhat skeptical that this sort of
feature is appropriate for webfonts, since rasterization will vary
across devices and zooming in and out would produce odd FOUT effects.
Might make more sense in EPUB contexts where the rasterization might
be more closely tied to the packaging and a document would embed the
fonts, making load times irrelevant.

I'm not sure 'font-size' is the right name for the descriptor, as you
want to pair a given face with a *device* size rather than the
computed value of 'font-size'.

For more detailed proposals, www-style is the appropriate forum.

Cheers,

John Daggett

Received on Tuesday, 22 October 2013 15:22:31 UTC