mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-18 03:38:06 +02:00
cairo-win32-font: fixed division by zero
We need to be sure scaled_font->logical_scale never gets zero, as that is used later for division.
This commit is contained in:
parent
39ba22d7e6
commit
565ac84fe2
1 changed files with 2 additions and 2 deletions
|
|
@ -246,8 +246,8 @@ _compute_transform (cairo_win32_scaled_font_t *scaled_font,
|
|||
|
||||
scaled_font->logical_size =
|
||||
_cairo_lround (WIN32_FONT_LOGICAL_SCALE * scaled_font->y_scale);
|
||||
scaled_font->logical_scale =
|
||||
WIN32_FONT_LOGICAL_SCALE * scaled_font->y_scale;
|
||||
scaled_font->logical_scale = MAX(1.f,
|
||||
WIN32_FONT_LOGICAL_SCALE * scaled_font->y_scale);
|
||||
}
|
||||
|
||||
cairo_matrix_scale (&scaled_font->logical_to_device,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue