Skip to content

DesignCraft: An open-source page and layout design editor written by scratch in pure Rust

Text: locale-coded language names (de_DE_2006) get their language

aiongg99f1e653f288
diff --git a/ROADMAP.md b/ROADMAP.md
index bb0c088f8..d871905c9 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -88,7 +88,7 @@ DesignCraft aims at full Adobe InDesign parity — and to be better: faster, ope
- Edit ▸ Menus (`window.hideMenuItem`): hide menu items; menus with hidden items end in Show All Menu Items.
- View ▸ Separations Preview (`view.separations`): one process plate as ink density, or areas over an ink limit in red (a GCR preview of the rendered view; spot plates and the flattener preview aren't there).
- Separations Preview plates now come from each object's own colour (CMYK as authored; RGB and images through the colour settings, images via a cached 17³ table), so pure black shows only on the black plate.
-- Language (Character panel ▸ Language, `type.char {language}`): text in other languages isn't hyphenated or spell-checked with the English dictionaries, typographer's quotes follow the language (German „…“, French and Russian «…», Swiss, Spanish, Dutch, Nordic, Japanese and Traditional Chinese 「…」, Simplified Chinese “…”), the font's localized forms (OpenType `locl`: Turkish i, Bulgarian Cyrillic, Japanese / Chinese / Korean glyph variants) follow it too, and so does the fallback for CJK characters the font lacks (with Draw Missing Glyphs from Fallback Fonts on): Japanese, Simplified Chinese, Traditional Chinese and Korean each try their own installed system fonts (Japanese starts with the craft-fonts Japanese faces, Mincho first, when built with them; Hangul, kana and Bopomofo pick their language's fonts whatever the language). Language names from IDML keep their spelling; Chinese, Japanese and Korean are recognised in their common spellings and locale codes ("Simplified Chinese", "Chinese (Traditional)", `zh_CN`, `zh-Hant`, `ja_JP`, `ko-KR`). Hyphenation dictionaries for other languages aren't bundled yet.
+- Language (Character panel ▸ Language, `type.char {language}`): text in other languages isn't hyphenated or spell-checked with the English dictionaries, typographer's quotes follow the language (German „…“, French and Russian «…», Swiss, Spanish, Dutch, Nordic, Japanese and Traditional Chinese 「…」, Simplified Chinese “…”), the font's localized forms (OpenType `locl`: Turkish i, Bulgarian Cyrillic, Japanese / Chinese / Korean glyph variants) follow it too, and so does the fallback for CJK characters the font lacks (with Draw Missing Glyphs from Fallback Fonts on): Japanese, Simplified Chinese, Traditional Chinese and Korean each try their own installed system fonts (Japanese starts with the craft-fonts Japanese faces, Mincho first, when built with them; Hangul, kana and Bopomofo pick their language's fonts whatever the language). Language names from IDML keep their spelling; locale codes as InDesign writes them for some languages (`de_DE_2006`, `nl_NL_2005`; any `ll`, `ll_CC`, `ll-CC`) are their language and region for all of the above, and Chinese is also recognised in its common spellings ("Simplified Chinese", "Chinese (Traditional)", `zh_CN`, `zh-Hant`). Hyphenation dictionaries for other languages aren't bundled yet.
- Books (`book.new/open/add/remove/list/styleSource/paginate/syncStyles/exportPdf`, Book panel): `.dcbook` files, continuous page numbering, style sync from a style source, one merged PDF.
- Track Changes (`changes.track/list/acceptAll/rejectAll`, Type ▸ Track Changes): typing is marked added (highlighted on screen), deletions are kept but hidden from layout and exports until accepted or rejected. Per-change accept/reject and authors aren't there yet.
- Track Changes: per-change Accept / Reject (`changes.accept`, `changes.reject`) and a Track Changes panel listing every change.
diff --git a/crates/compose/src/breaker.rs b/crates/compose/src/breaker.rs
index 7ce782318..3b08e1050 100644
--- a/crates/compose/src/breaker.rs
+++ b/crates/compose/src/breaker.rs
@@ -190,7 +190,7 @@ fn korean_letter(g: &Glyph) -> bool {
let c = g.ch as u32;
let hangul = matches!(c, 0x1100..=0x11FF | 0x3130..=0x318F | 0xA960..=0xA97F | 0xAC00..=0xD7FF);
let han = matches!(c, 0x3400..=0x4DBF | 0x4E00..=0x9FFF | 0xF900..=0xFAFF | 0x20000..=0x3FFFF);
- hangul || (han && g.lang == Some("ko"))
+ hangul || (han && g.lang.is_some_and(|t| designcraft_doc::language_subtag(t) == "ko"))
}
/// Is the place between glyphs `a` and `b` one where CJK text may break (next to an ideograph, kana
diff --git a/crates/compose/src/lib.rs b/crates/compose/src/lib.rs
index d088201c0..5a3056d8f 100644
--- a/crates/compose/src/lib.rs
+++ b/crates/compose/src/lib.rs
@@ -2018,9 +2018,11 @@ type LimitsKey = (usize, usize, usize, bool);
/// Mark glyphs after which a hyphen may be inserted (dictionary/pattern points within the
/// paragraph's limits; words with discretionary hyphens break only there).
-/// Whether a language uses the English hyphenation and spelling dictionaries.
+/// Whether a language (a name or locale code, see [`designcraft_doc::language_tag`]) uses the
+/// English hyphenation and spelling dictionaries.
pub fn is_english(language: &str) -> bool {
- language.starts_with("English")
+ // InDesign's English names first: composition asks this for every run.
+ language.starts_with("English") || designcraft_doc::language_tag(language).is_some_and(|t| designcraft_doc::language_subtag(t) == "en")
}
/// Byte ranges of paragraph `prange` set in a language other than English (no English
diff --git a/crates/compose/src/tests.rs b/crates/compose/src/tests.rs
index 7943adfd8..549e7bccf 100644
--- a/crates/compose/src/tests.rs
+++ b/crates/compose/src/tests.rs
@@ -1682,6 +1682,14 @@ fn korean_character_breaks_on_request() {
assert!(!lines_starting_mid_word(&d, sid, KO_WORDS).is_empty(), "breaks between syllables");
}
+#[test]
+fn korean_by_its_locale_code_breaks_at_spaces() {
+ let para = ParaAttrs { composer: Some(designcraft_doc::Composer::SingleLine), ..Default::default() };
+ let (d, sid) = korean_doc(KO_HANJA, "ko_KR", para);
+ let mid = lines_starting_mid_word(&d, sid, KO_HANJA);
+ assert!(mid.is_empty(), "{mid:?}");
+}
+
#[test]
fn hanja_in_korean_text_breaks_at_spaces() {
let para = ParaAttrs { composer: Some(designcraft_doc::Composer::SingleLine), ..Default::default() };
diff --git a/crates/doc/src/attrs.rs b/crates/doc/src/attrs.rs
index 24aac7558..ed3a5eca3 100644
--- a/crates/doc/src/attrs.rs
+++ b/crates/doc/src/attrs.rs
@@ -191,12 +191,16 @@ impl Digits {
}
/// The BCP 47 tag of a language name as InDesign and IDML write it ("English: USA", "Chinese:
-/// Simplified"), for the shaper's localized forms (`locl`). A variant we don't know falls back to
-/// its language ("English: Australian" → `en`); an unknown language (or "[No Language]") has none.
-/// Case and punctuation don't matter, and Chinese, Japanese and Korean also go by their other
-/// common spellings and locale codes ("Simplified Chinese", "Chinese (Traditional)", "zh_CN",
-/// "zh-Hant", "ja_JP", "ko-KR").
+/// Simplified", or a locale code such as "de_DE_2006"), for the shaper's localized forms (`locl`)
+/// and everything that depends on the language (quotes, hyphenation and spelling, line breaking,
+/// fallback fonts). A variant we don't know falls back to its language ("English: Australian" →
+/// `en`); an unknown language (or "[No Language]") has none. Case, punctuation and IDML's `$ID/`
+/// don't matter. Locale codes (`ll`, `ll_CC`, `ll-CC`, with a reform year after them as in
+/// `de_DE_2006`) are their tag (`de-DE`), and Chinese also goes by its other common spellings
+/// ("Simplified Chinese", "Chinese (Traditional)", "zh_CN", "zh-Hant").
pub fn language_tag(language: &str) -> Option<&'static str> {
+ let language = language.trim();
+ let language = language.strip_prefix("$ID/").unwrap_or(language);
let l = language.to_lowercase();
let words: Vec<&str> = l.split(|c: char| !c.is_alphanumeric()).filter(|w| !w.is_empty()).collect();
let first = words.first().copied().unwrap_or("");
@@ -215,11 +219,17 @@ pub fn language_tag(language: &str) -> Option<&'static str> {
"zh"
});
}
+ if let Some(tag) = locale_code(&words) {
+ return intern_tag(tag);
+ }
let variant = match words.join(" ").as_str() {
"english usa" => Some("en-US"),
"english uk" => Some("en-GB"),
"english canadian" => Some("en-CA"),
"german swiss 2006 reform" | "german swiss" => Some("de-CH"),
+ "french swiss" => Some("fr-CH"),
+ "italian swiss" => Some("it-CH"),
+ "spanish castilian" => Some("es-ES"),
"french canadian" => Some("fr-CA"),
"portuguese brazilian" => Some("pt-BR"),
"norwegian bokmål" | "norwegian bokmal" => Some("nb"),
@@ -256,8 +266,8 @@ pub fn language_tag(language: &str) -> Option<&'static str> {
"serbian" => "sr",
"macedonian" => "mk",
"turkish" => "tr",
- "japanese" | "ja" => "ja",
- "korean" | "ko" => "ko",
+ "japanese" => "ja",
+ "korean" => "ko",
"arabic" => "ar",
"persian" | "farsi" => "fa",
"urdu" => "ur",
@@ -266,6 +276,47 @@ pub fn language_tag(language: &str) -> Option<&'static str> {
})
}
+/// The tag of a locale code split into lowercase `words`: a language (2 or 3 letters), then
+/// optionally a region (2 letters or 3 digits) and a reform year (4 digits) → `ll` or `ll-CC`.
+fn locale_code(words: &[&str]) -> Option<String> {
+ let letters = |w: &str, n: std::ops::RangeInclusive<usize>| n.contains(&w.len()) && w.bytes().all(|b| b.is_ascii_lowercase());
+ let digits = |w: &str, n: usize| w.len() == n && w.bytes().all(|b| b.is_ascii_digit());
+ match *words {
+ [lang] if letters(lang, 2..=3) => Some(lang.to_string()),
+ [lang, region] | [lang, region, _] if letters(lang, 2..=3) && (letters(region, 2..=2) || digits(region, 3)) => {
+ if let [_, _, year] = *words
+ && !digits(year, 4)
+ {
+ return None;
+ }
+ Some(format!("{lang}-{}", region.to_ascii_uppercase()))
+ }
+ _ => None,
+ }
+}
+
+/// `tag` as a `&'static str`: each distinct tag is kept once for the process. Language names come
+/// from documents, so at most [`MAX_TAGS`] are kept; past that a new tag is unknown (`None`).
+fn intern_tag(tag: String) -> Option<&'static str> {
+ const MAX_TAGS: usize = 512;
+ static TAGS: std::sync::Mutex<Vec<&'static str>> = std::sync::Mutex::new(Vec::new());
+ let mut tags = TAGS.lock().unwrap_or_else(std::sync::PoisonError::into_inner);
+ if let Some(t) = tags.iter().find(|t| **t == tag) {
+ return Some(t);
+ }
+ if tags.len() >= MAX_TAGS {
+ return None;
+ }
+ let t: &'static str = Box::leak(tag.into_boxed_str());
+ tags.push(t);
+ Some(t)
+}
+
+/// The language subtag of a BCP 47 tag (`de-DE` → `de`, `zh-Hant` → `zh`).
+pub fn language_subtag(tag: &str) -> &str {
+ tag.split('-').next().unwrap_or(tag)
+}
+
/// A tracked change on text.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
@@ -825,11 +876,11 @@ mod tests {
("zh", Some("zh")),
("Japanese", Some("ja")),
("ja", Some("ja")),
- ("ja_JP", Some("ja")),
- ("ja-JP", Some("ja")),
+ ("ja_JP", Some("ja-JP")),
+ ("ja-JP", Some("ja-JP")),
("Korean", Some("ko")),
- ("ko_KR", Some("ko")),
- ("ko-KR", Some("ko")),
+ ("ko_KR", Some("ko-KR")),
+ ("ko-KR", Some("ko-KR")),
("English: USA", Some("en-US")),
("German: Swiss 2006 Reform", Some("de-CH")),
("Norwegian: Bokmål", Some("nb")),
@@ -839,6 +890,45 @@ mod tests {
}
}
+ #[test]
+ fn locale_codes_map_to_their_tags() {
+ for (name, tag) in [
+ // As InDesign-exported IDML writes them (AppliedLanguage).
+ ("$ID/de_DE_2006", Some("de-DE")),
+ ("$ID/nl_NL_2005", Some("nl-NL")),
+ ("$ID/English: USA", Some("en-US")),
+ ("$ID/English: UK", Some("en-GB")),
+ ("$ID/Spanish: Castilian", Some("es-ES")),
+ ("$ID/French", Some("fr")),
+ // As IDML import keeps them.
+ ("de_DE_2006", Some("de-DE")),
+ ("nl_NL_2005", Some("nl-NL")),
+ ("Spanish: Castilian", Some("es-ES")),
+ ("French", Some("fr")),
+ // Other locale codes.
+ ("de-DE", Some("de-DE")),
+ ("de_CH_2006", Some("de-CH")),
+ ("pt_BR", Some("pt-BR")),
+ ("en_us", Some("en-US")),
+ ("es_419", Some("es-419")),
+ ("fil_PH", Some("fil-PH")),
+ ("sv", Some("sv")),
+ ("ja", Some("ja")),
+ // Not codes.
+ ("de_DE_2006_x", None),
+ ("d_DE", None),
+ ("de_D", None),
+ ("de_DE_06", None),
+ ("1e_DE", None),
+ ("[No Language]", None),
+ ] {
+ assert_eq!(language_tag(name), tag, "{name}");
+ }
+ assert_eq!(language_subtag("de-DE"), "de");
+ assert_eq!(language_subtag("zh-Hant"), "zh");
+ assert_eq!(language_subtag("ko"), "ko");
+ }
+
#[test]
fn merge_and_resolve() {
let mut a = CharAttrs { size: Some(10.0), ..Default::default() };
diff --git a/crates/engine/src/cmd/text.rs b/crates/engine/src/cmd/text.rs
index c8bc0fad3..a75d6d473 100644
--- a/crates/engine/src/cmd/text.rs
+++ b/crates/engine/src/cmd/text.rs
@@ -478,46 +478,29 @@ fn smart_quotes(s: &Session, text: &str) -> String {
out
}
-/// Typographer's quotes of a language: [double open, double close, single open, single close].
+/// Typographer's quotes of a language (a name or locale code, see
+/// [`designcraft_doc::language_tag`]): [double open, double close, single open, single close].
pub fn quote_marks(language: &str) -> [char; 4] {
- // Chinese and Japanese go by the tag, which accepts every spelling of their names.
- match designcraft_doc::language_tag(language) {
- Some("zh-Hans") => return ['\u{201C}', '\u{201D}', '\u{2018}', '\u{2019}'],
- Some("zh" | "zh-Hant" | "ja") => return ['\u{300C}', '\u{300D}', '\u{300E}', '\u{300F}'],
+ const ENGLISH: [char; 4] = ['\u{201C}', '\u{201D}', '\u{2018}', '\u{2019}'];
+ let Some(tag) = designcraft_doc::language_tag(language) else { return ENGLISH };
+ // Swiss German, French and Italian use guillemets.
+ if tag.ends_with("-CH") {
+ return ['\u{00AB}', '\u{00BB}', '\u{2039}', '\u{203A}'];
+ }
+ match tag {
+ "zh-Hans" => return ENGLISH,
+ "zh" | "zh-Hant" => return ['\u{300C}', '\u{300D}', '\u{300E}', '\u{300F}'],
_ => {}
}
- let l = language.to_ascii_lowercase();
- if l.starts_with("german: swiss") || l.contains("swiss") {
- ['\u{00AB}', '\u{00BB}', '\u{2039}', '\u{203A}']
- } else if l.starts_with("german")
- || l.starts_with("czech")
- || l.starts_with("slovak")
- || l.starts_with("bulgarian")
- || l.starts_with("lithuanian")
- {
- ['\u{201E}', '\u{201C}', '\u{201A}', '\u{2018}']
- } else if l.starts_with("french")
- || l.starts_with("russian")
- || l.starts_with("ukrainian")
- || l.starts_with("norwegian")
- || l.starts_with("greek")
- {
- ['\u{00AB}', '\u{00BB}', '\u{2039}', '\u{203A}']
- } else if l.starts_with("spanish") || l.starts_with("italian") || l.starts_with("portuguese") || l.starts_with("catalan") {
- ['\u{00AB}', '\u{00BB}', '\u{201C}', '\u{201D}']
- } else if l.starts_with("dutch")
- || l.starts_with("polish")
- || l.starts_with("romanian")
- || l.starts_with("hungarian")
- || l.starts_with("croatian")
- {
- ['\u{201E}', '\u{201D}', '\u{201A}', '\u{2019}']
- } else if l.starts_with("swedish") || l.starts_with("finnish") {
- ['\u{201D}', '\u{201D}', '\u{2019}', '\u{2019}']
- } else if l.starts_with("danish") {
- ['\u{00BB}', '\u{00AB}', '\u{203A}', '\u{2039}']
- } else {
- ['\u{201C}', '\u{201D}', '\u{2018}', '\u{2019}']
+ match designcraft_doc::language_subtag(tag) {
+ "de" | "cs" | "sk" | "bg" | "lt" => ['\u{201E}', '\u{201C}', '\u{201A}', '\u{2018}'],
+ "fr" | "ru" | "uk" | "no" | "nb" | "nn" | "el" => ['\u{00AB}', '\u{00BB}', '\u{2039}', '\u{203A}'],
+ "es" | "it" | "pt" | "ca" => ['\u{00AB}', '\u{00BB}', '\u{201C}', '\u{201D}'],
+ "nl" | "pl" | "ro" | "hu" | "hr" => ['\u{201E}', '\u{201D}', '\u{201A}', '\u{2019}'],
+ "sv" | "fi" => ['\u{201D}', '\u{201D}', '\u{2019}', '\u{2019}'],
+ "da" => ['\u{00BB}', '\u{00AB}', '\u{203A}', '\u{2039}'],
+ "ja" => ['\u{300C}', '\u{300D}', '\u{300E}', '\u{300F}'],
+ _ => ENGLISH,
}
}
@@ -1347,6 +1330,38 @@ mod language_tests {
}
}
+ #[test]
+ fn locale_coded_languages_take_their_quotes_and_rules() {
+ use super::quote_marks;
+ const GERMAN: [char; 4] = ['\u{201E}', '\u{201C}', '\u{201A}', '\u{2018}'];
+ const DUTCH: [char; 4] = ['\u{201E}', '\u{201D}', '\u{201A}', '\u{2019}'];
+ const GUILLEMETS: [char; 4] = ['\u{00AB}', '\u{00BB}', '\u{2039}', '\u{203A}'];
+ const SPANISH: [char; 4] = ['\u{00AB}', '\u{00BB}', '\u{201C}', '\u{201D}'];
+ const ENGLISH: [char; 4] = ['\u{201C}', '\u{201D}', '\u{2018}', '\u{2019}'];
+ const CORNERS: [char; 4] = ['\u{300C}', '\u{300D}', '\u{300E}', '\u{300F}'];
+ for (language, quotes, english) in [
+ ("de_DE_2006", GERMAN, false),
+ ("German: 2006 Reform", GERMAN, false),
+ ("de_CH_2006", GUILLEMETS, false),
+ ("German: Swiss 2006 Reform", GUILLEMETS, false),
+ ("nl_NL_2005", DUTCH, false),
+ ("Dutch: 2005 Reform", DUTCH, false),
+ ("English: USA", ENGLISH, true),
+ ("English: UK", ENGLISH, true),
+ ("en_GB", ENGLISH, true),
+ ("Spanish: Castilian", SPANISH, false),
+ ("es_ES", SPANISH, false),
+ ("French", GUILLEMETS, false),
+ ("fr_FR", GUILLEMETS, false),
+ ("nb_NO", GUILLEMETS, false),
+ ("ja_JP", CORNERS, false),
+ ("[No Language]", ENGLISH, false),
+ ] {
+ assert_eq!(quote_marks(language), quotes, "{language}");
+ assert_eq!(designcraft_compose::is_english(language), english, "{language}");
+ }
+ }
+
#[test]
fn idml_language_names_keep_their_spelling_and_pick_the_language() {
use std::io::Read;
diff --git a/crates/fonts/src/fontdb.rs b/crates/fonts/src/fontdb.rs
index 922cf7615..543c94782 100644
--- a/crates/fonts/src/fontdb.rs
+++ b/crates/fonts/src/fontdb.rs
@@ -475,11 +475,13 @@ fn cjk_chain(c: char, language: Option<&str>) -> Option<&'static [&'static str]>
| 0x20000..=0x3FFFF => {}
_ => return None,
}
- match language? {
+ // The language decides, whatever the region (`ja-JP`, `ko-KR`).
+ let language = language?;
+ match language.split('-').next()? {
"ja" => Some(japanese_chain()),
"ko" => Some(KOREAN_FALLBACKS),
- "zh" | "zh-Hans" => Some(SIMPLIFIED_CHINESE_FALLBACKS),
- "zh-Hant" => Some(TRADITIONAL_CHINESE_FALLBACKS),
+ "zh" if language.starts_with("zh-Hant") => Some(TRADITIONAL_CHINESE_FALLBACKS),
+ "zh" => Some(SIMPLIFIED_CHINESE_FALLBACKS),
_ => None,
}
}
diff --git a/crates/fonts/src/tests_fallback.rs b/crates/fonts/src/tests_fallback.rs
index c1f84af79..4d81f9a5b 100644
--- a/crates/fonts/src/tests_fallback.rs
+++ b/crates/fonts/src/tests_fallback.rs
@@ -48,8 +48,10 @@ fn ideographs_follow_the_language() {
assert_eq!(family(&db, HAN, Some("zh")).as_deref(), Some("Songti SC"), "plain Chinese is Simplified");
assert_eq!(family(&db, HAN, Some("zh-Hant")).as_deref(), Some("Songti TC"));
assert_eq!(family(&db, HAN, Some("ko")).as_deref(), Some("AppleMyungjo"));
+ assert_eq!(family(&db, HAN, Some("ko-KR")).as_deref(), Some("AppleMyungjo"), "the language decides, whatever the region");
let ja = japanese_chain_with(&["Hiragino Mincho ProN"])[0];
assert_eq!(family(&db, HAN, Some("ja")).as_deref(), Some(ja), "the craft-fonts faces lead the Japanese chain, then system fonts");
+ assert_eq!(family(&db, HAN, Some("ja-JP")).as_deref(), Some(ja));
// CJK punctuation follows the language too.
let db = db_with(&[("Other CJK", &['、']), ("Songti SC", &['、'])]);
assert_eq!(family(&db, '、', Some("zh-Hans")).as_deref(), Some("Songti SC"));
diff --git a/docs/cjk.md b/docs/cjk.md
index 05e50845e..be1b0f349 100644
--- a/docs/cjk.md
+++ b/docs/cjk.md
@@ -42,7 +42,7 @@ presets or tables are copied. Our default mojikumi and kinsoku tables are built
| Ruby | group ruby only, fixed 50 % size, no options, doesn't affect leading |
| Kenten | the IDML kinds and a custom character, drawn as characters; no position, size, alignment, colour or font |
| Composite fonts | done: model, `style.compositeFont.*`, shaping, IDML, font list, replace and Preflight; no dialog |
-| Languages | Japanese, Korean, Simplified and Traditional Chinese reach the shaper (`locl`), font fallback, line breaking and typographer's quotes; IDML language names are kept as written and recognised in their common spellings and locale codes ("Simplified Chinese", "Chinese (Traditional)", `zh_CN`, `zh-Hant`, `ja_JP`, `ko-KR`) |
+| Languages | Japanese, Korean, Simplified and Traditional Chinese reach the shaper (`locl`), font fallback, line breaking and typographer's quotes; IDML language names are kept as written; locale codes (`ja_JP`, `ko-KR`, `de_DE_2006`) are their language and region, and Chinese is also recognised in its common spellings ("Simplified Chinese", "Chinese (Traditional)", `zh_CN`, `zh-Hant`) |
| Missing glyphs | as in InDesign: characters the applied font lacks are drawn as its missing-glyph box (screen and PDF) and listed by Preflight; the document setting Draw Missing Glyphs from Fallback Fonts (Preferences › Composition, off in new documents and IDML imports, on in documents saved before it existed) draws them from fallback fonts instead |
| Font menus | Western families first, then Japanese, Simplified Chinese, Traditional Chinese and Korean groups (from the font's `meta` languages, CJK family names, OS/2 code pages, else its coverage); CJK families under their native names unless Preferences › Type › Show Font Names in English; the order is recalled from InDesign, not observed |
| CJK fonts | Japanese faces (Shippori Mincho first) from the optional craft-fonts build input, in the font menus for users to apply; fallback by language (with fallback fonts on) (Japanese: the craft-fonts faces, then system fonts; Simplified and Traditional Chinese, Korean: system fonts); document fonts: the fonts of a `Document Fonts` folder beside an opened file belong to that document (composition, export, font menus), ahead of installed fonts of the same name, and are forgotten when it closes; Package copies every font file that draws text, fallback fonts included (licence permitting). Font files stay in memory for the session (reopening a document reuses them) and aren't read on the web |