DOCX: Punjabi in Pakistan takes the Arabic-script theme font

lang_script mapped every `pa` tag to Gurmukhi. Measured in Word for Mac:
with w:themeFontLang w:bidi="pa-PK" a majorBidi run takes the theme's
Arab font, with "pa-IN" its Guru font. The test matrix gains both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Dominik Strebel
2026-10-20 01:19:14 +02:00
committed by vangel76
co-authored by Claude Opus 5.5
parent 1fa2533a52
commit 9c3d39c597
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -99,6 +99,8 @@ pub(crate) fn lang_script(tag: &str) -> &'static str {
"th" => "Thai",
"hi" | "mr" | "ne" | "sa" | "kok" => "Deva",
"bn" | "as" => "Beng",
// Measured in Word: Punjabi takes the Arabic-script font in Pakistan, Gurmukhi elsewhere.
"pa" if rest.iter().any(|p| p.eq_ignore_ascii_case("pk")) => "Arab",
"pa" => "Guru",
"gu" => "Gujr",
"or" => "Orya",
+2
View File
@@ -3294,6 +3294,8 @@ fn bidi_theme_slots_follow_the_theme_font_language() {
(Some(r#"w:bidi="ar-SA""#), "Arial", true, "", ["Georgia", "Trebuchet MS"]),
(Some(r#"w:bidi="he-IL""#), "", true, "", ["Courier New", "Comic Sans MS"]),
(Some(r#"w:bidi="ur-PK""#), "Arial", true, "", ["Georgia", "Trebuchet MS"]),
(Some(r#"w:bidi="pa-PK""#), "Arial", true, "", ["Georgia", "Trebuchet MS"]),
(Some(r#"w:bidi="pa-IN""#), "Arial", true, "", ["Arial", "Arial"]),
(Some(r#"w:bidi="fr-FR""#), "Arial", true, "", ["Verdana", "Impact"]),
(Some(r#"w:bidi="th-TH""#), "Arial", true, "", ["Arial", "Arial"]),
(Some(r#"w:bidi="th-TH""#), "", true, "", [tnr, tnr]),