<div class="gmail_quote">Hi,<div>I am trying to perform a shaping which is independent on a resulting device, so no scaling, no grid-fitting is desired.</div><div><br></div><div>In order to disable the grid-fitting and get as high precision as possible I thought it was sufficient to work in the font design precision - to scale the font to some very high value (like the <i>UpEm</i> value), i.e. using the following code:</div>
<div><br></div><div><i> hb_face_t* const face( hb_ft_face_create( ft_face, NULL ) );</i></div><div><i> hb_font_t* font = hb_font_create( face );</i></div><div><i> unsigned int const upem( hb_face_get_upem (face) );</i></div>
<div><i> hb_font_set_scale( font, upem, upem );</i></div><div> <i>hb_ft_font_set_funcs( font );</i></div><div><br></div><div>But unfortunately it is not enough. The <i>hb_ft_get_glyph_h_kerning()</i> function calls the <i>FT_Get_Kerning</i> with kerning mode set to <i>FT_KERNING_DEFAULT</i>, and for example for <i>Arial font</i> and <i>'T'</i> and <i>'a'</i> character pair (55 and 68 glyph indices) it returns value -256 (instead of correct value -227). It if the scaling seems correct the function still performs some fitting. If i try to change the kerning mode to FT_KERNING_UNSCALED then I get the correct value (-227) but that is probably not a proper fix but just a hack.</div>
<div><br></div><div>Is there an elegant and efficient way to disable both scaling and fitting and perform a device independent full precision shaping?</div><div><br></div><div>Thank you very much.</div><div><br></div><div>
Kind regards,</div><div>Petr</div><div><br></div>
</div><br>