mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-03 10:08:16 +02:00
bug 8104: Eliminate unused variables. Replicate assert statement to identify branch of interest.
This commit is contained in:
parent
0a1aef157e
commit
7c97a787eb
1 changed files with 2 additions and 7 deletions
|
|
@ -603,7 +603,6 @@ _cairo_ft_unscaled_font_set_scale (cairo_ft_unscaled_font_t *unscaled,
|
|||
{
|
||||
cairo_ft_font_transform_t sf;
|
||||
FT_Matrix mat;
|
||||
FT_UInt pixel_width, pixel_height;
|
||||
FT_Error error;
|
||||
|
||||
assert (unscaled->face != NULL);
|
||||
|
|
@ -642,19 +641,16 @@ _cairo_ft_unscaled_font_set_scale (cairo_ft_unscaled_font_t *unscaled,
|
|||
FT_Set_Transform(unscaled->face, &mat, NULL);
|
||||
|
||||
if ((unscaled->face->face_flags & FT_FACE_FLAG_SCALABLE) != 0) {
|
||||
pixel_width = sf.x_scale;
|
||||
pixel_height = sf.y_scale;
|
||||
error = FT_Set_Char_Size (unscaled->face,
|
||||
sf.x_scale * 64.0,
|
||||
sf.y_scale * 64.0,
|
||||
0, 0);
|
||||
assert (error == 0);
|
||||
} else {
|
||||
double min_distance = DBL_MAX;
|
||||
int i;
|
||||
int best_i = 0;
|
||||
|
||||
pixel_width = pixel_height = 0;
|
||||
|
||||
for (i = 0; i < unscaled->face->num_fixed_sizes; i++) {
|
||||
#if HAVE_FT_BITMAP_SIZE_Y_PPEM
|
||||
double size = unscaled->face->available_sizes[i].y_ppem / 64.;
|
||||
|
|
@ -678,9 +674,8 @@ _cairo_ft_unscaled_font_set_scale (cairo_ft_unscaled_font_t *unscaled,
|
|||
error = FT_Set_Pixel_Sizes (unscaled->face,
|
||||
unscaled->face->available_sizes[best_i].width,
|
||||
unscaled->face->available_sizes[best_i].height);
|
||||
assert (error == 0);
|
||||
}
|
||||
|
||||
assert (error == 0);
|
||||
}
|
||||
|
||||
/* Empirically-derived subpixel filtering values thanks to Keith
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue