Round, instead of floor, when applying variations

Hoping this would fix remaining text-rendering-tests failures,
but so far no luck.
pull/690/head
Behdad Esfahbod 7 years ago
parent 6dc6f0c9f8
commit 7cdd6ab068
  1. 2
      src/hb-font-private.hh
  2. 1
      src/hb-private.hh

@ -541,7 +541,7 @@ struct hb_font_t {
} }
inline hb_position_t em_scalef (float v, int scale) inline hb_position_t em_scalef (float v, int scale)
{ {
return (hb_position_t) (v * scale / face->get_upem ()); return (hb_position_t) round (v * scale / face->get_upem ());
} }
}; };

@ -40,6 +40,7 @@
#define HB_OT_H_IN #define HB_OT_H_IN
#endif #endif
#include <math.h>
#include <stdlib.h> #include <stdlib.h>
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>

Loading…
Cancel
Save