Created
March 24, 2012 21:29
-
-
Save cballou/2188227 to your computer and use it in GitHub Desktop.
CSS3 @font-face With Bold and Italic Support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* normal case */ | |
@font-face { | |
font-family: "DejaVu Sans"; | |
src: url(‘path-to-font-directory/DejaVuSans.eot’); | |
src: local(‘☺’), url("path-to-font-directory/DejaVuSans.ttf") format("truetype"); | |
} | |
/* bold */ | |
@font-face { | |
font-family: "DejaVu Sans"; | |
src: url(‘path-to-font-directory/DejaVuSans-Bold.eot’); | |
src: local(‘☺’), url("path-to-font-directory/DejaVuSans-Bold.ttf") format("truetype"); | |
font-weight: bold; | |
} | |
/* italic (oblique) */ | |
@font-face { | |
font-family: "DejaVu Sans"; | |
src: url(‘path-to-font-directory/DejaVuSans-Oblique.eot’); | |
src: local(‘☺’), url("path-to-font-directory/DejaVuSans-Oblique.ttf") format("truetype"); | |
font-style: italic, oblique; | |
} | |
/* bold and italic (oblique) */ | |
@font-face { | |
font-family: "DejaVu Sans"; | |
src: url(‘path-to-font-directory/DejaVuSans-BoldOblique.eot’); | |
src: local(‘☺’), url("path-to-font-directory/DejaVuSans-BoldOblique.ttf") format("truetype"); | |
font-weight: bold; | |
font-style: italic, oblique; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h3 { font: bold 18px/24px "DejaVu Sans"; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: "DejaVu Sans"; | |
src: url(‘path-to-font-directory/DejaVuSans.eot’); | |
src: local(‘☺’), url("path-to-font-directory/DejaVuSans.ttf") format("truetype"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: <a-remote-font-name>; | |
src: <source> [<format>][,<source> [<format>]]*; | |
[font-weight: <weight>]; | |
[font-style: <style>]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment