提交 1883af37 编写于 作者: B Behdad Esfahbod

[hb-view] Start work on vertical support

上级 9aa6f96a
......@@ -350,7 +350,7 @@ _hb_cr_text_glyphs (cairo_t *cr,
hb_glyph_info_t *hb_glyph;
hb_glyph_position_t *hb_position;
unsigned int num_glyphs, i;
hb_position_t x;
hb_position_t x, y;
hb_buffer = hb_buffer_create (0);
......@@ -372,12 +372,14 @@ _hb_cr_text_glyphs (cairo_t *cr,
hb_position = hb_buffer_get_glyph_positions (hb_buffer, NULL);
cairo_glyphs = cairo_glyph_allocate (num_glyphs);
x = 0;
y = 0;
for (i = 0; i < num_glyphs; i++)
{
cairo_glyphs[i].index = hb_glyph->codepoint;
cairo_glyphs[i].x = (hb_position->x_offset + x) * (1./64);
cairo_glyphs[i].y = -(hb_position->y_offset) * (1./64);
x += hb_position->x_advance;
cairo_glyphs[i].x = ( hb_position->x_offset + x) * (1./64);
cairo_glyphs[i].y = (-hb_position->y_offset + y) * (1./64);
x += hb_position->x_advance;
y += -hb_position->y_advance;
hb_glyph++;
hb_position++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册