mirror of https://github.com/freetype/freetype
[autofit] Fix scaling of HarfBuzz shaping.
* src/autofit/hbshim.c (af_get_char_index): Scale to units per EM.
This commit is contained in:
parent
ea0367fbfe
commit
f45749b05b
|
@ -1,3 +1,9 @@
|
|||
2014-01-03 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[autofit] Fix scaling of HarfBuzz shaping.
|
||||
|
||||
* src/autofit/hbshim.c (af_get_char_index): Scale to units per EM.
|
||||
|
||||
2014-01-03 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[autofit] Better ftgrid support.
|
||||
|
|
|
@ -369,6 +369,8 @@
|
|||
|
||||
if ( feature )
|
||||
{
|
||||
FT_UInt upem = metrics->globals->face->units_per_EM;
|
||||
|
||||
hb_font_t* font = metrics->globals->hb_font;
|
||||
hb_buffer_t* buf = hb_buffer_create();
|
||||
|
||||
|
@ -379,6 +381,9 @@
|
|||
unsigned int gcount;
|
||||
|
||||
|
||||
/* we shape at a size of units per EM; this means font units */
|
||||
hb_font_set_scale( font, upem, upem );
|
||||
|
||||
/* XXX: is this sufficient for a single character of any script? */
|
||||
hb_buffer_set_direction( buf, HB_DIRECTION_LTR );
|
||||
hb_buffer_set_script( buf, scripts[style_class->script] );
|
||||
|
|
Loading…
Reference in New Issue