Created attachment 42713
Revised version of respect-fontconfig patch against 1.10.2 version.
I am sending the updated patch, with comments from Behdad Esfahbod incorporated.
There are two routines modified with this patch:
* _cairo_ft_options_merge - changes here are small and focus on having the same algorithm for all font properties: if other structure define a property (it does not equal CAIRO_*_DEFAULT), this value will be used. Sometimes there is some additional processing for antialiasing required - in case the subpixel antialiasing is forced on, but physical screen structure is unknown, the type of antialiasing (Subpixel/Gray) has to be calculated based on values in options structure.
* _get_pattern_ft_options - this routine loads FontConfig information into cairo_ft_options_t structure.
** The most significant change here covers the fact, that hinting information wasn't processed if antialiasing was switched off.
** Another change in behavior applies to antialiasing information - basically there are 7 different combination of FontConfig properties ('antialias' and 'rgba') values that define different behavior, but they cannot be naturally represented in cairo_ft_options_t structure (in theory it could be done, but with extremely nasty approach). As changing the contract and defining additional value for _cairo_subpixel_order type would be rather wrong idea, the routine will assume user wanted to switch on antialiasing when the 'rgba' property is defined.
Created attachment 42713
Revised version of respect-fontconfig patch against 1.10.2 version.
I am sending the updated patch, with comments from Behdad Esfahbod incorporated.
There are two routines modified with this patch:
* _cairo_ ft_options_ merge - changes here are small and focus on having the same algorithm for all font properties: if other structure define a property (it does not equal CAIRO_*_DEFAULT), this value will be used. Sometimes there is some additional processing for antialiasing required - in case the subpixel antialiasing is forced on, but physical screen structure is unknown, the type of antialiasing (Subpixel/Gray) has to be calculated based on values in options structure.
* _get_pattern_ ft_options - this routine loads FontConfig information into cairo_ft_options_t structure.
** The most significant change here covers the fact, that hinting information wasn't processed if antialiasing was switched off.
** Another change in behavior applies to antialiasing information - basically there are 7 different combination of FontConfig properties ('antialias' and 'rgba') values that define different behavior, but they cannot be naturally represented in cairo_ft_options_t structure (in theory it could be done, but with extremely nasty approach). As changing the contract and defining additional value for _cairo_ subpixel_ order type would be rather wrong idea, the routine will assume user wanted to switch on antialiasing when the 'rgba' property is defined.