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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -