Re: multiple values for FONT similar to font-family

23.01.2015, 01:02, "Tab Atkins Jr." <jackalmage@gmail.com>:
> On Thu, Jan 22, 2015 at 11:40 AM, Marat Tanalin <mtanalin@yandex.ru> wrote:
>> š22.01.2015, 22:14, "Tab Atkins Jr." <jackalmage@gmail.com>:
>>> šUsually, when you're dealing with fonts that are
>>> š"different size" when given the same font-size, what you're trying to
>>> šdo is match up the "x-height", as that is an important visual cue when
>>> šreading, and it disturbs our eyes to see it change within a line.
>>> šfont-size-adjust does does for you automatically.
>> šA common issue with using downloadable fonts is that they may be much _narrower_ (horizontally, height has nothing to do with this) than default OS fonts, and this difference in character width may break page layout (e.g. if a horizontal menu uses {display: table} and close-packed arrangement of words in conjunction with a narrow downloadable nonstandard font).
>
> One should be careful when choosing fallback fonts to find ones that
> are similar in appearance, and be careful when designing a page to
> make your layout robust enough to accommodate font differences
> (particularly as users may have forced the font-size to be larger than
> you originally designed the page with).

It's not always possible.

"In theory, there is no difference between theory and practice. But, in practice, there is." (Jan L. A. van de Snepscheut)

>> šWhat would probably be a real solution is to have in CSS something like Font Loading API in JS:
>>
>> šhttp://www.w3.org/TR/css-font-loading/
>
> That's called "the @font-face rule".

So how exactly the @font-face rule allows to apply different styles depending on what exact font is available and applied?

Received on Thursday, 22 January 2015 22:18:11 UTC