From 1f926fb2b642094a15e686be6a910e709b15ebd0 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Wed, 7 Aug 2019 20:22:20 +0430 Subject: [PATCH] [fvar] Use roundf instead hardcoding round logic --- src/hb-ot-var-fvar-table.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-ot-var-fvar-table.hh b/src/hb-ot-var-fvar-table.hh index 7df81428f..18b9518d3 100644 --- a/src/hb-ot-var-fvar-table.hh +++ b/src/hb-ot-var-fvar-table.hh @@ -237,7 +237,7 @@ struct fvar v = (v - axis.default_value) / (axis.default_value - axis.min_value); else v = (v - axis.default_value) / (axis.max_value - axis.default_value); - return (int) (v * 16384.f + (v >= 0.f ? .5f : -.5f)); + return roundf (v * 16384.f); } unsigned int get_instance_count () const { return instanceCount; }