dumol / PixelPerfect

Pixel-perfect font rendering under Wayland and X.org
MIT License
16 stars 1 forks source link

Antialiasing for missing styles is derived from Regular style. #7

Open dumol opened 3 years ago

dumol commented 3 years ago

For many fonts, disabling antialiasing makes sense only for the Regular style. E.g.:

    <match target="font">
        <test name="family"><string>PT Mono</string></test>
        <test name="style"><string>Regular</string></test>
        <test compare="less" name="pixelsize"><double>18.49</double></test>
        <edit name="antialias"><bool>false</bool></edit>
    </match>

This means "PT Mono" at size 14 will not be antialiased, while "PT Mono:style=bold" will be antialiased.

However, "PT Mono" has no Italic style, so it's automatically generated by FreeType when requested. Now, ideally this Italic style would be aliased, but there's currently no way to ask for that independently of the Regular style. Disabling antialiasing for the Regular style of PT Mono consequently disables it for the auto-generated italics as well.