css - How do you determine the correct local font names when preloading webfonts? -
this article: when web-fonts load , can pre-load them?, says use local take advantage of loaded fonts. can't find other way preload webfonts.
however, can't figure out names supposed use local references. in macosx multiple variants show same font name. e.g. think local("helvetica neue light") available in font book "helvetica neue"... how refer different variants?
@font-face { font-family: 'proximanova'; font-weight: normal; font-style: normal; src: url('/fonts/proximanova/proximanova-reg-webfont.eot'); src: local("proxima nova regular"), url('/fonts/proximanova/proximanova-reg-webfont.eot?#iefix') format('embedded-opentype'), url('/fonts/proximanova/proximanova-reg-webfont.woff') format('woff'), url('/fonts/proximanova/proximanova-reg-webfont.ttf') format('truetype'), url('/fonts/proximanova/proximanova-reg-webfont.svg#webfont') format('svg'); } @font-face { font-family: 'proximanova'; font-weight: $light_weight; font-style: normal; src: url('/fonts/proximanova/proximanova-light-webfont.eot'); src: url('/fonts/proximanova/proximanova-light-webfont.eot?#iefix') format('embedded-opentype'), url('/fonts/proximanova/proximanova-light-webfont.woff') format('woff'), url('/fonts/proximanova/proximanova-light-webfont.ttf') format('truetype'), url('/fonts/proximanova/proximanova-light-webfont.svg#webfont') format('svg'); }
all variations still result in requests woff files in chrome. additionally, can't find recent or current best practices on web fonts or how optimize performance, how can prevent these requests?
web fonts subject caching under normal rules, if user has visited page refers web font, copy cached browser may used when page visited , uses same url web font.
the use of local(...)
relates else, namely possibility font might exist in system installed font. depends on system settings , user actions; author, cannot make users’ systems install fonts.
technically, in local(...)
, should use name specific typeface (not font family), , name should either postscript name or full name of typeface. these names can found in names table of font corresponding nameid
values 6 , 4. find out such names, can use e.g. dtl otmaster light program.
but affect systems font installed. is, systems user has purchased , installed font.
Comments
Post a Comment