css - Define one font face for several font files with different weight -
i came across issue using custom fonts. many offer several files support different font weights , italics, define font face like:
@font-face { font-family: 'webfont bold'; src: url('myfont.woff') format('woff'), /* chrome 6+, firefox 3.6+, ie 9+, safari 5.1+ */ url('myfont.ttf') format('truetype'); /* chrome 4+, firefox 3.5, opera 10+, safari 3—5 */ }
where bold replaced different font specific words italic or light. wondering possible define 1 font face use specific font, bold if somewhere in css font-weight: bold;
set?
the correct way this:
@font-face { font-family: 'webfont'; src: url('myfont_regular.woff').... } @font-face { font-family: 'webfont'; font-weight: bold; src: url('myfont_bold.woff').... }
Comments
Post a Comment