summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalo <57839069+MDLC01@users.noreply.github.com>2025-03-31 11:01:01 +0200
committerGitHub <noreply@github.com>2025-03-31 09:01:01 +0000
commit1082181a6f789b73fbc64c4ff5bc1401ad081e76 (patch)
treedd829e1fc93f4e4a669577b4e65888402d183802
parente60d3021a782c5977cf7de726682e19ae89abeb3 (diff)
Improve french smartquotes (#5976)
-rw-r--r--crates/typst-library/src/text/smartquote.rs2
-rw-r--r--tests/ref/smartquote-disabled-temporarily.pngbin2781 -> 2782 bytes
-rw-r--r--tests/ref/smartquote-fr.pngbin2344 -> 2334 bytes
-rw-r--r--tests/ref/smartquote-with-embedding-chars.pngbin573 -> 568 bytes
-rw-r--r--tests/suite/text/smartquote.typ2
5 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-library/src/text/smartquote.rs b/crates/typst-library/src/text/smartquote.rs
index f457a637..4dda689d 100644
--- a/crates/typst-library/src/text/smartquote.rs
+++ b/crates/typst-library/src/text/smartquote.rs
@@ -238,7 +238,7 @@ impl<'s> SmartQuotes<'s> {
"cs" | "de" | "et" | "is" | "lt" | "lv" | "sk" | "sl" => low_high,
"da" => ("‘", "’", "“", "”"),
"fr" | "ru" if alternative => default,
- "fr" => ("‹\u{00A0}", "\u{00A0}›", "«\u{00A0}", "\u{00A0}»"),
+ "fr" => ("“", "”", "«\u{202F}", "\u{202F}»"),
"fi" | "sv" if alternative => ("’", "’", "»", "»"),
"bs" | "fi" | "sv" => ("’", "’", "”", "”"),
"it" if alternative => default,
diff --git a/tests/ref/smartquote-disabled-temporarily.png b/tests/ref/smartquote-disabled-temporarily.png
index 4c565c01..f4d08c4d 100644
--- a/tests/ref/smartquote-disabled-temporarily.png
+++ b/tests/ref/smartquote-disabled-temporarily.png
Binary files differ
diff --git a/tests/ref/smartquote-fr.png b/tests/ref/smartquote-fr.png
index e2818422..6b7de7ab 100644
--- a/tests/ref/smartquote-fr.png
+++ b/tests/ref/smartquote-fr.png
Binary files differ
diff --git a/tests/ref/smartquote-with-embedding-chars.png b/tests/ref/smartquote-with-embedding-chars.png
index a5004266..e4d33fae 100644
--- a/tests/ref/smartquote-with-embedding-chars.png
+++ b/tests/ref/smartquote-with-embedding-chars.png
Binary files differ
diff --git a/tests/suite/text/smartquote.typ b/tests/suite/text/smartquote.typ
index 4940d11b..f2af93ce 100644
--- a/tests/suite/text/smartquote.typ
+++ b/tests/suite/text/smartquote.typ
@@ -99,7 +99,7 @@ He's told some books contain questionable "example text".
--- smartquote-disabled-temporarily ---
// Test changing properties within text.
-"She suddenly started speaking french: #text(lang: "fr")['Je suis une banane.']" Roman told me.
+"She suddenly started speaking french: #text(lang: "fr", region: "CH")['Je suis une banane.']" Roman told me.
Some people's thought on this would be #[#set smartquote(enabled: false); "strange."]