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

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