From 07d682806349aee81f53114778ce0beb23909ed7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 10 Aug 2012 03:28:50 -0400 Subject: [PATCH] Minor --- src/hb-ot-shape-normalize.cc | 25 ++++++++----------------- src/hb-ot-shape.cc | 2 +- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/src/hb-ot-shape-normalize.cc b/src/hb-ot-shape-normalize.cc index e6092d6..23c28cc 100644 --- a/src/hb-ot-shape-normalize.cc +++ b/src/hb-ot-shape-normalize.cc @@ -262,7 +262,7 @@ compose_func (hb_unicode_funcs_t *unicode, static inline void set_glyph (hb_glyph_info_t &info, hb_font_t *font) { - hb_font_get_glyph (font, info.codepoint, 0, &info.glyph_index()); + font->get_glyph (info.codepoint, 0, &info.glyph_index()); } static inline void @@ -287,9 +287,7 @@ skip_char (hb_buffer_t *buffer) } static bool -decompose (hb_font_t *font, hb_buffer_t *buffer, - bool shortest, - hb_codepoint_t ab) +decompose (hb_font_t *font, hb_buffer_t *buffer, bool shortest, hb_codepoint_t ab) { hb_codepoint_t a, b, a_glyph, b_glyph; @@ -323,8 +321,7 @@ decompose (hb_font_t *font, hb_buffer_t *buffer, } static bool -decompose_compatibility (hb_font_t *font, hb_buffer_t *buffer, - hb_codepoint_t u) +decompose_compatibility (hb_font_t *font, hb_buffer_t *buffer, hb_codepoint_t u) { unsigned int len, i; hb_codepoint_t decomposed[HB_UNICODE_MAX_DECOMPOSITION_LEN]; @@ -345,8 +342,7 @@ decompose_compatibility (hb_font_t *font, hb_buffer_t *buffer, } static void -decompose_current_character (hb_font_t *font, hb_buffer_t *buffer, - bool shortest) +decompose_current_character (hb_font_t *font, hb_buffer_t *buffer, bool shortest) { hb_codepoint_t glyph; @@ -359,16 +355,12 @@ decompose_current_character (hb_font_t *font, hb_buffer_t *buffer, next_char (buffer, glyph); else if (decompose_compatibility (font, buffer, buffer->cur().codepoint)) skip_char (buffer); - else { - /* A glyph-not-found case... */ - font->get_glyph (buffer->cur().codepoint, 0, &glyph); - next_char (buffer, glyph); - } + else + next_char (buffer, glyph); /* glyph is initialized in earlier branches. */ } static inline void -handle_variation_selector_cluster (hb_font_t *font, hb_buffer_t *buffer, - unsigned int end) +handle_variation_selector_cluster (hb_font_t *font, hb_buffer_t *buffer, unsigned int end) { for (; buffer->idx < end - 1;) { if (unlikely (buffer->unicode->is_variation_selector (buffer->cur(+1).codepoint))) { @@ -387,8 +379,7 @@ handle_variation_selector_cluster (hb_font_t *font, hb_buffer_t *buffer, } static void -decompose_multi_char_cluster (hb_font_t *font, hb_buffer_t *buffer, - unsigned int end) +decompose_multi_char_cluster (hb_font_t *font, hb_buffer_t *buffer, unsigned int end) { /* TODO Currently if there's a variation-selector we give-up, it's just too hard. */ for (unsigned int i = buffer->idx; i < end; i++) diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 2062102..823eced 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -1,6 +1,6 @@ /* * Copyright © 2009,2010 Red Hat, Inc. - * Copyright © 2010,2011 Google, Inc. + * Copyright © 2010,2011,2012 Google, Inc. * * This is part of HarfBuzz, a text shaping library. * -- 2.7.4