Last active
November 2, 2020 08:51
-
-
Save zhengkai/b350553e348ce3b310d710efee5993cb to your computer and use it in GitHub Desktop.
JetBrains Mono WebFont CSS
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
/* | |
* for JetBrains Mono v2.200 | |
* | |
* font url: https://github.com/JetBrains/JetBrainsMono/tree/master/fonts/webfonts | |
*/ | |
@font-face { | |
font-family: 'JetBrains Mono'; | |
src: local('JetBrainsMono Thin'), local('JetBrainsMono-Thin'), url('/fonts/JetBrainsMono-Thin.woff2') format('woff2'); | |
font-weight: 100; | |
font-style: normal; | |
} | |
@font-face { | |
font-family: 'JetBrains Mono'; | |
src: local('JetBrainsMono Thin Italic'), local('JetBrainsMono-Thin-Italic'), url('/fonts/JetBrainsMono-ThinItalic.woff2') format('woff2'); | |
font-weight: 100; | |
font-style: italic; | |
} | |
@font-face { | |
font-family: 'JetBrains Mono'; | |
src: local('JetBrainsMono ExtraLight'), local('JetBrainsMono-ExtraLight'), url('/fonts/JetBrainsMono-ExtraLight.woff2') format('woff2'); | |
font-weight: 200; | |
font-style: normal; | |
} | |
@font-face { | |
font-family: 'JetBrains Mono'; | |
src: local('JetBrainsMono ExtraLight Italic'), local('JetBrainsMono-ExtraLight-Italic'), url('/fonts/JetBrainsMono-ExtraLightItalic.woff2') format('woff2'); | |
font-weight: 200; | |
font-style: italic; | |
} | |
@font-face { | |
font-family: 'JetBrains Mono'; | |
src: local('JetBrainsMono Light'), local('JetBrainsMono-Light'), url('/fonts/JetBrainsMono-Light.woff2') format('woff2'); | |
font-weight: 300; | |
font-style: normal; | |
} | |
@font-face { | |
font-family: 'JetBrains Mono'; | |
src: local('JetBrainsMono Light Italic'), local('JetBrainsMono-Light-Italic'), url('/fonts/JetBrainsMono-LightItalic.woff2') format('woff2'); | |
font-weight: 300; | |
font-style: italic; | |
} | |
@font-face { | |
font-family: 'JetBrains Mono'; | |
src: local('JetBrainsMono Regular'), local('JetBrainsMono-Regular'), url('/fonts/JetBrainsMono-Regular.woff2') format('woff2'); | |
font-weight: 400; | |
font-style: normal; | |
} | |
@font-face { | |
font-family: 'JetBrains Mono'; | |
src: local('JetBrainsMono Italic Italic'), local('JetBrainsMono-Italic-Italic'), url('/fonts/JetBrainsMono-ItalicItalic.woff2') format('woff2'); | |
font-weight: 400; | |
font-style: italic; | |
} | |
@font-face { | |
font-family: 'JetBrains Mono'; | |
src: local('JetBrainsMono Medium'), local('JetBrainsMono-Medium'), url('/fonts/JetBrainsMono-Medium.woff2') format('woff2'); | |
font-weight: 500; | |
font-style: normal; | |
} | |
@font-face { | |
font-family: 'JetBrains Mono'; | |
src: local('JetBrainsMono Medium Italic'), local('JetBrainsMono-Medium-Italic'), url('/fonts/JetBrainsMono-MediumItalic.woff2') format('woff2'); | |
font-weight: 500; | |
font-style: italic; | |
} | |
@font-face { | |
font-family: 'JetBrains Mono'; | |
src: local('JetBrainsMono ExtraBold'), local('JetBrainsMono-ExtraBold'), url('/fonts/JetBrainsMono-ExtraBold.woff2') format('woff2'); | |
font-weight: 700; | |
font-style: normal; | |
} | |
@font-face { | |
font-family: 'JetBrains Mono'; | |
src: local('JetBrainsMono ExtraBold Italic'), local('JetBrainsMono-ExtraBold-Italic'), url('/fonts/JetBrainsMono-ExtraBoldItalic.woff2') format('woff2'); | |
font-weight: 700; | |
font-style: italic; | |
} | |
@font-face { | |
font-family: 'JetBrains Mono'; | |
src: local('JetBrainsMono ExtraBold'), local('JetBrainsMono-ExtraBold'), url('/fonts/JetBrainsMono-ExtraBold.woff2') format('woff2'); | |
font-weight: 900; | |
font-style: normal; | |
} | |
@font-face { | |
font-family: 'JetBrains Mono'; | |
src: local('JetBrainsMono ExtraBold Italic'), local('JetBrainsMono-ExtraBold-Italic'), url('/fonts/JetBrainsMono-ExtraBoldItalic.woff2') format('woff2'); | |
font-weight: 900; | |
font-style: italic; | |
} |
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
/* | |
* for JetBrains Mono v2.200 | |
* | |
* font url: https://github.com/JetBrains/JetBrainsMono/tree/master/fonts/webfonts | |
*/ | |
$path: "/fonts"; | |
$list: | |
( | |
"name": "Thin", | |
"weight": 100, | |
), | |
( | |
"name": "ExtraLight", | |
"weight": 200, | |
), | |
( | |
"name": "Light", | |
"weight": 300, | |
), | |
( | |
"name": "Regular", | |
"weight": 400, | |
), | |
( | |
"name": "Medium", | |
"weight": 500, | |
), | |
( | |
"name": "ExtraBold", | |
"weight": 700, | |
), | |
( | |
"name": "ExtraBold", | |
"weight": 900, | |
); | |
@each $v in $list { | |
@each $i in false, true { | |
$name: map-get($v, "name"); | |
$style: normal; | |
$italic: ""; | |
$italicSpace: ""; | |
$italicSuffix: ""; | |
@if $i { | |
$style: italic; | |
@if $name == "Regular" { | |
$name: "Italic"; | |
} else { | |
$italic: "Italic"; | |
$italicSuffix: "-Italic"; | |
$italicSpace: " Italic"; | |
} | |
} | |
@font-face { | |
font-family: "JetBrains Mono"; | |
src: local("JetBrainsMono #{$name}#{$italicSpace}"), local("JetBrainsMono-#{$name}#{$italicSuffix}"), | |
url("#{$path}/JetBrainsMono-#{$name}#{$italic}.woff2") format("woff2"); | |
font-weight: map-get($v, "weight"); | |
font-style: $style; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment