// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. //== Font definitions. // /* Your use of the content in the files referenced here is subject to the terms of the license at http://aka.ms/fabric-assets-license */ // Produce @font-face definitions for the web fonts. @mixin ms-font-face($font-family-name, $cdn-folder, $cdn-font-name: "segoeui") { @font-face { font-family: $font-family-name; src: url("#{$ms-font-cdn-path}/#{$cdn-folder}/#{$cdn-font-name}-light.woff2") format("woff2"), url("#{$ms-font-cdn-path}/#{$cdn-folder}/#{$cdn-font-name}-light.woff") format("woff"); font-weight: $ms-font-weight-light; font-style: normal; } @font-face { font-family: $font-family-name; src: url("#{$ms-font-cdn-path}/#{$cdn-folder}/#{$cdn-font-name}-semilight.woff2") format("woff2"), url("#{$ms-font-cdn-path}/#{$cdn-folder}/#{$cdn-font-name}-semilight.woff") format("woff"); font-weight: $ms-font-weight-semilight; font-style: normal; } @font-face { font-family: $font-family-name; src: url("#{$ms-font-cdn-path}/#{$cdn-folder}/#{$cdn-font-name}-regular.woff2") format("woff2"), url("#{$ms-font-cdn-path}/#{$cdn-folder}/#{$cdn-font-name}-regular.woff") format("woff"); font-weight: $ms-font-weight-regular; font-style: normal; } @font-face { font-family: $font-family-name; src: url("#{$ms-font-cdn-path}/#{$cdn-folder}/#{$cdn-font-name}-semibold.woff2") format("woff2"), url("#{$ms-font-cdn-path}/#{$cdn-folder}/#{$cdn-font-name}-semibold.woff") format("woff"); font-weight: $ms-font-weight-semibold; font-style: normal; } @font-face { font-family: $font-family-name; src: url("#{$ms-font-cdn-path}/#{$cdn-folder}/#{$cdn-font-name}-bold.woff2") format("woff2"), url("#{$ms-font-cdn-path}/#{$cdn-folder}/#{$cdn-font-name}-bold.woff") format("woff"); font-weight: $ms-font-weight-bold; font-style: normal; } } // Generate overrides to set font-family based on the lang attribute. @mixin ms-font-family-language-override($language-code, $font-family) { *[lang^="#{$language-code}"] .ms-Fabric, .ms-Fabric *[lang^="#{$language-code}"], .ms-Fabric[lang^="#{$language-code}"] { font-family: $font-family; } } //== Font weight. // @mixin ms-fontWeight-regular { font-weight: $ms-font-weight-regular; } @mixin ms-fontWeight-semibold { font-weight: $ms-font-weight-semibold; } @mixin ms-fontWeight-bold { font-weight: $ms-font-weight-bold; } //== Font size. // @mixin ms-fontSize-68 { font-size: $ms-font-size-68; } @mixin ms-fontSize-42 { font-size: $ms-font-size-42; } @mixin ms-fontSize-32 { font-size: $ms-font-size-32; } @mixin ms-fontSize-28 { font-size: $ms-font-size-28; } @mixin ms-fontSize-24 { font-size: $ms-font-size-24; } @mixin ms-fontSize-20 { font-size: $ms-font-size-20; } @mixin ms-fontSize-18 { font-size: $ms-font-size-18; } @mixin ms-fontSize-16 { font-size: $ms-font-size-16; } @mixin ms-fontSize-14 { font-size: $ms-font-size-14; } @mixin ms-fontSize-12 { font-size: $ms-font-size-12; } @mixin ms-fontSize-10 { font-size: $ms-font-size-10; } // Deprecated MDL2 font mixins. @import "./Font.Mixins.MDL2";