Add fallback shaper
This commit is contained in:
parent
13a601fe99
commit
1b8196c986
|
@ -37,7 +37,26 @@ hb_fallback_shape (hb_font_t *font,
|
||||||
{
|
{
|
||||||
buffer->guess_properties ();
|
buffer->guess_properties ();
|
||||||
|
|
||||||
|
unsigned int count = buffer->len;
|
||||||
|
|
||||||
|
for (unsigned int i = 0; i < count; i++)
|
||||||
|
hb_font_get_glyph (font, buffer->info[i].codepoint, 0, &buffer->info[i].codepoint);
|
||||||
|
|
||||||
|
buffer->clear_positions ();
|
||||||
|
|
||||||
|
for (unsigned int i = 0; i < count; i++) {
|
||||||
|
hb_font_get_glyph_advance_for_direction (font, buffer->info[i].codepoint,
|
||||||
|
buffer->props.direction,
|
||||||
|
&buffer->pos[i].x_advance,
|
||||||
|
&buffer->pos[i].y_advance);
|
||||||
|
hb_font_subtract_glyph_origin_for_direction (font, buffer->info[i].codepoint,
|
||||||
|
buffer->props.direction,
|
||||||
|
&buffer->pos[i].x_offset,
|
||||||
|
&buffer->pos[i].y_offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction))
|
||||||
|
hb_buffer_reverse (buffer);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue