I have posts that contain both English and Korean text within the same lines, for example:
This is an example (예시).
I frequently switch between the two languages.
Now, I want to use different fonts and font sizes for each language.
My usual way of accomplishing this is by using specific CSS blocks with lang(en)
and lang(ko)
tags in my HTML content like:
<p lang="en">This is an example (<span lang="ko">예시</span>)</p>
However, since I plan on writing my posts in Markdown and mixing the two languages frequently, I would like to minimize the need for such detailed HTML specifications.
I am aware that in CSS, if a font specified does not support a particular language, it automatically moves to the next one in priority. With this in mind, I wonder if there is a way to leverage this feature to change font sizes based on the language?
If you know of any other methods to achieve this, please share!
(I'm also curious if it's possible to use JavaScript to detect the font being used and adjust the font size accordingly only for the "Some Korean Font"?)