Pango loads Tux Paint-supplied fonts on macOS.
Previously Pango loaded system-supplied fonts instead, which could lead to fonts not rendering in a human-readable text. This change fixes https://sourceforge.net/p/tuxpaint/bugs/265/
This commit is contained in:
parent
e00b6b4f4a
commit
3849480fd4
9 changed files with 178 additions and 6 deletions
|
|
@ -4,7 +4,7 @@ BUNDLE=TuxPaint.app
|
|||
BINARY="$BUNDLE/Contents/MacOS/tuxpaint"
|
||||
LIBS=`find $BUNDLE/Contents/Resources/lib -type f`
|
||||
LIBDIR="$BUNDLE/Contents/lib"
|
||||
CONF_FILES="/opt/local/etc/fonts/fonts.conf"
|
||||
CONF_FILES="macos/fonts.conf"
|
||||
CONFDIR="$BUNDLE/Contents/Resources/etc"
|
||||
|
||||
|
||||
|
|
|
|||
93
macos/fonts.conf
Normal file
93
macos/fonts.conf
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
</its:rules>
|
||||
|
||||
<description>Default configuration file</description>
|
||||
|
||||
<!--
|
||||
Font directory list
|
||||
-->
|
||||
<dir prefix="cwd">Resources/share/tuxpaint/fonts</dir>
|
||||
<dir prefix="cwd">Resources/share/tuxpaint/fonts/locale</dir>
|
||||
<dir prefix="cwd">share/tuxpaint/fonts</dir>
|
||||
<dir prefix="cwd">share/tuxpaint/fonts/locale</dir>
|
||||
<dir>~/Library/Application Support/TuxPaint/fonts</dir>
|
||||
<dir>~/Library/Application Support/TuxPaint/fonts/locale</dir>
|
||||
<dir>/Library/Application Support/TuxPaint/fonts</dir>
|
||||
<dir>/Library/Application Support/TuxPaint/fonts/locale</dir>
|
||||
|
||||
<!--
|
||||
Accept deprecated 'mono' alias, replacing it with 'monospace'
|
||||
-->
|
||||
<match target="pattern">
|
||||
<test qual="any" name="family">
|
||||
<string>mono</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>monospace</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!--
|
||||
Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
|
||||
-->
|
||||
<match target="pattern">
|
||||
<test qual="any" name="family">
|
||||
<string>sans serif</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>sans-serif</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!--
|
||||
Accept deprecated 'sans' alias, replacing it with 'sans-serif'
|
||||
-->
|
||||
<match target="pattern">
|
||||
<test qual="any" name="family">
|
||||
<string>sans</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>sans-serif</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!--
|
||||
Load local system customization file
|
||||
-->
|
||||
<!--
|
||||
<include ignore_missing="yes">conf.d</include>
|
||||
-->
|
||||
|
||||
<!--
|
||||
Tux Paint uses DejaVu Sans as the default font but loads it as BitStream Vera font.
|
||||
-->
|
||||
<match target="pattern">
|
||||
<test qual="any" name="family">
|
||||
<string>BitStream Vera</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>DejaVu Sans</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!--
|
||||
Font cache directory list
|
||||
-->
|
||||
<cachedir>/tmp/fontconfig</cachedir>
|
||||
<cachedir prefix="xdg">fontconfig</cachedir>
|
||||
|
||||
<config>
|
||||
|
||||
<!--
|
||||
Rescan configuration every 30 seconds when FcFontSetList is called
|
||||
-->
|
||||
<rescan>
|
||||
<int>30</int>
|
||||
</rescan>
|
||||
</config>
|
||||
|
||||
</fontconfig>
|
||||
Loading…
Add table
Add a link
Reference in a new issue