bug 8104: Eliminate unused variables. Replicate assert statement to identify branch of interest.

This commit is contained in:
Carl Worth 2006-09-01 16:10:25 -07:00
parent 0a1aef157e
commit 7c97a787eb

View file

@ -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