Last active
August 20, 2020 12:38
-
-
Save hiwelo/0c65e70a4c81a1862faa to your computer and use it in GitHub Desktop.
@font-face declarations for modern browsers
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 declaration for : | |
* - Internet Explorer >= 9.0 | |
* - Firefox >= 3.6 | |
* - Chrome >= 5 | |
* - Safari / iOS >= 5.1 | |
* - Opera >= 11.5 | |
* - Android >= 4.4 | |
* */ | |
@font-face { | |
font-family: Ma Typo; /* You can call this font in a font stack as "My Typo" or My Typo */ | |
font-style: normal; /* You can declare several @font-face with the same font-family and differents font-style */ | |
font-weight: 400; /* You can declare several @font-face with the same font-family and differents font-weight */ | |
src: local('matypo-regular'), /* PostScript file name for this font variant (i.e. SourceSansPro-Regular) */ | |
url('URL_TO_FILE.woff2') format('woff2'), | |
url('URL_TO_FILE.woff') format('woff'); | |
} | |
/** | |
* A bold variant, for example | |
* */ | |
@font-face { | |
font-family: Ma Typo; | |
font-style: normal; /* You can declare several @font-face with the same font-family and differents font-style */ | |
font-weight: 700; /* You can declare several @font-face with the same font-family and differents font-weight */ | |
src: local('matypo-bold'), /* PostScript file name, as exemple SourceSansPro-Semibold */ | |
url('URL_TO_FILE_BOLD.woff2') format('woff2'), | |
url('URL_TO_FILE_BOLD.woff') format('woff'); | |
} |
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 declaration for : | |
* - Internet Explorer >= 6.0 | |
* - Firefox >= 3.6 | |
* - Chrome >= 5 | |
* - Safari / iOS >= 5.1 | |
* - Opera >= 11.5 | |
* - Android >= 4.4 | |
* */ | |
@font-face { | |
font-family: Ma Typo; | |
font-style: normal; /* You can declare several @font-face with the same font-family and differents font-style */ | |
font-weight: 400; /* You can declare several @font-face with the same font-family and differents font-weight */ | |
src: local('matypo-regular'), /* PostScript file name, as exemple SourceSansPro-Regular */ | |
url('URL_TO_FILE.eot?') format('eot'), /* ? is a small IE fix */ | |
url('URL_TO_FILE.woff2') format('woff2'), | |
url('URL_TO_FILE.woff') format('woff'); | |
} | |
/** | |
* A bold variant, for example | |
* */ | |
@font-face { | |
font-family: Ma Typo; | |
font-style: normal; /* You can declare several @font-face with the same font-family and differents font-style */ | |
font-weight: 700; /* You can declare several @font-face with the same font-family and differents font-weight */ | |
src: local('matypo-semibold'), /* PostScript file name, as exemple SourceSansPro-Semibold */ | |
url('URL_TO_FILE_BOLD.eot?') format('eot'), /* ? is a small IE fix */ | |
url('URL_TO_FILE_BOLD.woff2') format('woff2'), | |
url('URL_TO_FILE_BOLD.woff') format('woff'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment