[cairo] Linux Windows differences (text)

Luca Bacci luca.bacci982 at gmail.com
Fri Sep 23 12:09:02 UTC 2022


Can you test if calling cairo_font_options_set_antialias (cr,
CAIRO_ANTIALIAS_NONE) has any observable effect on Linux?

If not, I think you can open an issue in
https://gitlab.freedesktop.org/cairo/cairo/-/issues - unless someone more
knowledgeable than me steps in :)

Regards,
Luca

Il ven 23 set 2022, 14:04 Luca Bacci <luca.bacci982 at gmail.com> ha scritto:

> Looks like font options are ignored altogether when using the toy font
> API, although the doc for cairo_show_text () says that the font options are
> honored.
>
> Luca
>
> Il ven 23 set 2022, 11:09 Rafał Jopek <rafaljopek at hotmail.com> ha scritto:
>
>> Luca,
>>
>> I used your code did not help, the window is still unchanged
>>
>> cairo_font_options_t *options = cairo_font_options_create();
>>
>> cairo_font_options_set_hint_style ( options, CAIRO_HINT_STYLE_NONE );
>> cairo_set_font_options( cr, options );
>> cairo_font_options_destroy( options );
>>
>> -- Rafał
>>
>> ------------------------------
>> *Od:* Luca Bacci <luca.bacci982 at gmail.com>
>> *Wysłane:* piątek, 23 września 2022 10:51
>> *Do:* Rafał Jopek <rafaljopek at hotmail.com>
>> *DW:* cairo at cairographics.org <cairo at cairographics.org>
>> *Temat:* Re: [cairo] Linux Windows differences (text)
>>
>> Hello Rafał, welcome!
>>
>> I believe the difference in rendering is due to the font hinting options.
>> Try setting it to NONE instead of using the platform-default:
>>
>> static void set_font_options( cairo_t *cr )
>> {
>>   cairo_font_options_t *options = cairo_font_options_create();
>>
>>   cairo_font_options_set_hint_style ( font_options, CAIRO_HINT_STYLE_NONE
>> );
>>   cairo_set_font_options( cr, font_options );
>>   cairo_font_options_destroy( font_options );
>> }
>>
>> Regards,
>> Luca
>>
>> Il giorno ven 23 set 2022 alle ore 10:09 Rafał Jopek <
>> rafaljopek at hotmail.com> ha scritto:
>>
>> Hi,
>>
>> What is the reason for the significant differences between Linux and
>> Windows?
>> Source code was used for testing 1:1
>>
>> the screenshot can be seen here:
>> https://github.com/rjopek/glfw-cairo/issues/5
>> <https://github.com/rjopek/glfw-cairo/issues/5>
>> Linux Windows differences (text) · Issue #5 · rjopek/glfw-cairo
>> <https://github.com/rjopek/glfw-cairo/issues/5>
>> Hi, What is the reason for the significant differences between Linux and
>> Windows? Source code was used for testing 1:1
>> examples/image_surfaces/gl_00.c
>> github.com
>>
>> -- Rafał
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20220923/68ce3167/attachment-0001.htm>


More information about the cairo mailing list