Setting different fonts by language in CSS
I recently came across a Korean font called Spoqa Han Sans. It attracted me due to its simplicity and readability. However, I didn't like its English glyph (based on Noto Sans, which I didn't love to death.)
After a while, I figured out how to define a language range for each font. While importing a font face, we need to add unicode-range
.
@font-face {
font-family: 'Spoqa Han Sans';
/* Omitted */
unicode-range: U+AC00-D7AF;
}
U+AC00-D7AF
is the Unicode range of Korean glyphs.
Can't find @font-face
?
We add either of the following statements to define a font in most cases.
<link href="//spoqa.github.io/spoqa-han-sans/css/SpoqaHanSans-kr.css" rel="stylesheet" type="text/css" />
@import url(//spoqa.github.io/spoqa-han-sans/css/SpoqaHanSans-kr.css);