[HarfBuzz] harfbuzz: Branch 'master' - 5 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Fri Aug 9 06:42:20 PDT 2013
TODO | 6 ++----
src/hb-font-private.hh | 8 ++++++--
src/hb-ot-layout-common-private.hh | 4 ++--
3 files changed, 10 insertions(+), 8 deletions(-)
New commits:
commit 7cd4a715848c44be9aec6b6b622cfc2a60b1a5a9
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Aug 9 09:41:48 2013 -0400
Update TODO
diff --git a/TODO b/TODO
index dee6e2e..4808391 100644
--- a/TODO
+++ b/TODO
@@ -25,12 +25,12 @@ API issues to fix before 1.0:
- hb-ft load_flags issues.
-- get_glyph() / get_glyph_variant()?
-
- Add pkg-config files for glue codes (harfbuzz-glib, etc)
- 'const' for getter APIs? (use mutable internally)
+- Remove hb_ot_shape_glyphs_closure()?
+
API additions
=============
commit 515a0ac81e531c95b1bb7f1a3c5df73a9e64b14f
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Aug 9 09:40:59 2013 -0400
Fix compiler warning
diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh
index 86224a1..2f6e804 100644
--- a/src/hb-ot-layout-common-private.hh
+++ b/src/hb-ot-layout-common-private.hh
@@ -1014,7 +1014,7 @@ struct ClassDefFormat2
if (klass == 0)
{
/* Match if there's any glyph that is not listed! */
- hb_codepoint_t g = -1;
+ hb_codepoint_t g = (hb_codepoint_t) -1;
for (unsigned int i = 0; i < count; i++)
{
if (!hb_set_next (glyphs, &g))
@@ -1023,7 +1023,7 @@ struct ClassDefFormat2
return true;
g = rangeRecord[i].end;
}
- if (g != -1 && hb_set_next (glyphs, &g))
+ if (g != (hb_codepoint_t) -1 && hb_set_next (glyphs, &g))
return true;
/* Fall through. */
}
commit 10f964623f003c70f6bdd33423420abda3820ce0
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Aug 9 09:40:01 2013 -0400
Round when scaling values
Doesn't matter for most users since they should be working in a
fixed sub-pixel scale anyway (ie. 22.10, 26.6, 16.16, etc).
diff --git a/TODO b/TODO
index ef009e1..dee6e2e 100644
--- a/TODO
+++ b/TODO
@@ -12,8 +12,6 @@ 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 bdc6259..acea1d7 100644
--- a/src/hb-font-private.hh
+++ b/src/hb-font-private.hh
@@ -461,7 +461,11 @@ struct hb_font_t {
}
private:
- inline hb_position_t em_scale (int16_t v, int scale) { return v * (int64_t) scale / face->get_upem (); }
+ 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;
+ }
};
#define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS
commit df8f70ae5de6181d56efa3f076f14e4d52119a5e
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Aug 9 09:35:10 2013 -0400
Minor
diff --git a/src/hb-font-private.hh b/src/hb-font-private.hh
index c87ad58..bdc6259 100644
--- a/src/hb-font-private.hh
+++ b/src/hb-font-private.hh
@@ -124,7 +124,7 @@ struct hb_face_t {
return blob;
}
- inline unsigned int get_upem (void) const
+ inline HB_PURE_FUNC unsigned int get_upem (void) const
{
if (unlikely (!upem))
load_upem ();
commit ce8badf1808f9fbdd9a22e9215c7475d3afde5ed
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Aug 9 09:31:06 2013 -0400
Minor
diff --git a/src/hb-font-private.hh b/src/hb-font-private.hh
index 3a42f07..c87ad58 100644
--- a/src/hb-font-private.hh
+++ b/src/hb-font-private.hh
@@ -461,7 +461,7 @@ struct hb_font_t {
}
private:
- inline hb_position_t em_scale (int16_t v, int scale) { return v * (int64_t) scale / hb_face_get_upem (this->face); }
+ 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
More information about the HarfBuzz
mailing list