X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=util%2Fview-cairo.hh;h=cb523737aacf1cbccf779a6d9e8873a40f52c27b;hb=4b524cd9449699e546a0991326d12ee2c915fab3;hp=9dea06e96e80d60283dd1de198accf7c072f3338;hpb=4a63fee1394ef6d952890db5d6cf4b664f19da2e;p=platform%2Fupstream%2Fharfbuzz.git diff --git a/util/view-cairo.hh b/util/view-cairo.hh index 9dea06e..cb52373 100644 --- a/util/view-cairo.hh +++ b/util/view-cairo.hh @@ -37,7 +37,7 @@ struct view_cairo_t : output_options (parser, helper_cairo_supported_formats), view_options (parser), direction (HB_DIRECTION_INVALID), - lines (0), scale (1.0) {} + lines (0), scale_bits (0) {} ~view_cairo_t (void) { if (debug) cairo_debug_reset_static_data (); @@ -46,7 +46,7 @@ struct view_cairo_t void init (const font_options_t *font_opts) { lines = g_array_new (false, false, sizeof (helper_cairo_line_t)); - scale = double (view_options.font_size) / hb_face_get_upem (hb_font_get_face (font_opts->get_font ())); + scale_bits = -font_opts->subpixel_bits; } void new_line (void) { @@ -71,7 +71,7 @@ struct view_cairo_t { direction = hb_buffer_get_direction (buffer); helper_cairo_line_t l; - helper_cairo_line_from_buffer (&l, buffer, text, text_len, scale, utf8_clusters); + helper_cairo_line_from_buffer (&l, buffer, text, text_len, scale_bits, utf8_clusters); g_array_append_val (lines, l); } void finish (const font_options_t *font_opts) @@ -100,7 +100,7 @@ struct view_cairo_t hb_direction_t direction; // Remove this, make segment_properties accessible GArray *lines; - double scale; + int scale_bits; }; #endif