additional precision made a difference in extents test

This commit is contained in:
Michiharu Ariza 2018-12-03 16:06:58 -08:00
parent 9e5180cd44
commit 5fff6ab002
3 changed files with 3 additions and 3 deletions

View File

@ -229,7 +229,7 @@ struct Number
{
return (int32_t)(value * 65536.0);
}
inline void set_real (double v) { value = (double)v; }
inline void set_real (double v) { value = v; }
inline double to_real (void) const
{
return value;

View File

@ -169,7 +169,7 @@ struct CFF2CSInterpEnv : CSInterpEnv<BlendArg, CFF2Subrs>
{
if (likely (scalars.len == arg.deltas.len))
{
float v = arg.to_real ();
double v = arg.to_real ();
for (unsigned int i = 0; i < scalars.len; i++)
{
v += scalars[i] * arg.deltas[i].to_real ();

View File

@ -171,7 +171,7 @@ test_extents_cff2_vsindex (void)
g_assert_cmpint (extents.x_bearing, ==, 11);
g_assert_cmpint (extents.y_bearing, ==, 656);
g_assert_cmpint (extents.width, ==, 653);
g_assert_cmpint (extents.height, ==, -656);
g_assert_cmpint (extents.height, ==, -657);
result = hb_font_get_glyph_extents (font, 2, &extents);
g_assert (result);