Got it. Thanks John.

Sent from my iPhone

On Sep 21, 2011, at 10:43 PM, John Daggett <jdagg...@mozilla.com> wrote:

> Tom Livingston wrote:
> 
>> Can I spec my fallback font stack on the body, like:
>> body{font-family: Arial, Helvetica, sans-serif;}
>> 
>> and then, on ONLY the elements that I wish to use a custom font, spec
>> JUST the custom font, like:
>> h1{font-family: 'HelveticaNeueW01-57Cn';}
>> and have the fallback work properly because of the body font-family
>> declaration?
>> 
>> Or do I have to spec the whole stack on each element, like:
>> h1{font-family: 'HelveticaNeueW01-57Cn',Arial,Helmet,Freesans,sans-serif;}
> 
> In this case, you need the whole stack, font stacks don't inherit this
> way (i.e. if lookup fails for a <h1> element, use the font stack of
> the containing element).
> 
> Depending upon what you want to do, you can handle some fallback like
> this using local() within the @font-face src descriptor:
> 
> /* use a downloadable font if a local version doesn't exist */
> @font-face {
>  font-family: Headline;
>  src: local(HelveticaNeueW01-57Cn), url(fonts/HelveticaNeueW01.woff);
> }
> 
> This doesn't include all the gluck needed to support IE versions
> before IE9, but you get the idea.
> 
> Cheers,
> 
> John Daggett
> Mozilla Japan
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to