diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/web/static/src/scss/fonts.scss | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/web/static/src/scss/fonts.scss')
| -rw-r--r-- | addons/web/static/src/scss/fonts.scss | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/addons/web/static/src/scss/fonts.scss b/addons/web/static/src/scss/fonts.scss new file mode 100644 index 00000000..26996d89 --- /dev/null +++ b/addons/web/static/src/scss/fonts.scss @@ -0,0 +1,91 @@ +// ------------------------------------------------------------------ +// Lato +// ------------------------------------------------------------------ +$lato-font-path: '../fonts/lato'; + +@mixin lato-font($type, $weight, $style) { + // Cyrillic: U+0400-04FF, U+0500-052F + @font-face { + font-family: 'Odoo Unicode Support Noto'; + src: url('https://fonts.odoocdn.com/fonts/noto/NotoSans-#{$type}.woff2') format('woff2'), + url('https://fonts.odoocdn.com/fonts/noto/NotoSans-#{$type}.woff') format('woff'), + url('https://fonts.odoocdn.com/fonts/noto/NotoSans-#{$type}.ttf') format('truetype'); + font-weight: $weight; + font-style: $style; + unicode-range: U+0400-04FF, U+0500-052F; + } + // Hebrew: U+0590-05FF, U+FB1D-FB4F + @font-face { + font-family: 'Odoo Unicode Support Noto'; + src: url('https://fonts.odoocdn.com/fonts/noto/NotoSansHebrew-#{$type}.woff2') format('woff2'), + url('https://fonts.odoocdn.com/fonts/noto/NotoSansHebrew-#{$type}.woff') format('woff'), + url('https://fonts.odoocdn.com/fonts/noto/NotoSansHebrew-#{$type}.ttf') format('truetype'); + font-weight: $weight; + font-style: $style; + unicode-range: U+0590-05FF, U+FB1D-FB4F; + } + // Arabic: U+0600-06FF, U+0750-077F + @font-face { + font-family: 'Odoo Unicode Support Noto'; + src: url('https://fonts.odoocdn.com/fonts/noto/NotoSansArabic-#{$type}.woff2') format('woff2'), + url('https://fonts.odoocdn.com/fonts/noto/NotoSansArabic-#{$type}.woff') format('woff'), + url('https://fonts.odoocdn.com/fonts/noto/NotoSansArabic-#{$type}.ttf') format('truetype'); + font-weight: $weight; + font-style: $style; + unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF; + } + + @font-face { + font-family: 'Lato'; + src: url('#{$lato-font-path}/Lato-#{$type}-webfont.eot'); + src: url('#{$lato-font-path}/Lato-#{$type}-webfont.eot?#iefix') format('embedded-opentype'), + url('#{$lato-font-path}/Lato-#{$type}-webfont.woff') format('woff'), + url('#{$lato-font-path}/Lato-#{$type}-webfont.ttf') format('truetype'), + url('#{$lato-font-path}/Lato-#{$type}-webfont.svg#Lato') format('svg'); + font-weight: $weight; + font-style: $style; + } + @font-face { + font-family: 'Lato-#{$type}'; + src: url('#{$lato-font-path}/Lato-#{$type}-webfont.eot'); + src: url('#{$lato-font-path}/Lato-#{$type}-webfont.eot?#iefix') format('embedded-opentype'), + url('#{$lato-font-path}/Lato-#{$type}-webfont.woff') format('woff'), + url('#{$lato-font-path}/Lato-#{$type}-webfont.ttf') format('truetype'), + url('#{$lato-font-path}/Lato-#{$type}-webfont.svg#Roboto') format('svg'); + } +} + +@mixin lato-font-pair($type, $weight) { + @include lato-font('#{$type}', $weight, normal); + @include lato-font('#{$type}Ita', $weight, italic); +} + +@include lato-font-pair('Hai', 100); +@include lato-font-pair('Lig', 300); +@include lato-font-pair('Reg', 400); +@include lato-font-pair('Bol', 700); +@include lato-font-pair('Bla', 900); + +// ------------------------------------------------------------------ +// Google fonts +// ------------------------------------------------------------------ +$google-font-path: '../fonts/google'; + +@mixin google-font($family, $type, $weight, $style) { + @font-face { + font-family: $family; + src: url('#{$google-font-path}/#{$family}/#{$family}-#{$type}.ttf') format('truetype'); + font-weight: $weight; + font-style: $style; + } +} + +@mixin google-font-pair($family) { + @include google-font('#{$family}', 'Regular', 400, normal); +} + +@include google-font-pair('Montserrat'); +@include google-font-pair('Open_Sans'); +@include google-font-pair('Oswald'); +@include google-font-pair('Raleway'); +@include google-font-pair('Roboto'); |
