about summary refs log tree commit diff
path: root/src/inc/unicode-range.md
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2025-03-07 01:34:05 +0100
committerRobert Günzler <r@gnzler.io>2025-03-07 01:46:22 +0100
commit57a0b5367a535087531894155b222355ca396e2f (patch)
tree71f35472cc5cadba5c10c6aa9b596e12660b2160 /src/inc/unicode-range.md
parent7891389e2100385aa341a3ccaa48e90583b2e91d (diff)
downloadsite-57a0b5367a535087531894155b222355ca396e2f.tar.gz
% update site
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to 'src/inc/unicode-range.md')
-rw-r--r--src/inc/unicode-range.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/inc/unicode-range.md b/src/inc/unicode-range.md
new file mode 100644
index 0000000..8c68636
--- /dev/null
+++ b/src/inc/unicode-range.md
@@ -0,0 +1,35 @@
+
+While working on my custom [Anki] cards for learning Japanese and Turkish, I
+found that my font of choice for Japanese [IPAex] was not properly supporting
+glyphs used by Turkish, like [ğ].
+
+To fix this i am using a property of the `@font-face` rule to limit custom
+fonts to source their glyphs from a subset of the unicode range and force
+fallback to the next font in the set.
+
+```css
+@font-face {
+    font-family: "IPAexGothic";
+    src:
+        local("IPAexGothic"),
+        url("_ipaexg.ttf");
+    unicode-range: 
+        U+0020-007F,
+        U+3000-303f,
+        U+3040-309f,
+        U+30a0-30ff,
+        U+ff00-ffef,
+        U+4e00-9faf;
+}
+
+.card {
+    font-family:
+        IPAexGothic,
+        Noto Sans,
+        sans;
+}
+```
+
+[Anki]: https://apps.ankiweb.net/
+[IPAex]: https://ja.wikipedia.org/wiki/IPA%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88
+[ğ]: https://en.wikipedia.org/wiki/%C4%9E