Skip to content

Commit

Permalink
[11_36] Fix the render of centerdot in Chinese
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii committed Oct 1, 2024
1 parent 4378c09 commit 7822292
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
4 changes: 4 additions & 0 deletions TeXmacs/tests/11_36.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(import (liii check))

(tm-define (test_11_36)
(check (utf8->cork "苏E·12F88") => "<#82CF>E<centerdot>12F88"))
28 changes: 28 additions & 0 deletions TeXmacs/tests/tmu/11_36.tmu
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<TMU|<tuple|1.0.3|1.2.9.3-rc1>>

<style|<tuple|generic|chinese>>

<\body>
This doc is in Chinese language:

马克\<centerdot\>吐温

The following line is in English:

<english|马克\<centerdot\>吐温>

The typesetting of the english paragraph still follows the same rules of Chinese.

In math formular:

<\equation*>
A\<centerdot\>B
</equation*>
</body>

<\initial>
<\collection>
<associate|page-medium|paper>
<associate|page-screen-margin|false>
</collection>
</initial>
1 change: 1 addition & 0 deletions src/Graphics/Fonts/smart_font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ in_unicode_range (string c, string range) {
"<#201C>", "<#201D>", // Chinese: 双引号
"<#2014>" // Chinese: 破折号的一半
);
cjk_puncts << string ("<centerdot>");
if (contains (c, cjk_puncts)) return true;
}
// There are actually two ranges (cjk/hangul) for Korean characters and
Expand Down

0 comments on commit 7822292

Please sign in to comment.