From 7822292beecff89224e2bb8dc5821d759dea428a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E6=B5=AA=E7=86=8A=E7=8C=AB=E5=84=BF?= Date: Tue, 1 Oct 2024 12:32:13 +0000 Subject: [PATCH] [11_36] Fix the render of centerdot in Chinese --- TeXmacs/tests/11_36.scm | 4 ++++ TeXmacs/tests/tmu/11_36.tmu | 28 ++++++++++++++++++++++++++++ src/Graphics/Fonts/smart_font.cpp | 1 + 3 files changed, 33 insertions(+) create mode 100644 TeXmacs/tests/11_36.scm create mode 100644 TeXmacs/tests/tmu/11_36.tmu diff --git a/TeXmacs/tests/11_36.scm b/TeXmacs/tests/11_36.scm new file mode 100644 index 000000000..771408e84 --- /dev/null +++ b/TeXmacs/tests/11_36.scm @@ -0,0 +1,4 @@ +(import (liii check)) + +(tm-define (test_11_36) + (check (utf8->cork "苏E·12F88") => "<#82CF>E12F88")) diff --git a/TeXmacs/tests/tmu/11_36.tmu b/TeXmacs/tests/tmu/11_36.tmu new file mode 100644 index 000000000..771059200 --- /dev/null +++ b/TeXmacs/tests/tmu/11_36.tmu @@ -0,0 +1,28 @@ +> + +> + +<\body> + This doc is in Chinese language: + + 马克\吐温 + + The following line is in English: + + 吐温> + + The typesetting of the english paragraph still follows the same rules of Chinese. + + In math formular: + + <\equation*> + A\B + + + +<\initial> + <\collection> + + + + diff --git a/src/Graphics/Fonts/smart_font.cpp b/src/Graphics/Fonts/smart_font.cpp index 2af75c25f..12f8bf90f 100644 --- a/src/Graphics/Fonts/smart_font.cpp +++ b/src/Graphics/Fonts/smart_font.cpp @@ -391,6 +391,7 @@ in_unicode_range (string c, string range) { "<#201C>", "<#201D>", // Chinese: 双引号 "<#2014>" // Chinese: 破折号的一半 ); + cjk_puncts << string (""); if (contains (c, cjk_puncts)) return true; } // There are actually two ranges (cjk/hangul) for Korean characters and