diff --git a/crates/text/src/fontdb.rs b/crates/text/src/fontdb.rs index bcf6716f1..23691e9ba 100644 --- a/crates/text/src/fontdb.rs +++ b/crates/text/src/fontdb.rs @@ -500,47 +500,11 @@ pub const THAI_FAMILIES: &[&str] = &[ "Garuda", ]; -/// Installed sans-serif families tried first for Chinese characters the font in use lacks, so that -/// Han next to Hangul (which only these cover) is not set in the bundled Mincho (#2491). -const HAN_SANS_FAMILIES: &[&str] = &[ - "PingFang SC", - "Hiragino Sans", - "Hiragino Kaku Gothic ProN", - "Microsoft YaHei", - "Yu Gothic", - "Noto Sans CJK SC", - "Noto Sans CJK JP", - "Noto Sans SC", - "Noto Sans JP", - "Source Han Sans", -]; - -/// The same for kana: the Japanese families first. -const KANA_SANS_FAMILIES: &[&str] = &[ - "Hiragino Sans", - "Hiragino Kaku Gothic ProN", - "Yu Gothic", - "Noto Sans CJK JP", - "Noto Sans JP", - "Source Han Sans", - "PingFang SC", - "Microsoft YaHei", - "Noto Sans CJK SC", -]; - /// The families tried first for character `c`, in a script whose text only fonts made for it set -/// well (Thai, Lao, Khmer, Myanmar), or that is set in an installed sans-serif rather than the -/// bundled Mincho (Han, kana, CJK punctuation); none for other characters. When none of the -/// families is installed the loaded fonts are used, the Mincho among them. +/// well (Thai, Lao, Khmer, Myanmar); none for other characters. fn script_families(c: char) -> &'static [&'static str] { use unicode_script::{Script, UnicodeScript}; - if matches!(c, '\u{3000}'..='\u{303F}' | '\u{FF00}'..='\u{FFEF}') { - // Punctuation is set the Japanese way (the corner brackets sit by the line's start). - return KANA_SANS_FAMILIES; - } match c.script() { - Script::Han | Script::Bopomofo => HAN_SANS_FAMILIES, - Script::Hiragana | Script::Katakana => KANA_SANS_FAMILIES, Script::Thai => THAI_FAMILIES, Script::Lao => &["Lao UI", "Leelawadee UI", "Lao Sangam MN", "Noto Sans Lao", "Noto Sans Lao UI", "Phetsarath OT"], Script::Khmer => &["Khmer UI", "Khmer Sangam MN", "Noto Sans Khmer", "Noto Sans Khmer UI", "Khmer OS"], diff --git a/docs/type-parity.md b/docs/type-parity.md index e9379ad6d..b79b7776b 100644 --- a/docs/type-parity.md +++ b/docs/type-parity.md @@ -32,7 +32,7 @@ against Illustrator's public documentation; **estimated** unless noted. | Missing glyphs set in an installed font made for their script (Thai, Lao, Khmer, Myanmar first; then any font that has them) | done | Thai: Leelawadee UI, Tahoma, Thonburi, Sukhumvit Set, Noto Sans Thai, TLWG | | Full font-name matching (OpenType name ID 4) | done | #1258: loaded/cataloged faces and Missing Fonts searches; localized names and variable default faces; Windows font-service QA pending | | Variable fonts | partial | named instances as styles; Character panel › Variable Font sets each axis (`fontAxes`); the font menu's Variable filter is missing | -| Fallback glyphs keep the text's weight and slant; Han, kana and CJK punctuation prefer an installed sans over the bundled Mincho | done | #2491: a character from a fallback face is set in that family's face nearest the run's weight and slant; Bold Italic of a missing family is drawn Bold (Source Sans 3 has no Bold Italic) rather than Italic; Han: PingFang SC, Hiragino Sans, Microsoft YaHei, Yu Gothic, Noto Sans CJK SC/JP, Source Han Sans; kana and CJK punctuation: the Japanese families first; the bundled Mincho stays when none is installed; no synthesized bold or italic yet | +| Fallback glyphs keep the text's weight and slant | done | #2491: a character from a fallback face is set in that family's face nearest the run's weight and slant; Bold Italic of a missing family is drawn Bold (Source Sans 3 has no Bold Italic) rather than Italic | | Colour fonts (OpenType SVG / COLR) | partial | | | Every-line and Single-line composers | done | tuned by eye, never compared side by side | | Optical Margin Alignment | done | Type › Optical Margin Alignment, `type.opticalMarginAlignment`: per type object, in point and area type of left-to-right paragraphs; type on a path and right-to-left paragraphs do not hang | @@ -82,7 +82,7 @@ Character Styles menu New/Redefine and footer New capture the first selected cha | 2026-10-13 | minor | Fit Headline no longer pushes the tracking to its ceiling and loses glyphs when the frame holds one line (#1445, fixes #1444); text frames, wrap shapes and type paths with coordinates beyond a billion points hold no text, and layout limits its search for room, instead of hanging (#1451); scores and hours unchanged | | 2026-10-12 | minor | Character styles retain explicit Auto leading, propagate resets and preserve local leading overrides; scores and hours unchanged | | 2026-10-12 | minor | A character no installed font had is looked for again after the fonts are rescanned, so installing a font fixes it without a restart (#1376, from #992); scores and hours unchanged | -| 2026-10-16 | minor | Fallback glyphs keep the text's weight and slant; Bold Italic of a missing family keeps the bold; Han and kana prefer an installed sans over the bundled Mincho (#2491); scores and hours unchanged | +| 2026-10-16 | minor | Fallback glyphs keep the text's weight and slant; Bold Italic of a missing family keeps the bold (#2491); scores and hours unchanged | | 2026-10-16 | minor | A variable font whose name table says Light but whose default instance is Regular (Noto Sans Hebrew) lists and weighs its default face as Regular (#2521); scores and hours unchanged | | 2026-10-12 | minor | Full-name font matching and Missing Fonts searches (#1258): synthetic static/variable font regressions; Windows font-service QA pending; scores and hours unchanged | | 2026-10-11 | minor | Middle Eastern: digit types done (Character panel menu › Digits: Default, Arabic, Hindi, Farsi; `text.setFormat` / `text.setRangeStyle {digits}`); Character Direction, kashidas, composers and the split caret still missing; scores unchanged at this rounding |