From 0a6343201f7841263da8ca67b75642d6d2fe32dd Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 15 Nov 2026 13:30:02 -0800 Subject: [PATCH] Tests: the repeat mark test font maps the combining voicing mark MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test font mapped ゝ, ゞ, ヽ and ヾ but not U+3099, so the cluster ゝ U+3099 went to the first fallback face that has both characters. Built with craft-fonts, that is a Japanese face, which drew the voiced mark with its own glyph, and kurikaeshi_moji_shori_draws_a_decomposed_voiced_mark_voiced failed. The font now maps U+3099, so the cluster is shaped in the test font with or without craft-fonts. --- crates/text/src/test_fonts.rs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/crates/text/src/test_fonts.rs b/crates/text/src/test_fonts.rs index 4a4297c33a..63b85194b2 100644 --- a/crates/text/src/test_fonts.rs +++ b/crates/text/src/test_fonts.rs @@ -488,9 +488,23 @@ pub fn full_width_font() -> Option> { pub const REPEAT_MARK_FAMILY: &str = "Repeattest Sans"; /// The Japanese characters [`repeat_mark_font`] maps, each to the glyph of the Latin capital beside -/// it: an ideograph, the repeat marks, and kana with and without their voicing marks. -pub const REPEAT_MARK_CHARS: [(char, char); 11] = - [('時', 'A'), ('々', 'B'), ('す', 'C'), ('ず', 'D'), ('ゝ', 'E'), ('ゞ', 'F'), ('サ', 'G'), ('ザ', 'H'), ('ヽ', 'I'), ('ヾ', 'J'), ('あ', 'K')]; +/// it: an ideograph, the repeat marks, kana with and without their voicing marks, and the combining +/// voicing mark (U+3099), so that a repeat mark followed by it is shaped in this font and not in a +/// fallback font that also has both characters (craft-fonts' Japanese faces). +pub const REPEAT_MARK_CHARS: [(char, char); 12] = [ + ('時', 'A'), + ('々', 'B'), + ('す', 'C'), + ('ず', 'D'), + ('ゝ', 'E'), + ('ゞ', 'F'), + ('サ', 'G'), + ('ザ', 'H'), + ('ヽ', 'I'), + ('ヾ', 'J'), + ('あ', 'K'), + ('\u{3099}', 'L'), +]; /// A test-only cmap over bundled Source Sans 3: each of [`REPEAT_MARK_CHARS`] uses the glyph of its /// Latin capital, so the glyph drawn for a repeat mark tells which character was drawn; the space