redhat-fonts/64-redhat-display-vf-fontconfig.conf

81 lines
2.6 KiB
Plaintext
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<!--
-- This scan pattern aims to correct properties to:
-- * keep consistency between RedHatDisplay and RedHatDisplay-Italic
-- * provide single family name e.g. Red Hat Display
-- * provide single familylang because of the above
-- * provide single style name e.g. like :family=Red Hat Display:style=Light
-- but :family=Red Hat Display Light:style=Regular
-- * provide single stylelang because of the above
-- * set different family name of the variable font pattern to avoid conflict
-->
<fontconfig>
<!-- Try to workaround broken family name in RedHatDisplay-Italic.ttf -->
<!-- For Light -->
<match target="scan">
<test name="family" compare="eq">
<string>Red Hat Display</string>
</test>
<test name="style" compare="eq">
<string>Italic</string>
</test>
<test name="style" compare="eq">
<string>Light Italic</string>
</test>
<edit name="style" mode="delete" /> <!-- Drop Italic -->
<edit name="stylelang" mode="delete" /> <!-- Drop all stylelang once -->
<edit name="stylelang" mode="append"> <!-- Add single stylelang again -->
<string>en</string>
</edit>
</match>
<!-- For variable font -->
<match target="scan">
<test name="family" compare="eq">
<string>Red Hat Display</string>
</test>
<test name="slant">
<const>italic</const>
</test>
<test name="variable">
<bool>true</bool>
</test>
<edit name="family" mode="assign">
<!-- Set Italic in family name to avoid confusion for Red Hat Display -->
<string>Red Hat Display Italic</string>
</edit>
</match>
<!-- Try to workaround broken family name in RedHatDisplay.ttf -->
<!-- For Light -->
<match target="scan">
<test name="family" compare="eq">
<string>Red Hat Display</string>
</test>
<test name="style" compare="eq">
<string>Regular</string>
</test>
<test name="style" compare="eq">
<string>Light</string>
</test>
<edit name="style" mode="delete" /> <!-- Drop Regular -->
<edit name="stylelang" mode="delete" /> <!-- Drop all stylelang once -->
<edit name="stylelang" mode="append"> <!-- Add single stylelang again -->
<string>en</string>
</edit>
</match>
<!-- Generic name assignment -->
<alias>
<family>Red Hat Display</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<!-- Generic name aliasing -->
<alias>
<family>sans-serif</family>
<prefer>
<family>Red Hat Display</family>
</prefer>
</alias>
</fontconfig>