Skip to content

Commit

Permalink
fontconfig: add hack for fucking lang=default
Browse files Browse the repository at this point in the history
There are too many self-righteous people in this world who think they are
the creators of BCP47[1]. Some of them invented `lang=cn` (@moodyhunter),
and some invented `lang=default` (@icpz).

[1]: https://www.ietf.org/rfc/bcp/bcp47.txt
  • Loading branch information
CoelacanthusHex committed Sep 7, 2023
1 parent 2efd769 commit 60e29d8
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,30 @@
</edit>
</match>

<!-- Hack for website with fucking default -->
<match target="pattern">
<test name="lang" compare="contains">
<string>default</string>
</test>
<test qual="any" name="family">
<string>Source Han Sans</string>
</test>
<edit name="family" mode="assign" binding="same">
<string>Source Han Sans SC</string>
</edit>
</match>
<match target="pattern">
<test name="lang" compare="contains">
<string>default</string>
</test>
<test qual="any" name="family">
<string>Source Han Serif</string>
</test>
<edit name="family" mode="assign" binding="same">
<string>Source Han Serif SC</string>
</edit>
</match>

<!-- Workaround for Source Han Sans/Serif has no support for zh-Hans/Hant -->
<match target="pattern">
<test name="lang" compare="contains">
Expand Down

0 comments on commit 60e29d8

Please sign in to comment.