I have the following fontconfig configuration, but the font weights aren't changing as expected. I discovered that changing target="font" to target="pattern" makes it work.
<test name="family" compare="eq"> <string>Noto Sans</string> </test> <test name="weight" compare="less_eq"> <const>medium</const> </test> <edit name="weight" mode="assign" binding="strong"> <const>medium</const> </edit> </match> <match target="font"> <test name="family" compare="eq"> <string>PingFang SC</string> </test> <test name="weight" compare="less_eq"> <const>medium</const> </test> <edit name="weight" mode="assign" binding="strong"> <const>medium</const> </edit> </match> <match target="font"> <test name="family" compare="eq"> <string>SF Pro Text</string> </test> <test name="weight" compare="less_eq"> <const>medium</const> </test> <edit name="weight" mode="assign" binding="strong"> <const>medium</const> </edit> </match> Based on my research, I believe target="font" should work as well. Could anyone help me understand what might be causing this behavior?