diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2009-11-03 15:12:25 -0500 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2009-11-03 20:28:51 -0500 |
commit | 1a9072ec14c2d57a53c90746e182884453e08957 (patch) | |
tree | 4d9d768bd62392093018837994be2657979fa60c /pango/pango-ot-buffer.c | |
parent | 8e9d153733cac83bfc8ce0c068d2af455d0e9a76 (diff) | |
download | pango-1a9072ec14c2d57a53c90746e182884453e08957.tar.gz |
Use external harfbuzz shared library from harfbuzz-ng
Diffstat (limited to 'pango/pango-ot-buffer.c')
-rw-r--r-- | pango/pango-ot-buffer.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/pango/pango-ot-buffer.c b/pango/pango-ot-buffer.c index a4aacc3a..89653603 100644 --- a/pango/pango-ot-buffer.c +++ b/pango/pango-ot-buffer.c @@ -29,6 +29,17 @@ static hb_buffer_t *cached_buffer = NULL; G_LOCK_DEFINE_STATIC (cached_buffer); static hb_buffer_t * +create_buffer (void) +{ + hb_buffer_t *buffer; + + buffer = hb_buffer_create (32); + hb_buffer_set_unicode_funcs (buffer, hb_glib_get_unicode_funcs ()); + + return buffer; +} + +static hb_buffer_t * acquire_buffer (gboolean *free_buffer) { hb_buffer_t *buffer; @@ -36,14 +47,14 @@ acquire_buffer (gboolean *free_buffer) if (G_LIKELY (G_TRYLOCK (cached_buffer))) { if (G_UNLIKELY (!cached_buffer)) - cached_buffer = hb_buffer_create (64); + cached_buffer = create_buffer (); buffer = cached_buffer; *free_buffer = FALSE; } else { - buffer = hb_buffer_create (32); + buffer = create_buffer (); *free_buffer = TRUE; } |