[hb-cairo] Round colors

This commit is contained in:
Behdad Esfahbod 2023-01-20 15:33:38 -07:00
parent 876675e090
commit 4759932bcf
1 changed files with 4 additions and 1 deletions

View File

@ -346,7 +346,10 @@ hb_cairo_paint_custom_palette_color (hb_paint_funcs_t *funcs,
&red, &green, &blue, &alpha))
{
cairo_font_options_destroy (options);
*color = HB_COLOR (255 * blue, 255 * green, 255 * red, 255 * alpha);
*color = HB_COLOR (round (255 * blue),
round (255 * green),
round (255 * red),
round (255 * alpha));
if (likely (color_cache && *color != HB_DEADBEEF))
color_cache->set (color_index, *color);