[HarfBuzz] harfbuzz: Branch 'master' - 2 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Tue Apr 2 11:09:15 PDT 2013
src/hb-graphite2.cc | 2 +-
src/hb-ot-shape-normalize.cc | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
New commits:
commit 7148dc1a978610af25b4f490691a62d709c8c463
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Apr 2 14:08:53 2013 -0400
[graphite2] Don't crash if language is not set
https://bugs.webkit.org/show_bug.cgi?id=113796
diff --git a/src/hb-graphite2.cc b/src/hb-graphite2.cc
index 16ef9a4..cce8606 100644
--- a/src/hb-graphite2.cc
+++ b/src/hb-graphite2.cc
@@ -226,7 +226,7 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
gr_font *grfont = HB_SHAPER_DATA_GET (font);
const char *lang = hb_language_to_string (hb_buffer_get_language (buffer));
- const char *lang_end = strchr (lang, '-');
+ const char *lang_end = lang ? strchr (lang, '-') : NULL;
int lang_len = lang_end ? lang_end - lang : -1;
gr_feature_val *feats = gr_face_featureval_for_lang (grface, lang ? hb_tag_from_string (lang, lang_len) : 0);
commit a88a62f70f87563725d47b9b6824565e5d6b78ab
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Mar 21 21:02:16 2013 -0400
Minor
diff --git a/src/hb-ot-shape-normalize.cc b/src/hb-ot-shape-normalize.cc
index 344c0ff..2d2b2dd 100644
--- a/src/hb-ot-shape-normalize.cc
+++ b/src/hb-ot-shape-normalize.cc
@@ -170,7 +170,7 @@ decompose (const hb_ot_shape_normalize_context_t *c, bool shortest, hb_codepoint
}
/* Returns 0 if didn't decompose, number of resulting characters otherwise. */
-static inline bool
+static inline unsigned int
decompose_compatibility (const hb_ot_shape_normalize_context_t *c, hb_codepoint_t u)
{
unsigned int len, i;
@@ -191,7 +191,6 @@ decompose_compatibility (const hb_ot_shape_normalize_context_t *c, hb_codepoint_
return len;
}
-/* Returns true if recomposition may be benefitial. */
static inline void
decompose_current_character (const hb_ot_shape_normalize_context_t *c, bool shortest)
{
@@ -231,7 +230,6 @@ handle_variation_selector_cluster (const hb_ot_shape_normalize_context_t *c, uns
}
}
-/* Returns true if recomposition may be benefitial. */
static inline void
decompose_multi_char_cluster (const hb_ot_shape_normalize_context_t *c, unsigned int end)
{
More information about the HarfBuzz
mailing list