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

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

From: Adam Prescott <adam@aprescott.com>
Date: Mon, 4 Mar 2013 18:15:18 +0000
Message-ID: <CA+OJs9RWviLib=nUwY-4D2G7esNA00eFguGJ0BA7Sfo4=iGZLA@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
On 4 March 2013 15:31, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> Actually, your use case is already handled by the spec - just create multiple @font-face rules with the same name, and the browser will automatically combine them together into a single face. You may already know that this works with weight/style/etc, but it works with unicode-range too.

I tried this using an @import (to try and get some assurances about
ordering) and it had no effect:

    @import url(http://fonts.googleapis.com/css?family=Wendy+One);

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

I also tried it using the <script> that Google provides but,
independent of ordering of <style>/<link rel=stylesheet> and <script>,
the unicode-range was effectively ignored, so everything came out
using the "Wendy One" value for all characters.

Because I don't control the original @font-face, there's nothing I can
give for "src", which may be why the @import version fails? Hence the
problem. Is there something amiss with my attempt, perhaps? (It could
be a bit confusing to have the same name but wildly different
characters, but I'd be happy with it just working!)

As Simon said, if the CSS is fully controlled, I guess this isn't
really a problem. Although I agree it's also probably a fair bit of
complexity to add to CSS, it would be nice to have if it isn't
possible within the existing spec, especially since web fonts come
with licensing issues that are taken care of by third-parties like
Typekit and Google Web Fonts.
Received on Monday, 4 March 2013 18:16:08 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:27 UTC