css - Load different font for different languages in SCSS -
how utilize scss feature load different font based on different language using &:lang() in css? planning use way @ top scss file chain. think correct?
//default font-family it's not japan language @font-face { font-family: "xxx"; font-style: normal; font-weight: normal; src: url('xxx.eot'); src: local(xxx), url("xxx.eot?#iefix") format("embedded-opentype"), url("xxx.woff") format("woff"), url("xxx.ttf") format("truetype"), url("xxx.otf") format("opentype"), url("xxx.svg#xxx") format("svg"); } //if japanese html:lang(ja) { @font-face { font-family: "meiryo"; font-style: normal; font-weight: normal; src: url('meiryo.eot'); src: local(meiryo), url("meiryo.eot?#iefix") format("embedded-opentype"), url("meiryo.woff") format("woff"), url("meiryo.ttf") format("truetype"), url("meiryo.otf") format("opentype"), url("meiryo.svg#meiryo") format("svg"); } } edit: above code prints out without error. should have been bug scss
@font-face { html:lang(jp) { font-family: "meiryo"; .... } } edit: looks unicode range solution. i'd love know if have better solution. https://developer.mozilla.org/en-us/docs/web/css/@font-face/unicode-range
Comments
Post a Comment