mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-08 04:28:41 +00:00
Add support for Latin-1, Cyrillic, and CJK characters inside \text{} (#508)
Summary: This diff provides support for Latin-1, Cyrillic, and CJK characters inside \text{} groups. For Latin-1 and Cyrillic characters we use glyph metrics from a glyph from Basic Latin that has roughly the same bounding box. We use the metrics for a capital 'M' to approximate the full-width CJK characters. Half-width characters are not supported yet. Test Plan: - make test - make screenshots Reviewers: emily
This commit is contained in:
BIN
test/screenshotter/images/Unicode-chrome.png
Normal file
BIN
test/screenshotter/images/Unicode-chrome.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
BIN
test/screenshotter/images/Unicode-firefox.png
Normal file
BIN
test/screenshotter/images/Unicode-firefox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
@@ -114,6 +114,7 @@ Symbols1: |
|
||||
\maltese\degree\pounds\$
|
||||
\text{\maltese\degree}
|
||||
Text: \frac{a}{b}\text{c~ {ab} \ e}+fg
|
||||
Unicode: \begin{matrix}\text{ÀàÇçÉéÏïÖöÛû} \\ \text{БГДЖЗЙЛФЦШЫЮЯ} \\ \text{여보세요} \\ \text{私はバナナです} \end{matrix}
|
||||
UnsupportedCmds:
|
||||
tex: \err\,\frac\fracerr3\,2^\superr_\suberr\,\sqrt\sqrterr
|
||||
noThrow: 1
|
||||
|
@@ -11,6 +11,20 @@
|
||||
body {
|
||||
font-family: "DejaVu Serif",serif;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Mincho";
|
||||
src: url("unicode-fonts/mincho/font_1_honokamin.ttf") format("truetype");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Batang";
|
||||
src: url("unicode-fonts/batang/batang.ttf") format("truetype");
|
||||
}
|
||||
.katex .cjk_fallback {
|
||||
font-family: "Mincho",serif;
|
||||
}
|
||||
.katex .hangul_fallback {
|
||||
font-family: "Batang",serif;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
Reference in New Issue
Block a user