Re: [css3-fonts] @font-face font-family names used in other @font-face rules

Adam Prescott wrote:

> Firstly: given an existing @font-face rule defined by someone else's
> CSS that is outside of your control, the goal is to restrict it with
> unicode-range without a src value of local() or url(). More
> explicitly, if "Wendy One" is defined in @font-face CSS given by
> someone else (in this case Google, but it could be any other host):

I also don't really think this is a great way of doing this, you're
trying to subset a font provided by a font service.  It would be a far
better use of resources to download an appropriately subsetted font
rather than download the full font just to use a single character.

Another point is that you can do this just as easily by wrapping a
span around the ampersand you're trying to use; that way the styling
change is explicit rather than hidden away in the subtleties of the
font list and associated @font-face rules you're using.  As I
mentioned earlier, fonts don't mix and match as easily as you appear
to want them to.

> @font-face {
>   font-family: "Ampersand";
>   font-family-src: "Wendy One";
>   unicode-range: U+26;
> }

Adam, you need to think about your enhancement in terms of the
mechanics of *families* and not just single faces.  A single
@font-face rule refers to a single face while the font family name
refers to a *set* of faces with defined rules for mapping font
properties to a given face (or set of faces if unicode-range is used).
The above pseudo-code does not work because "Wendy One" refers to a
family and not a specific font.

Cheers,

John

Received on Thursday, 7 March 2013 00:11:47 UTC