[HarfBuzz] harfbuzz-ng: Branch 'master' - 6 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Mon Aug 6 15:56:18 PDT 2012
configure.ac | 12 +++++++++---
src/hb-ot-shape-complex-arabic-table.hh | 4 ++--
src/hb-ot-shape-complex-indic.cc | 4 ++--
src/hb-private.hh | 9 ++++++---
src/hb-set-private.hh | 16 ++++++++++------
util/options.cc | 2 +-
6 files changed, 30 insertions(+), 17 deletions(-)
New commits:
commit e3320ecc1b5a7eaccc7c9370b2d1b76850f054be
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Mon Aug 6 11:44:10 2012 -0700
Fix compiler warnings
diff --git a/configure.ac b/configure.ac
index 63833b7..689b6a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,13 +66,19 @@ if test "x$GCC" = "xyes"; then
# Make sure we don't link to libstdc++
CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions"
- # Hide inline methods
- CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
-
# Assorted warnings
CXXFLAGS="$CXXFLAGS -Wcast-align"
case "$host" in
+ *-mingw*)
+ ;;
+ *)
+ # Hide inline methods
+ CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
+ ;;
+ esac
+
+ case "$host" in
arm-*-*)
# Request byte alignment on arm
CXXFLAGS="$CXXFLAGS -mstructure-size-boundary=8"
commit 167b625d988b74572d6b2f646c285b666b650d49
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Aug 5 21:16:26 2012 -0700
[Indic] Minor, move 'blwf' after 'half'
We don't apply them together anyway. Should not make any difference
right now.
diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index ccc4a9d..0dbf412 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -148,8 +148,8 @@ indic_features[] =
{HB_TAG('r','p','h','f'), false},
{HB_TAG('r','k','r','f'), true},
{HB_TAG('p','r','e','f'), false},
- {HB_TAG('b','l','w','f'), false},
{HB_TAG('h','a','l','f'), false},
+ {HB_TAG('b','l','w','f'), false},
{HB_TAG('a','b','v','f'), false},
{HB_TAG('p','s','t','f'), false},
{HB_TAG('c','f','a','r'), false},
@@ -180,8 +180,8 @@ enum {
RPHF,
_RKRF,
PREF,
- BLWF,
HALF,
+ BLWF,
ABVF,
PSTF,
CFAR,
commit 048e3b596fb7fccd3fb5f48de98b6b67788f774a
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat Aug 4 18:04:57 2012 -0700
Speed up hb_set_digest_lowest_bits_t calcs
diff --git a/src/hb-set-private.hh b/src/hb-set-private.hh
index 8beff37..4413579 100644
--- a/src/hb-set-private.hh
+++ b/src/hb-set-private.hh
@@ -83,9 +83,13 @@ struct hb_set_digest_lowest_bits_t
}
inline void add_range (hb_codepoint_t a, hb_codepoint_t b) {
- /* TODO Speedup. */
- for (unsigned int i = a; i < b + 1; i++)
- add (i);
+ if (b - a >= sizeof (mask_t) * 8 - 1)
+ mask = (mask_t) -1;
+ else {
+ mask_t ma = mask_for (a);
+ mask_t mb = mask_for (b);
+ mask |= mb + (mb - ma) - (mb < ma);
+ }
}
inline bool may_have (hb_codepoint_t g) const {
commit 3d1b66a35e1ab3be19335705f310b278d76d66d2
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat Aug 4 17:42:28 2012 -0700
Speed up hb_set_digest_common_bits_t calcs
diff --git a/src/hb-set-private.hh b/src/hb-set-private.hh
index 550b7f2..8beff37 100644
--- a/src/hb-set-private.hh
+++ b/src/hb-set-private.hh
@@ -54,9 +54,9 @@ struct hb_set_digest_common_bits_t
}
inline void add_range (hb_codepoint_t a, hb_codepoint_t b) {
- /* TODO Speedup. */
- for (unsigned int i = a; i < b + 1; i++)
- add (i);
+ /* The negation here stands for ~(x-1). */
+ mask &= -(1 << _hb_bit_storage (a ^ b));
+ value &= mask;
}
inline bool may_have (hb_codepoint_t g) const {
commit bdc48a879a1900138d8caaa8d90fb9fe1e768d1d
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat Aug 4 17:08:38 2012 -0700
Enlarge glyph_name buffer
Lohit Devanagari has a glyph named:
u0924_u094D.half_u0930_u094D.blwf.vatu
diff --git a/util/options.cc b/util/options.cc
index 584190e..3a9496b 100644
--- a/util/options.cc
+++ b/util/options.cc
@@ -747,7 +747,7 @@ format_options_t::serialize_glyphs (hb_buffer_t *buffer,
if (i)
g_string_append_c (gs, '|');
- char glyph_name[32];
+ char glyph_name[128];
if (show_glyph_names) {
hb_font_get_glyph_name (font, info->codepoint, glyph_name, sizeof (glyph_name));
g_string_append_printf (gs, "%s", glyph_name);
commit 25326c2359b0a3e25222b94acd142bc36eff78a4
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat Aug 4 16:43:18 2012 -0700
Rewrite ARRAY_LENGTH as a template function
Such it wouldn't apply to pointers accidentally.
diff --git a/src/hb-ot-shape-complex-arabic-table.hh b/src/hb-ot-shape-complex-arabic-table.hh
index df85086..c66111b 100644
--- a/src/hb-ot-shape-complex-arabic-table.hh
+++ b/src/hb-ot-shape-complex-arabic-table.hh
@@ -914,9 +914,9 @@ static const uint16_t shaping_table[][4] =
#define SHAPING_TABLE_LAST 0x06D3
-static const struct {
+static const struct ligature_set_t {
uint16_t first;
- struct {
+ struct ligature_pairs_t {
uint16_t second;
uint16_t ligature;
} ligatures[4];
diff --git a/src/hb-private.hh b/src/hb-private.hh
index 2f85025..0f1e5ce 100644
--- a/src/hb-private.hh
+++ b/src/hb-private.hh
@@ -66,14 +66,17 @@
#undef MIN
-template <typename Type> static inline Type MIN (const Type &a, const Type &b) { return a < b ? a : b; }
+template <typename Type>
+static inline Type MIN (const Type &a, const Type &b) { return a < b ? a : b; }
#undef MAX
-template <typename Type> static inline Type MAX (const Type &a, const Type &b) { return a > b ? a : b; }
+template <typename Type>
+static inline Type MAX (const Type &a, const Type &b) { return a > b ? a : b; }
#undef ARRAY_LENGTH
-#define ARRAY_LENGTH(__array) ((signed int) (sizeof (__array) / sizeof (__array[0])))
+template <typename Type, unsigned int n>
+static inline unsigned int ARRAY_LENGTH (const Type (&a)[n]) { return n; }
#define HB_STMT_START do
#define HB_STMT_END while (0)
More information about the HarfBuzz
mailing list