css - Are font family names which contain hyphens identical to the same font names with spaces instead of hyphens? -


after poking around many stylesheets different websites, have consistently noticed font or font-family values used not appear use correct font-family names. wondering if don't understand how reference font family names used css.

for example, on this stylesheet, authors use following several times:

font-family:"minion-pro"; 

however, far google tells me, no such font family exists. example, if google following:

font minion-pro 

none of first several hits show "minion-pro", rather hits "minion" or "minion pro"; fifth hit this link, far understand css, requires user reference font as

font-family: "minion pro"; 

i have seen on stylesheets font "myriad pro" which, when google font myriad-pro, return hits font "myriad" , "myriad pro". is, in css stylesheets, have seen this

font-family: "myriad-pro"; 

but me, not correct, , should be

font-family: "myriad pro"; 

so simple question is: are fonts contain spaces able rendered if spaces replaced hyphens?

i believe answer "no" based on docs - cannot test because not have easy access these fonts , @ work right now. (when try codepenning "myriad pro" or "minion pro" nothing happens - fonts not recognized)

it depends on name font-family when create @font-face font definition serve font.

like this:

@font-face {     font-family: 'montserratregular';     src: url('/content/fonts/montserrat/montserrat-regular.eot');     src: url('/content/fonts/montserrat/montserrat-regular.eot?#iefix') format('embedded-opentype'),          url('/content/fonts/montserrat/montserrat-regular.woff2') format('woff2'),          url('/content/fonts/montserrat/montserrat-regular.woff') format('woff'),          url('/content/fonts/montserrat/montserrat-regular.ttf') format('truetype');     font-weight: normal;     font-style: normal; } 

in case reference font-family: 'montserratregular'; in css. if in @font-face declaration defined font-family: 'montserrat-regular'; or font-family: 'montserrat regular'; use in css.

in stylesheet linked author has @font-face declarations in separate css file defines minion pro "minion-pro", common.

other fonts don't serve client, system fonts, should referenced system font name. can use site css font stack see names , likelihood (in %) system font on windows or mac. provides common fallbacks fonts (i.e. this: font-family: 'myriad pro', 'myriad-pro', 'myriadpro', arial;).

a font myriad pro or minion pro don't ship installed system font default, thats why serve font client using @font-face approach. user install myraid pro on machine , system font, have know exact name , can't guarantee user has unique font or require users visit site manually install it.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -