diff --git a/devel/212_3.md b/devel/212_3.md new file mode 100644 index 0000000000..1cd410ae24 --- /dev/null +++ b/devel/212_3.md @@ -0,0 +1,11 @@ +# 212_3 修复非emoji的unicode符号导出失败的问题 + +## 如何测试 +打开`TeXmacs/tests/tmu/206_19.tmu`这个文档,导出pdf和文档一致而不是 ☒。 + +## 2026/02/24 +### What +修复非emoji的unicode符号(如 ♤♡♢♧ ♠♥♦♣)导出pdf时变为 ☒ + +### Why +普通文本字体(比如 NotoSerif)里的符号被误套 emoji 处理而导出异常。 diff --git a/src/Plugins/Freetype/tt_face.cpp b/src/Plugins/Freetype/tt_face.cpp index d36d72682f..3cf9ae5cf2 100644 --- a/src/Plugins/Freetype/tt_face.cpp +++ b/src/Plugins/Freetype/tt_face.cpp @@ -164,7 +164,7 @@ tt_font_metric_rep::get (int i) { SI ll = tt_si (slot->metrics.horiAdvance); (void) xw; - bool is_emoji= is_emoji_character (i); + bool is_emoji= !is_nil (face->cbdt_table) && is_emoji_character (i); if (is_emoji) { // For PNG fonts (CBDT), apply scaling factor to make them scalable @@ -332,7 +332,7 @@ tt_font_glyphs_rep::get (int i) { } // Handle emoji characters - bool is_emoji= is_emoji_character (i); + bool is_emoji= !is_nil (face->cbdt_table) && is_emoji_character (i); if (is_emoji) { SI ll= tt_si (slot->metrics.horiAdvance);