[HarfBuzz] harfbuzz: Branch 'master' - 2 commits

Behdad Esfahbod behdad at kemper.freedesktop.org
Tue Sep 3 17:11:54 PDT 2013


 Makefile.am            |    2 ++
 TODO                   |    2 ++
 src/hb-font-private.hh |    6 +-----
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 5a5350b39b81e0128d36ebc81307a6d698a4dc50
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Sep 3 20:11:01 2013 -0400

    Revert "Round when scaling values"
    
    This reverts commit 10f964623f003c70f6bdd33423420abda3820ce0.
    
    See discussion with Khaled Hosny on mailing list.  In short, since
    integers here can be negative, and int division is "round towards
    zero", proper rounding should take sign into account.  Just skip
    doing it again, has been serving us well before.

diff --git a/TODO b/TODO
index 08db6f9..e1aa39c 100644
--- a/TODO
+++ b/TODO
@@ -12,6 +12,8 @@ General fixes:
 - Warn at compile time (and runtime with HB_DEBUG?) if no Unicode / font
   funcs found / set.
 
+- Do proper rounding when scaling from font space?  May be a non-issue.
+
 - Misc features:
   * init/medi/fina/isol for non-cursive scripts
 
diff --git a/src/hb-font-private.hh b/src/hb-font-private.hh
index 620d05e..9638839 100644
--- a/src/hb-font-private.hh
+++ b/src/hb-font-private.hh
@@ -397,11 +397,7 @@ struct hb_font_t {
   }
 
   private:
-  inline hb_position_t em_scale (int16_t v, int scale)
-  {
-    unsigned int upem = face->get_upem ();
-    return (v * (int64_t) scale + upem / 2) / upem;
-  }
+  inline hb_position_t em_scale (int16_t v, int scale) { return v * (int64_t) scale / face->get_upem (); }
 };
 
 #define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS
commit 74ff41c3a573bdf74b60623065eb92a49f055893
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Sep 3 20:09:14 2013 -0400

    Minor

diff --git a/Makefile.am b/Makefile.am
index c98b780..15ccbf8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -55,7 +55,9 @@ DISTCHECK_CONFIGURE_FLAGS = \
 
 # TODO: Copy infrastructure from cairo
 
+# TAR_OPTIONS is not set as env var for 'make dist'.  How to fix that?
 TAR_OPTIONS = --owner=0 --group=0
+
 dist-hook: dist-clear-sticky-bits
 # Clean up any sticky bits we may inherit from parent dir
 dist-clear-sticky-bits:



More information about the HarfBuzz mailing list