Take a look at this open-type font:
http://www.fontsquirrel.com/fonts/QuicksandNotice how the last "style" in the font family is "dashed". How do you build an @font-face declaration in your css to accomodate for odd styles such as these? I tried declaring it as the font style for that typeface, but it doesn't work as it should:
@font-face {
font-family: 'Quicksand';
src: url('../mixins/font-face/fonts/Quicksand/Quicksand_Bold-webfont.eot');
src: url('../mixins/font-face/fonts/Quicksand/Quicksand_Bold-webfont.eot?#iefix') format('embedded-opentype'),
url('../mixins/font-face/fonts/Quicksand/Quicksand_Bold-webfont.woff') format('woff'),
url('../mixins/font-face/fonts/Quicksand/Quicksand_Bold-webfont.ttf') format('truetype'),
url('../mixins/font-face/fonts/Quicksand/Quicksand_Bold-webfont.svg#QuicksandBold') format('svg');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'Quicksand';
src: url('../mixins/font-face/fonts/Quicksand/Quicksand_Dash-webfont.eot');
src: url('../mixins/font-face/fonts/Quicksand/Quicksand_Dash-webfont.eot?#iefix') format('embedded-opentype'),
url('../mixins/font-face/fonts/Quicksand/Quicksand_Dash-webfont.woff') format('woff'),
url('../mixins/font-face/fonts/Quicksand/Quicksand_Dash-webfont.ttf') format('truetype'),
url('../mixins/font-face/fonts/Quicksand/Quicksand_Dash-webfont.svg#QuicksandDash') format('svg');
font-weight: normal;
font-style: dashed;
}
@font-face {
font-family: 'Quicksand';
src: url('../mixins/font-face/fonts/Quicksand/Quicksand_Light_Oblique-webfont.eot');
src: url('../mixins/font-face/fonts/Quicksand/Quicksand_Light_Oblique-webfont.eot?#iefix') format('embedded-opentype'),
url('../mixins/font-face/fonts/Quicksand/Quicksand_Light_Oblique-webfont.woff') format('woff'),
url('../mixins/font-face/fonts/Quicksand/Quicksand_Light_Oblique-webfont.ttf') format('truetype'),
url('../mixins/font-face/fonts/Quicksand/Quicksand_Light_Oblique-webfont.svg#QuicksandLightOblique') format('svg');
font-weight: lighter;
font-style: italic;
}
- @font-face {
- font-family: 'Quicksand';
- src: url('../mixins/font-face/fonts/Quicksand/Quicksand_Bold-webfont.eot');
- src: url('../mixins/font-face/fonts/Quicksand/Quicksand_Bold-webfont.eot?#iefix') format('embedded-opentype'),
- url('../mixins/font-face/fonts/Quicksand/Quicksand_Bold-webfont.woff') format('woff'),
- url('../mixins/font-face/fonts/Quicksand/Quicksand_Bold-webfont.ttf') format('truetype'),
- url('../mixins/font-face/fonts/Quicksand/Quicksand_Bold-webfont.svg#QuicksandBold') format('svg');
- font-weight: bold;
- font-style: normal;
- }
-
- @font-face {
- font-family: 'Quicksand';
- src: url('../mixins/font-face/fonts/Quicksand/Quicksand_Dash-webfont.eot');
- src: url('../mixins/font-face/fonts/Quicksand/Quicksand_Dash-webfont.eot?#iefix') format('embedded-opentype'),
- url('../mixins/font-face/fonts/Quicksand/Quicksand_Dash-webfont.woff') format('woff'),
- url('../mixins/font-face/fonts/Quicksand/Quicksand_Dash-webfont.ttf') format('truetype'),
- url('../mixins/font-face/fonts/Quicksand/Quicksand_Dash-webfont.svg#QuicksandDash') format('svg');
- font-weight: normal;
- font-style: dashed;
- }
-
- @font-face {
- font-family: 'Quicksand';
- src: url('../mixins/font-face/fonts/Quicksand/Quicksand_Light_Oblique-webfont.eot');
- src: url('../mixins/font-face/fonts/Quicksand/Quicksand_Light_Oblique-webfont.eot?#iefix') format('embedded-opentype'),
- url('../mixins/font-face/fonts/Quicksand/Quicksand_Light_Oblique-webfont.woff') format('woff'),
- url('../mixins/font-face/fonts/Quicksand/Quicksand_Light_Oblique-webfont.ttf') format('truetype'),
- url('../mixins/font-face/fonts/Quicksand/Quicksand_Light_Oblique-webfont.svg#QuicksandLightOblique') format('svg');
- font-weight: lighter;
- font-style: italic;
- }
-
This doesn't work as you would expect (more than likely because "dashed" in not a valid value for font-style). If I try to use any other style of the font, the "dashed" version is always displayed:
p {
font-family: Quicksand;
font-style: normal;
}
- p {
- font-family: Quicksand;
- font-style: normal;
- }
-
This ends up displaying the "dashed" style on all paragraphs. So is there a valid way (or
any) way to get css to recognize this font style?
This is obviously just an example case, but other problems arise with different fonts. For instance,
Alfredo Has 2 examples that wouldn't be accessible. The Alfredo font has a "Heavy" version. That's easy enough to define, but what about "Hollow", "Condensed", "Expanded", or "Wide"? Can't really define those as subsets of a font-family - you would have to define each one as a new font-face declaration under a new font-family name.
Use your words like arrows to shoot toward your goal.