Re: [HarfBuzz] Compile error (using harfbuzz-20120730.tar.bz2 on osx)
On 07/30/2012 07:24 PM, Rolf Langenhuijzen wrote: > I'm not sure about what 'coretext' does or is as shaper, but it seems to work > when I set it to "ot" which makes sense when I want to test ot features. CoreText is the Apple shaping library. I'll disable all shapers except for 'ot' soon. Been lazy on the build system side. behdad ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Re: [HarfBuzz] Compile error (using harfbuzz-20120730.tar.bz2 on osx)
Worked perfectly, thanks. It seems I have to explicitly set the --shapers=ot option to get --features to work. Correct? Locally it says coretext,ot,old,fallback as available shapers. When I check my online version on an Ubuntu config it only shows ot,fallback (no coretext for example). It's also v0.9.0, but I think older than this latest. I'm not sure about what 'coretext' does or is as shaper, but it seems to work when I set it to "ot" which makes sense when I want to test ot features. Rolf On Jul 30, 2012, at 11:49 PM, Behdad Esfahbod wrote: > Fixed. And I uploaded a new tarball (under the same name). > > On 07/30/2012 05:36 PM, Rolf Langenhuijzen wrote: >> You are fast, indeed it helped! But then it goes wrong on some other part: >> >> --- >> ... >> GENlibharfbuzz.la >> Undefined symbols for architecture x86_64: >> "__hb_coretext_shaper_face_data_destroy", referenced from: >> _hb_face_destroy in libharfbuzz_la-hb-font.o >> hb_shape_plan_plan(hb_shape_plan_t*, hb_feature_t const*, unsigned int, >> char const* const*)in libharfbuzz_la-hb-shape-plan.o >> hb_shape_plan_create_cached(hb_face_t*, hb_segment_properties_t const*, >> hb_feature_t const*, unsigned int, char const* const*)in >> libharfbuzz_la-hb-shape-plan.o >> "__hb_coretext_shaper_font_data_destroy", referenced from: >> _hb_font_destroy in libharfbuzz_la-hb-font.o >> hb_shape_plan_execute(hb_shape_plan_t*, hb_font_t*, hb_buffer_t*, >> hb_feature_t const*, unsigned int)in libharfbuzz_la-hb-shape-plan.o >> "__hb_coretext_shape", referenced from: >> hb_shape_plan_plan(hb_shape_plan_t*, hb_feature_t const*, unsigned int, >> char const* const*)in libharfbuzz_la-hb-shape-plan.o >> hb_shape_plan_execute(hb_shape_plan_t*, hb_font_t*, hb_buffer_t*, >> hb_feature_t const*, unsigned int)in libharfbuzz_la-hb-shape-plan.o >> hb_shape_plan_create_cached(hb_face_t*, hb_segment_properties_t const*, >> hb_feature_t const*, unsigned int, char const* const*)in >> libharfbuzz_la-hb-shape-plan.o >> all_shapers in libharfbuzz_la-hb-shaper.o >> "__hb_coretext_shaper_face_data_create", referenced from: >> hb_shape_plan_plan(hb_shape_plan_t*, hb_feature_t const*, unsigned int, >> char const* const*)in libharfbuzz_la-hb-shape-plan.o >> hb_shape_plan_create_cached(hb_face_t*, hb_segment_properties_t const*, >> hb_feature_t const*, unsigned int, char const* const*)in >> libharfbuzz_la-hb-shape-plan.o >> "__hb_coretext_shaper_shape_plan_data_create", referenced from: >> hb_shape_plan_plan(hb_shape_plan_t*, hb_feature_t const*, unsigned int, >> char const* const*)in libharfbuzz_la-hb-shape-plan.o >> "__hb_coretext_shaper_font_data_create", referenced from: >> hb_shape_plan_execute(hb_shape_plan_t*, hb_font_t*, hb_buffer_t*, >> hb_feature_t const*, unsigned int)in libharfbuzz_la-hb-shape-plan.o >> "__hb_coretext_shaper_shape_plan_data_destroy", referenced from: >> hb_shape_plan_destroy(hb_shape_plan_t*) in >> libharfbuzz_la-hb-shape-plan.o >> ld: symbol(s) not found for architecture x86_64 >> collect2: ld returned 1 exit status >> make[4]: *** [libharfbuzz.la] Error 1 >> make[3]: *** [all-recursive] Error 1 >> make[2]: *** [all] Error 2 >> make[1]: *** [all-recursive] Error 1 >> make: *** [all] Error 2 >> --- >> >> Rolf >> >> On Jul 30, 2012, at 10:45 PM, Jonathan Kew wrote: >> >>> On 30/7/12 21:25, Rolf Langenhuijzen wrote: I tried installing the latest version. ./configure runs without problems. when I do "make" it stops: --- … CXXlibharfbuzz_la-hb-ot-layout.lo In file included from hb-ot-layout.cc:34: hb-ot-layout-gsub-table.hh: In member function ‘bool Ligature::apply(hb_apply_context_t*) const’: hb-ot-layout-gsub-table.hh:588: error: no matching function for call to ‘MAX(unsigned int, int)’ hb-ot-layout-gsub-table.hh:607: error: no matching function for call to ‘MAX(unsigned int, int)’ make[4]: *** [libharfbuzz_la-hb-ot-layout.lo] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 (quits) --- >>> >>> The attached patch should fix this. >>> >>> JK >>> >>> >>> ___ >>> HarfBuzz mailing list >>> HarfBuzz@lists.freedesktop.org >>> http://lists.freedesktop.org/mailman/listinfo/harfbuzz >> >> ___ >> HarfBuzz mailing list >> HarfBuzz@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/harfbuzz >> ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Re: [HarfBuzz] Compile error (using harfbuzz-20120730.tar.bz2 on osx)
On 07/30/2012 05:51 PM, Jonathan Kew wrote: > On 30/7/12 22:36, Rolf Langenhuijzen wrote: >> You are fast, indeed it helped! But then it goes wrong on some other part: >> > > Oh yes, the Core Text backend is currently broken, because Behdad has been > re-working some of the internal interfaces. > > I'm currently just omitting it from the build by commenting out the relevant > piece of configure.ac and just hard-coding "have_coretext=false" instead: That's so old school ;). > diff --git a/configure.ac b/configure.ac > index 63833b7..3819b7f 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -194,14 +194,15 @@ AM_CONDITIONAL(HAVE_UNISCRIBE, $have_uniscribe) > > dnl > === > > -AC_CHECK_HEADERS(ApplicationServices/ApplicationServices.h, > have_coretext=true, have_coretext=false) > -if $have_coretext; then > - CORETEXT_CFLAGS= > - CORETEXT_LIBS= > - AC_SUBST(CORETEXT_CFLAGS) > - AC_SUBST(CORETEXT_LIBS) > - AC_DEFINE(HAVE_CORETEXT, 1, [Have Core Text backend]) > -fi > +#AC_CHECK_HEADERS(ApplicationServices/ApplicationServices.h, > have_coretext=true, have_coretext=false) > +#if $have_coretext; then > +# CORETEXT_CFLAGS= > +# CORETEXT_LIBS= > +# AC_SUBST(CORETEXT_CFLAGS) > +# AC_SUBST(CORETEXT_LIBS) > +# AC_DEFINE(HAVE_CORETEXT, 1, [Have Core Text backend]) > +#fi > +have_coretext=false > AM_CONDITIONAL(HAVE_CORETEXT, $have_coretext) > > dnl > === > > > ___ > HarfBuzz mailing list > HarfBuzz@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/harfbuzz > ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz
[HarfBuzz] harfbuzz-ng: Branch 'master'
src/hb-uniscribe.cc | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) New commits: commit 713914d3203109a8e9213f5a1d3b384730703ce9 Author: Behdad Esfahbod Date: Mon Jul 30 17:54:38 2012 -0400 [Uniscribe] Clean up a bit diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc index dc2c6d9..0ca87ec 100644 --- a/src/hb-uniscribe.cc +++ b/src/hb-uniscribe.cc @@ -58,13 +58,6 @@ DWORD GetFontData( HB_SHAPER_DATA_ENSURE_DECLARE(uniscribe, face) HB_SHAPER_DATA_ENSURE_DECLARE(uniscribe, font) -static hb_bool_t -hb_uniscribe_font_ensure (hb_font_t *font) -{ - hb_face_t *face = font->face; - return hb_uniscribe_shaper_face_data_ensure (face) && - hb_uniscribe_shaper_font_data_ensure (font); -} /* @@ -103,8 +96,7 @@ _hb_uniscribe_shaper_face_data_create (hb_face_t *face) void _hb_uniscribe_shaper_face_data_destroy (hb_uniscribe_shaper_face_data_t *data) { - if (data->fh) -RemoveFontMemResourceEx (data->fh); + RemoveFontMemResourceEx (data->fh); free (data); } @@ -155,6 +147,8 @@ populate_log_font (LOGFONTW *lf, hb_uniscribe_shaper_font_data_t * _hb_uniscribe_shaper_font_data_create (hb_font_t *font) { + if (unlikely (!hb_uniscribe_shaper_face_data_ensure (font->face))) return NULL; + hb_uniscribe_shaper_font_data_t *data = (hb_uniscribe_shaper_font_data_t *) calloc (1, sizeof (hb_uniscribe_shaper_font_data_t)); if (unlikely (!data)) return NULL; @@ -223,7 +217,7 @@ _hb_uniscribe_shaper_shape_plan_data_destroy (hb_uniscribe_shaper_shape_plan_dat LOGFONTW * hb_uniscribe_font_get_logfontw (hb_font_t *font) { - if (unlikely (!hb_uniscribe_font_ensure (font))) + if (unlikely (!hb_uniscribe_shaper_font_data_ensure (font))) return NULL; return NULL; hb_uniscribe_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font); return &font_data->log_font; @@ -232,8 +226,7 @@ hb_uniscribe_font_get_logfontw (hb_font_t *font) HFONT hb_uniscribe_font_get_hfont (hb_font_t *font) { - if (unlikely (!hb_uniscribe_font_ensure (font))) -return NULL; + if (unlikely (!hb_uniscribe_shaper_font_data_ensure (font))) return NULL; hb_uniscribe_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font); return font_data->hfont; } ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Re: [HarfBuzz] Compile error (using harfbuzz-20120730.tar.bz2 on osx)
On 30/7/12 22:36, Rolf Langenhuijzen wrote: > You are fast, indeed it helped! But then it goes wrong on some other part: > Oh yes, the Core Text backend is currently broken, because Behdad has been re-working some of the internal interfaces. I'm currently just omitting it from the build by commenting out the relevant piece of configure.ac and just hard-coding "have_coretext=false" instead: diff --git a/configure.ac b/configure.ac index 63833b7..3819b7f 100644 --- a/configure.ac +++ b/configure.ac @@ -194,14 +194,15 @@ AM_CONDITIONAL(HAVE_UNISCRIBE, $have_uniscribe) dnl === -AC_CHECK_HEADERS(ApplicationServices/ApplicationServices.h, have_coretext=true, have_coretext=false) -if $have_coretext; then - CORETEXT_CFLAGS= - CORETEXT_LIBS= - AC_SUBST(CORETEXT_CFLAGS) - AC_SUBST(CORETEXT_LIBS) - AC_DEFINE(HAVE_CORETEXT, 1, [Have Core Text backend]) -fi +#AC_CHECK_HEADERS(ApplicationServices/ApplicationServices.h, have_coretext=true, have_coretext=false) +#if $have_coretext; then +# CORETEXT_CFLAGS= +# CORETEXT_LIBS= +# AC_SUBST(CORETEXT_CFLAGS) +# AC_SUBST(CORETEXT_LIBS) +# AC_DEFINE(HAVE_CORETEXT, 1, [Have Core Text backend]) +#fi +have_coretext=false AM_CONDITIONAL(HAVE_CORETEXT, $have_coretext) dnl === ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Re: [HarfBuzz] Compile error (using harfbuzz-20120730.tar.bz2 on osx)
Fixed. And I uploaded a new tarball (under the same name). On 07/30/2012 05:36 PM, Rolf Langenhuijzen wrote: > You are fast, indeed it helped! But then it goes wrong on some other part: > > --- > ... > GENlibharfbuzz.la > Undefined symbols for architecture x86_64: > "__hb_coretext_shaper_face_data_destroy", referenced from: > _hb_face_destroy in libharfbuzz_la-hb-font.o > hb_shape_plan_plan(hb_shape_plan_t*, hb_feature_t const*, unsigned int, > char const* const*)in libharfbuzz_la-hb-shape-plan.o > hb_shape_plan_create_cached(hb_face_t*, hb_segment_properties_t const*, > hb_feature_t const*, unsigned int, char const* const*)in > libharfbuzz_la-hb-shape-plan.o > "__hb_coretext_shaper_font_data_destroy", referenced from: > _hb_font_destroy in libharfbuzz_la-hb-font.o > hb_shape_plan_execute(hb_shape_plan_t*, hb_font_t*, hb_buffer_t*, > hb_feature_t const*, unsigned int)in libharfbuzz_la-hb-shape-plan.o > "__hb_coretext_shape", referenced from: > hb_shape_plan_plan(hb_shape_plan_t*, hb_feature_t const*, unsigned int, > char const* const*)in libharfbuzz_la-hb-shape-plan.o > hb_shape_plan_execute(hb_shape_plan_t*, hb_font_t*, hb_buffer_t*, > hb_feature_t const*, unsigned int)in libharfbuzz_la-hb-shape-plan.o > hb_shape_plan_create_cached(hb_face_t*, hb_segment_properties_t const*, > hb_feature_t const*, unsigned int, char const* const*)in > libharfbuzz_la-hb-shape-plan.o > all_shapers in libharfbuzz_la-hb-shaper.o > "__hb_coretext_shaper_face_data_create", referenced from: > hb_shape_plan_plan(hb_shape_plan_t*, hb_feature_t const*, unsigned int, > char const* const*)in libharfbuzz_la-hb-shape-plan.o > hb_shape_plan_create_cached(hb_face_t*, hb_segment_properties_t const*, > hb_feature_t const*, unsigned int, char const* const*)in > libharfbuzz_la-hb-shape-plan.o > "__hb_coretext_shaper_shape_plan_data_create", referenced from: > hb_shape_plan_plan(hb_shape_plan_t*, hb_feature_t const*, unsigned int, > char const* const*)in libharfbuzz_la-hb-shape-plan.o > "__hb_coretext_shaper_font_data_create", referenced from: > hb_shape_plan_execute(hb_shape_plan_t*, hb_font_t*, hb_buffer_t*, > hb_feature_t const*, unsigned int)in libharfbuzz_la-hb-shape-plan.o > "__hb_coretext_shaper_shape_plan_data_destroy", referenced from: > hb_shape_plan_destroy(hb_shape_plan_t*) in > libharfbuzz_la-hb-shape-plan.o > ld: symbol(s) not found for architecture x86_64 > collect2: ld returned 1 exit status > make[4]: *** [libharfbuzz.la] Error 1 > make[3]: *** [all-recursive] Error 1 > make[2]: *** [all] Error 2 > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 > --- > > Rolf > > On Jul 30, 2012, at 10:45 PM, Jonathan Kew wrote: > >> On 30/7/12 21:25, Rolf Langenhuijzen wrote: >>> I tried installing the latest version. >>> ./configure runs without problems. >>> when I do "make" it stops: >>> --- >>> … >>> CXXlibharfbuzz_la-hb-ot-layout.lo >>> In file included from hb-ot-layout.cc:34: >>> hb-ot-layout-gsub-table.hh: In member function ‘bool >>> Ligature::apply(hb_apply_context_t*) const’: >>> hb-ot-layout-gsub-table.hh:588: error: no matching function for call to >>> ‘MAX(unsigned int, int)’ >>> hb-ot-layout-gsub-table.hh:607: error: no matching function for call to >>> ‘MAX(unsigned int, int)’ >>> make[4]: *** [libharfbuzz_la-hb-ot-layout.lo] Error 1 >>> make[3]: *** [all-recursive] Error 1 >>> make[2]: *** [all] Error 2 >>> make[1]: *** [all-recursive] Error 1 >>> make: *** [all] Error 2 >>> (quits) >>> --- >> >> The attached patch should fix this. >> >> JK >> >> >> ___ >> HarfBuzz mailing list >> HarfBuzz@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/harfbuzz > > ___ > HarfBuzz mailing list > HarfBuzz@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/harfbuzz > ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz
[HarfBuzz] harfbuzz-ng: Branch 'master'
src/hb-coretext.cc | 161 ++--- 1 file changed, 80 insertions(+), 81 deletions(-) New commits: commit 301168dae77a63ee25adfb26ce2b54a708f83791 Author: Behdad Esfahbod Date: Mon Jul 30 17:48:04 2012 -0400 [CoreText] Port to shape_plan infrastructure diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc index 6e09c5e..5e1be9c 100644 --- a/src/hb-coretext.cc +++ b/src/hb-coretext.cc @@ -1,5 +1,6 @@ /* * Copyright © 2012 Mozilla Foundation. + * Copyright © 2012 Google, Inc. * * This is part of HarfBuzz, a text shaping library. * @@ -22,10 +23,11 @@ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. * * Mozilla Author(s): Jonathan Kew + * Google Author(s): Behdad Esfahbod */ #define HB_SHAPER coretext -#include "hb-shaper-private.hh" +#include "hb-shaper-impl-private.hh" #define GlyphID GlyphID_mac #include @@ -33,28 +35,23 @@ #include "hb-coretext.h" -#include "hb-font-private.hh" -#include "hb-buffer-private.hh" - #ifndef HB_DEBUG_CORETEXT #define HB_DEBUG_CORETEXT (HB_DEBUG+0) #endif -static hb_user_data_key_t hb_coretext_data_key; +HB_SHAPER_DATA_ENSURE_DECLARE(coretext, face) +HB_SHAPER_DATA_ENSURE_DECLARE(coretext, font) -static struct hb_coretext_face_data_t { - CGFontRef cg_font; -} _hb_coretext_face_data_nil = {0}; -static void -_hb_coretext_face_data_destroy (hb_coretext_face_data_t *data) -{ - if (data->cg_font) -CFRelease (data->cg_font); - free (data); -} +/* + * shaper face data + */ + +struct hb_coretext_shaper_face_data_t { + CGFontRef cg_font; +}; static void release_data (void *info, const void *data, size_t size) @@ -65,16 +62,12 @@ release_data (void *info, const void *data, size_t size) hb_blob_destroy ((hb_blob_t *) info); } -static hb_coretext_face_data_t * -_hb_coretext_face_get_data (hb_face_t *face) +hb_coretext_shaper_face_data_t * +_hb_coretext_shaper_face_data_create (hb_face_t *face) { - hb_coretext_face_data_t *data = (hb_coretext_face_data_t *) hb_face_get_user_data (face, &hb_coretext_data_key); - if (likely (data)) return data; - - data = (hb_coretext_face_data_t *) calloc (1, sizeof (hb_coretext_face_data_t)); + hb_coretext_shaper_face_data_t *data = (hb_coretext_shaper_face_data_t *) calloc (1, sizeof (hb_coretext_shaper_face_data_t)); if (unlikely (!data)) -return &_hb_coretext_face_data_nil; - +return NULL; hb_blob_t *blob = hb_face_reference_blob (face); unsigned int blob_length; @@ -86,86 +79,103 @@ _hb_coretext_face_get_data (hb_face_t *face) data->cg_font = CGFontCreateWithDataProvider (provider); CGDataProviderRelease (provider); - if (unlikely (!data->cg_font)) + if (unlikely (!data->cg_font)) { DEBUG_MSG (CORETEXT, face, "Face CGFontCreateWithDataProvider() failed"); - - - if (unlikely (!hb_face_set_user_data (face, &hb_coretext_data_key, data, -(hb_destroy_func_t) _hb_coretext_face_data_destroy, -false))) - { -_hb_coretext_face_data_destroy (data); -data = (hb_coretext_face_data_t *) hb_face_get_user_data (face, &hb_coretext_data_key); -if (data) - return data; -else - return &_hb_coretext_face_data_nil; +free (data); +return NULL; } return data; } - -static struct hb_coretext_font_data_t { - CTFontRef ct_font; -} _hb_coretext_font_data_nil = {0}; - -static void -_hb_coretext_font_data_destroy (hb_coretext_font_data_t *data) +void +_hb_coretext_shaper_face_data_destroy (hb_coretext_shaper_face_data_t *data) { - if (data->ct_font) -CFRelease (data->ct_font); + CFRelease (data->cg_font); free (data); } -static hb_coretext_font_data_t * -_hb_coretext_font_get_data (hb_font_t *font) + +/* + * shaper font data + */ + +struct hb_coretext_shaper_font_data_t { + CTFontRef ct_font; +}; + +hb_coretext_shaper_font_data_t * +_hb_coretext_shaper_font_data_create (hb_font_t *font) { - hb_coretext_font_data_t *data = (hb_coretext_font_data_t *) hb_font_get_user_data (font, &hb_coretext_data_key); - if (likely (data)) return data; + if (unlikely (!hb_coretext_shaper_face_data_ensure (font->face))) return NULL; - data = (hb_coretext_font_data_t *) calloc (1, sizeof (hb_coretext_font_data_t)); + hb_coretext_shaper_font_data_t *data = (hb_coretext_shaper_font_data_t *) calloc (1, sizeof (hb_coretext_shaper_font_data_t)); if (unlikely (!data)) -return &_hb_coretext_font_data_nil; +return NULL; - hb_coretext_face_data_t *face_data = _hb_coretext_face_get_data (font->face); + hb_face_t *face = font->face; + hb_coretext_shaper_face_data_t *face_data = HB_SHAPER_DATA_GET (face); data->ct_font = CTFontCreateWithGraphicsFont (face_data->cg_font, font->y_scale, NULL, NULL); - if (unlikely (!data->ct_font)) + if (unlikely (!data->ct_font)) { DEBUG_MSG (CORETEXT, font, "Font CTFontCreateWithGraphicsFont() failed"); - - if (un
Re: [HarfBuzz] Compile error (using harfbuzz-20120730.tar.bz2 on osx)
Fixing that. Wait another 5min :) On 07/30/2012 05:36 PM, Rolf Langenhuijzen wrote: > You are fast, indeed it helped! But then it goes wrong on some other part: > > --- > ... > GENlibharfbuzz.la > Undefined symbols for architecture x86_64: > "__hb_coretext_shaper_face_data_destroy", referenced from: > _hb_face_destroy in libharfbuzz_la-hb-font.o > hb_shape_plan_plan(hb_shape_plan_t*, hb_feature_t const*, unsigned int, > char const* const*)in libharfbuzz_la-hb-shape-plan.o > hb_shape_plan_create_cached(hb_face_t*, hb_segment_properties_t const*, > hb_feature_t const*, unsigned int, char const* const*)in > libharfbuzz_la-hb-shape-plan.o > "__hb_coretext_shaper_font_data_destroy", referenced from: > _hb_font_destroy in libharfbuzz_la-hb-font.o > hb_shape_plan_execute(hb_shape_plan_t*, hb_font_t*, hb_buffer_t*, > hb_feature_t const*, unsigned int)in libharfbuzz_la-hb-shape-plan.o > "__hb_coretext_shape", referenced from: > hb_shape_plan_plan(hb_shape_plan_t*, hb_feature_t const*, unsigned int, > char const* const*)in libharfbuzz_la-hb-shape-plan.o > hb_shape_plan_execute(hb_shape_plan_t*, hb_font_t*, hb_buffer_t*, > hb_feature_t const*, unsigned int)in libharfbuzz_la-hb-shape-plan.o > hb_shape_plan_create_cached(hb_face_t*, hb_segment_properties_t const*, > hb_feature_t const*, unsigned int, char const* const*)in > libharfbuzz_la-hb-shape-plan.o > all_shapers in libharfbuzz_la-hb-shaper.o > "__hb_coretext_shaper_face_data_create", referenced from: > hb_shape_plan_plan(hb_shape_plan_t*, hb_feature_t const*, unsigned int, > char const* const*)in libharfbuzz_la-hb-shape-plan.o > hb_shape_plan_create_cached(hb_face_t*, hb_segment_properties_t const*, > hb_feature_t const*, unsigned int, char const* const*)in > libharfbuzz_la-hb-shape-plan.o > "__hb_coretext_shaper_shape_plan_data_create", referenced from: > hb_shape_plan_plan(hb_shape_plan_t*, hb_feature_t const*, unsigned int, > char const* const*)in libharfbuzz_la-hb-shape-plan.o > "__hb_coretext_shaper_font_data_create", referenced from: > hb_shape_plan_execute(hb_shape_plan_t*, hb_font_t*, hb_buffer_t*, > hb_feature_t const*, unsigned int)in libharfbuzz_la-hb-shape-plan.o > "__hb_coretext_shaper_shape_plan_data_destroy", referenced from: > hb_shape_plan_destroy(hb_shape_plan_t*) in > libharfbuzz_la-hb-shape-plan.o > ld: symbol(s) not found for architecture x86_64 > collect2: ld returned 1 exit status > make[4]: *** [libharfbuzz.la] Error 1 > make[3]: *** [all-recursive] Error 1 > make[2]: *** [all] Error 2 > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 > --- > > Rolf > > On Jul 30, 2012, at 10:45 PM, Jonathan Kew wrote: > >> On 30/7/12 21:25, Rolf Langenhuijzen wrote: >>> I tried installing the latest version. >>> ./configure runs without problems. >>> when I do "make" it stops: >>> --- >>> … >>> CXXlibharfbuzz_la-hb-ot-layout.lo >>> In file included from hb-ot-layout.cc:34: >>> hb-ot-layout-gsub-table.hh: In member function ‘bool >>> Ligature::apply(hb_apply_context_t*) const’: >>> hb-ot-layout-gsub-table.hh:588: error: no matching function for call to >>> ‘MAX(unsigned int, int)’ >>> hb-ot-layout-gsub-table.hh:607: error: no matching function for call to >>> ‘MAX(unsigned int, int)’ >>> make[4]: *** [libharfbuzz_la-hb-ot-layout.lo] Error 1 >>> make[3]: *** [all-recursive] Error 1 >>> make[2]: *** [all] Error 2 >>> make[1]: *** [all-recursive] Error 1 >>> make: *** [all] Error 2 >>> (quits) >>> --- >> >> The attached patch should fix this. >> >> JK >> >> >> ___ >> HarfBuzz mailing list >> HarfBuzz@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/harfbuzz > > ___ > HarfBuzz mailing list > HarfBuzz@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/harfbuzz > ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Re: [HarfBuzz] Compile error (using harfbuzz-20120730.tar.bz2 on osx)
You are fast, indeed it helped! But then it goes wrong on some other part: --- ... GENlibharfbuzz.la Undefined symbols for architecture x86_64: "__hb_coretext_shaper_face_data_destroy", referenced from: _hb_face_destroy in libharfbuzz_la-hb-font.o hb_shape_plan_plan(hb_shape_plan_t*, hb_feature_t const*, unsigned int, char const* const*)in libharfbuzz_la-hb-shape-plan.o hb_shape_plan_create_cached(hb_face_t*, hb_segment_properties_t const*, hb_feature_t const*, unsigned int, char const* const*)in libharfbuzz_la-hb-shape-plan.o "__hb_coretext_shaper_font_data_destroy", referenced from: _hb_font_destroy in libharfbuzz_la-hb-font.o hb_shape_plan_execute(hb_shape_plan_t*, hb_font_t*, hb_buffer_t*, hb_feature_t const*, unsigned int)in libharfbuzz_la-hb-shape-plan.o "__hb_coretext_shape", referenced from: hb_shape_plan_plan(hb_shape_plan_t*, hb_feature_t const*, unsigned int, char const* const*)in libharfbuzz_la-hb-shape-plan.o hb_shape_plan_execute(hb_shape_plan_t*, hb_font_t*, hb_buffer_t*, hb_feature_t const*, unsigned int)in libharfbuzz_la-hb-shape-plan.o hb_shape_plan_create_cached(hb_face_t*, hb_segment_properties_t const*, hb_feature_t const*, unsigned int, char const* const*)in libharfbuzz_la-hb-shape-plan.o all_shapers in libharfbuzz_la-hb-shaper.o "__hb_coretext_shaper_face_data_create", referenced from: hb_shape_plan_plan(hb_shape_plan_t*, hb_feature_t const*, unsigned int, char const* const*)in libharfbuzz_la-hb-shape-plan.o hb_shape_plan_create_cached(hb_face_t*, hb_segment_properties_t const*, hb_feature_t const*, unsigned int, char const* const*)in libharfbuzz_la-hb-shape-plan.o "__hb_coretext_shaper_shape_plan_data_create", referenced from: hb_shape_plan_plan(hb_shape_plan_t*, hb_feature_t const*, unsigned int, char const* const*)in libharfbuzz_la-hb-shape-plan.o "__hb_coretext_shaper_font_data_create", referenced from: hb_shape_plan_execute(hb_shape_plan_t*, hb_font_t*, hb_buffer_t*, hb_feature_t const*, unsigned int)in libharfbuzz_la-hb-shape-plan.o "__hb_coretext_shaper_shape_plan_data_destroy", referenced from: hb_shape_plan_destroy(hb_shape_plan_t*) in libharfbuzz_la-hb-shape-plan.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make[4]: *** [libharfbuzz.la] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 --- Rolf On Jul 30, 2012, at 10:45 PM, Jonathan Kew wrote: > On 30/7/12 21:25, Rolf Langenhuijzen wrote: >> I tried installing the latest version. >> ./configure runs without problems. >> when I do "make" it stops: >> --- >> … >> CXXlibharfbuzz_la-hb-ot-layout.lo >> In file included from hb-ot-layout.cc:34: >> hb-ot-layout-gsub-table.hh: In member function ‘bool >> Ligature::apply(hb_apply_context_t*) const’: >> hb-ot-layout-gsub-table.hh:588: error: no matching function for call to >> ‘MAX(unsigned int, int)’ >> hb-ot-layout-gsub-table.hh:607: error: no matching function for call to >> ‘MAX(unsigned int, int)’ >> make[4]: *** [libharfbuzz_la-hb-ot-layout.lo] Error 1 >> make[3]: *** [all-recursive] Error 1 >> make[2]: *** [all] Error 2 >> make[1]: *** [all-recursive] Error 1 >> make: *** [all] Error 2 >> (quits) >> --- > > The attached patch should fix this. > > JK > > > ___ > HarfBuzz mailing list > HarfBuzz@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/harfbuzz ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz
[HarfBuzz] harfbuzz-ng: Branch 'master'
src/hb-ot-layout-gsub-table.hh |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 6cdfd14bb19d60ac3d6b20ff611408432254f273 Author: Behdad Esfahbod Date: Mon Jul 30 17:22:17 2012 -0400 Fix build on Mac diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index 4ad61a9..bdc7b38 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -585,7 +585,7 @@ struct Ligature { if (!is_mark_ligature) { unsigned int new_lig_comp = components_so_far - last_num_components + - MIN (MAX (get_lig_comp (c->buffer->cur()), 1), last_num_components); + MIN (MAX (get_lig_comp (c->buffer->cur()), 1u), last_num_components); set_lig_props_for_mark (c->buffer->cur(), lig_id, new_lig_comp); } c->buffer->next_glyph (); @@ -604,7 +604,7 @@ struct Ligature for (unsigned int i = c->buffer->idx; i < c->buffer->len; i++) { if (last_lig_id == get_lig_id (c->buffer->info[i])) { unsigned int new_lig_comp = components_so_far - last_num_components + - MIN (MAX (get_lig_comp (c->buffer->info[i]), 1), last_num_components); + MIN (MAX (get_lig_comp (c->buffer->info[i]), 1u), last_num_components); set_lig_props_for_mark (c->buffer->info[i], lig_id, new_lig_comp); } else break; ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz
[HarfBuzz] harfbuzz-ng: Branch 'master' - 4 commits
src/hb-old/harfbuzz-arabic.c| 12 +++--- src/hb-old/harfbuzz-gpos.c | 6 ++--- src/hb-old/harfbuzz-gsub.c | 6 ++--- src/hb-old/harfbuzz-tibetan.c | 1 src/hb-ot-shape-complex-arabic.cc | 2 - src/hb-ot-shape-complex-indic.cc| 4 --- src/hb-ot-shape-complex-misc.cc | 12 +++--- src/hb-ot-shape-complex-private.hh | 9 +++ src/hb-ot-shape.cc | 4 ++- src/hb-unicode.cc | 8 ++ src/indic.cc| 11 ++--- test/shaping/texts/in-tree/shaper-default/script-hebrew/misc/diacritics.txt | 1 12 files changed, 51 insertions(+), 25 deletions(-) New commits: commit 7e34601dededd521bcef15111e39293df3d0d13d Author: Behdad Esfahbod Date: Mon Jul 30 14:53:41 2012 -0400 Unbreak Hangul jamo composition When we removed the separate Hangul shaper, the specific normalization preference of Hangul was lost. Fix that. Also, the Thai shaper was copied from Hangul, so had the fully-composed normalization behavior, which was unnecessary. So, fix that too. diff --git a/src/hb-ot-shape-complex-arabic.cc b/src/hb-ot-shape-complex-arabic.cc index 75f5fe9..1f63c12 100644 --- a/src/hb-ot-shape-complex-arabic.cc +++ b/src/hb-ot-shape-complex-arabic.cc @@ -206,7 +206,7 @@ _hb_ot_shape_complex_override_features_arabic (hb_ot_map_builder_t *map, } hb_ot_shape_normalization_mode_t -_hb_ot_shape_complex_normalization_preference_arabic (void) +_hb_ot_shape_complex_normalization_preference_arabic (const hb_segment_properties_t *props) { return HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS; } diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index e4c151a..c7025ff 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -420,10 +420,8 @@ _hb_ot_shape_complex_override_features_indic (hb_ot_map_builder_t *map, hb_ot_shape_normalization_mode_t -_hb_ot_shape_complex_normalization_preference_indic (void) +_hb_ot_shape_complex_normalization_preference_indic (const hb_segment_properties_t *props) { - /* We want split matras decomposed by the common shaping logic. */ - /* XXX sort this out after adding per-shaper normalizers. */ return HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS; } diff --git a/src/hb-ot-shape-complex-misc.cc b/src/hb-ot-shape-complex-misc.cc index 4578f0b..4b9e6a6 100644 --- a/src/hb-ot-shape-complex-misc.cc +++ b/src/hb-ot-shape-complex-misc.cc @@ -79,8 +79,14 @@ _hb_ot_shape_complex_override_features_default (hb_ot_map_builder_t *map HB_UNUS } hb_ot_shape_normalization_mode_t -_hb_ot_shape_complex_normalization_preference_default (void) +_hb_ot_shape_complex_normalization_preference_default (const hb_segment_properties_t *props) { + switch ((hb_tag_t) props->script) + { +/* Unicode-1.1 additions */ +case HB_SCRIPT_HANGUL: + return HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL; + } return HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS; } @@ -108,9 +114,9 @@ _hb_ot_shape_complex_override_features_thai (hb_ot_map_builder_t *map HB_UNUSED, } hb_ot_shape_normalization_mode_t -_hb_ot_shape_complex_normalization_preference_thai (void) +_hb_ot_shape_complex_normalization_preference_thai (const hb_segment_properties_t *props HB_UNUSED) { - return HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL; + return HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS; } void diff --git a/src/hb-ot-shape-complex-private.hh b/src/hb-ot-shape-complex-private.hh index d444cd6..689ca61 100644 --- a/src/hb-ot-shape-complex-private.hh +++ b/src/hb-ot-shape-complex-private.hh @@ -270,23 +270,22 @@ hb_ot_shape_complex_override_features (hb_ot_complex_shaper_t shaper, * normalization_preference() * * Called during shape_execute(). - * - * Shapers should return true if it prefers decomposed (NFD) input rather than precomposed (NFC). */ -typedef hb_ot_shape_normalization_mode_t hb_ot_shape_complex_normalization_preference_func_t (void); +typedef hb_ot_shape_normalization_mode_t hb_ot_shape_complex_normalization_preference_func_t (const hb_segment_properties_t *props HB_UNUSED); #define HB_COMPLEX_SHAPER_IMPLEMENT(name) \ HB_INTERNAL hb_ot_shape_complex_normalization_preference_func_t _hb_ot_shape_complex_normalization_preference_##name; HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS #undef HB_COMPLEX_SHAPER_IMPLEMENT static inline hb_ot_shape_normalization_mode_t -hb_ot_shape_complex_n
Re: [HarfBuzz] Compile error (using harfbuzz-20120730.tar.bz2 on osx)
On 30/7/12 21:25, Rolf Langenhuijzen wrote: I tried installing the latest version. ./configure runs without problems. when I do "make" it stops: --- … CXXlibharfbuzz_la-hb-ot-layout.lo In file included from hb-ot-layout.cc:34: hb-ot-layout-gsub-table.hh: In member function ‘bool Ligature::apply(hb_apply_context_t*) const’: hb-ot-layout-gsub-table.hh:588: error: no matching function for call to ‘MAX(unsigned int, int)’ hb-ot-layout-gsub-table.hh:607: error: no matching function for call to ‘MAX(unsigned int, int)’ make[4]: *** [libharfbuzz_la-hb-ot-layout.lo] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 (quits) --- The attached patch should fix this. JK diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index 4ad61a9..bdc7b38 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -585,7 +585,7 @@ struct Ligature { if (!is_mark_ligature) { unsigned int new_lig_comp = components_so_far - last_num_components + - MIN (MAX (get_lig_comp (c->buffer->cur()), 1), last_num_components); + MIN (MAX (get_lig_comp (c->buffer->cur()), 1u), last_num_components); set_lig_props_for_mark (c->buffer->cur(), lig_id, new_lig_comp); } c->buffer->next_glyph (); @@ -604,7 +604,7 @@ struct Ligature for (unsigned int i = c->buffer->idx; i < c->buffer->len; i++) { if (last_lig_id == get_lig_id (c->buffer->info[i])) { unsigned int new_lig_comp = components_so_far - last_num_components + - MIN (MAX (get_lig_comp (c->buffer->info[i]), 1), last_num_components); + MIN (MAX (get_lig_comp (c->buffer->info[i]), 1u), last_num_components); set_lig_props_for_mark (c->buffer->info[i], lig_id, new_lig_comp); } else break; ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz
[HarfBuzz] Compile error (using harfbuzz-20120730.tar.bz2 on osx)
I tried installing the latest version. ./configure runs without problems. when I do "make" it stops: --- … CXXlibharfbuzz_la-hb-ot-layout.lo In file included from hb-ot-layout.cc:34: hb-ot-layout-gsub-table.hh: In member function ‘bool Ligature::apply(hb_apply_context_t*) const’: hb-ot-layout-gsub-table.hh:588: error: no matching function for call to ‘MAX(unsigned int, int)’ hb-ot-layout-gsub-table.hh:607: error: no matching function for call to ‘MAX(unsigned int, int)’ make[4]: *** [libharfbuzz_la-hb-ot-layout.lo] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 (quits) --- Any idea why this is? I'm not skilled in C or configure/make/compiling this stuff, so all I can do is follow basic commands :) but last time it went OK with v0.6 Thanks, Rolf On Jul 30, 2012, at 4:36 PM, Behdad Esfahbod wrote: > http://www.freedesktop.org/software/harfbuzz/release/ > > On 07/30/2012 05:32 AM, Rolf Langenhuijzen wrote: >> Thanks Behdad, I have to upgrade my local installation.. jeez...! :) >> >> Can you maybe upload/update the tarball for the latest July release? I >> need that one for my home installation.. Thanks! >> >> Rolf >> >>> On 07/29/2012 06:18 PM, Rolf Langenhuijzen wrote: Is it possible to output pngs with a transparent background? I know Cairo supports it and I was looking at the source of hb-view and saw there was no option/argument for the alpha channel (for fore or back). >>> >>> behdad:util 0$ ./hb-view --help-view >>> Usage: >>> lt-hb-view [OPTION...] [FONT-FILE] [TEXT] >>> >>> View options: >>> --annotate Annotate output rendering >>> --background=red/#rrggbb/#rrggbbaa Set background color (default: >>> #FF) >>> --foreground=red/#rrggbb/#rrggbbaa Set foreground color (default: >>> #00) >>> --line-space=units Set space between lines (default: >>> 0) >>> --margin=one to four numbers Margin around output (default: 16) >>> --font-size=size Font size (default: 256) >>> >>> >>> Would be nice! Kudos, Rolf >>> >> >> >> ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz
[HarfBuzz] harfbuzz: Branch 'pango' - 0 commits
Rebased ref, commits from common ancestor: ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz
[HarfBuzz] harfbuzz: Branch '0.5' - 0 commits
Rebased ref, commits from common ancestor: ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz
[HarfBuzz] harfbuzz: Branch 'stable' - 0 commits
Rebased ref, commits from common ancestor: ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz
[HarfBuzz] harfbuzz: Branch 'master' - 2 commits
src/harfbuzz-arabic.c | 12 +--- src/harfbuzz-gpos.c |6 +++--- src/harfbuzz-gsub.c |6 +++--- src/harfbuzz-shaper.cpp |2 +- src/harfbuzz-tibetan.c |1 + 5 files changed, 17 insertions(+), 10 deletions(-) New commits: commit 3ab7b37bdebf0f8773493a1fee910b151c4de30f Author: Behdad Esfahbod Date: Mon Jul 30 10:50:22 2012 -0400 Fix misc leaks https://bugs.freedesktop.org/show_bug.cgi?id=31992 https://bugs.freedesktop.org/show_bug.cgi?id=31993 https://bugs.freedesktop.org/show_bug.cgi?id=31994 https://bugs.freedesktop.org/show_bug.cgi?id=31995 diff --git a/src/harfbuzz-arabic.c b/src/harfbuzz-arabic.c index 3837087..51f839a 100644 --- a/src/harfbuzz-arabic.c +++ b/src/harfbuzz-arabic.c @@ -,16 +,22 @@ HB_Bool HB_ArabicShape(HB_ShaperItem *item) if (HB_SelectScript(item, item->item.script == HB_Script_Arabic ? arabic_features : syriac_features)) { HB_Bool ot_ok; -if (arabicSyriacOpenTypeShape(item, &ot_ok)) +if (arabicSyriacOpenTypeShape(item, &ot_ok)) { +HB_FREE_STACKARRAY(shapedChars); return TRUE; -if (ot_ok) +} +if (ot_ok) { +HB_FREE_STACKARRAY(shapedChars); return FALSE; /* fall through to the non OT code*/ +} } #endif -if (item->item.script != HB_Script_Arabic) +if (item->item.script != HB_Script_Arabic) { +HB_FREE_STACKARRAY(shapedChars); return HB_BasicShape(item); +} shapedString(item->string, item->stringLength, item->item.pos, item->item.length, shapedChars, &slen, item->item.bidiLevel % 2, diff --git a/src/harfbuzz-gpos.c b/src/harfbuzz-gpos.c index 7bd3b3b..e969a01 100644 --- a/src/harfbuzz-gpos.c +++ b/src/harfbuzz-gpos.c @@ -5171,13 +5171,13 @@ static HB_Error Lookup_ChainContextPos2( if ( error ) return error; + if (ccpf2->MaxInputLength < 1) +return HB_Err_Not_Covered; + if ( ALLOC_ARRAY( backtrack_classes, ccpf2->MaxBacktrackLength, HB_UShort ) ) return error; known_backtrack_classes = 0; - if (ccpf2->MaxInputLength < 1) -return HB_Err_Not_Covered; - if ( ALLOC_ARRAY( input_classes, ccpf2->MaxInputLength, HB_UShort ) ) goto End3; known_input_classes = 1; diff --git a/src/harfbuzz-gsub.c b/src/harfbuzz-gsub.c index 21fec51..ceb7034 100644 --- a/src/harfbuzz-gsub.c +++ b/src/harfbuzz-gsub.c @@ -3158,13 +3158,13 @@ static HB_Error Lookup_ChainContextSubst2( HB_GSUBHeader* gsub, if ( error ) return error; + if (ccsf2->MaxInputLength < 1) +return HB_Err_Not_Covered; + if ( ALLOC_ARRAY( backtrack_classes, ccsf2->MaxBacktrackLength, HB_UShort ) ) return error; known_backtrack_classes = 0; - if (ccsf2->MaxInputLength < 1) -return HB_Err_Not_Covered; - if ( ALLOC_ARRAY( input_classes, ccsf2->MaxInputLength, HB_UShort ) ) goto End3; known_input_classes = 1; diff --git a/src/harfbuzz-tibetan.c b/src/harfbuzz-tibetan.c index 6f9a55b..be38ab2 100644 --- a/src/harfbuzz-tibetan.c +++ b/src/harfbuzz-tibetan.c @@ -113,6 +113,7 @@ static HB_Bool tibetan_shape_syllable(HB_Bool openType, HB_ShaperItem *item, HB_ if (item->num_glyphs < item->item.length + 4) { item->num_glyphs = item->item.length + 4; +HB_FREE_STACKARRAY(reordered); return FALSE; } commit b847f24ce855d24f6822bcd9c0006905e81b94d8 Author: Behdad Esfahbod Date: Wed Jul 25 19:29:16 2012 -0400 [arabic] Fix Arabic cursive positioning This was clearly broken in testing. Who knows... Fixes for me. Test with a Nastaleeq font, or with Arabic Typesetting. Backporting from Chromium. diff --git a/src/harfbuzz-shaper.cpp b/src/harfbuzz-shaper.cpp index 7d433ea..7fd04a9 100644 --- a/src/harfbuzz-shaper.cpp +++ b/src/harfbuzz-shaper.cpp @@ -1269,7 +1269,7 @@ HB_Bool HB_OpenTypePosition(HB_ShaperItem *item, int availableGlyphs, HB_Bool do adjustment = HB_FIXED_ROUND(adjustment); if (positions[i].new_advance) { -advances[i] = adjustment; +; //advances[i] = adjustment; } else { advances[i] += adjustment; } ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz
[HarfBuzz] harfbuzz-ng: Branch 'master' - 2 commits
src/hb-ot-shape.cc |2 ++ src/hb-private.hh |5 + 2 files changed, 7 insertions(+) New commits: commit 3f4764bb56bb7e42ba8859f1905810bd2f998838 Author: Behdad Esfahbod Date: Mon Jul 30 10:06:42 2012 -0400 Don't lock user_data set during destruction if empty diff --git a/src/hb-private.hh b/src/hb-private.hh index ea3254c..2f85025 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -442,6 +442,11 @@ struct hb_lockable_set_t inline void finish (lock_t &l) { +if (!items.len) { + /* No need for locking. */ + items.finish (); + return; +} l.lock (); while (items.len) { item_t old = items[items.len - 1]; commit 4ba647eecf0f70917ac4229af1f2dd3c62fcb7d5 Author: Behdad Esfahbod Date: Mon Jul 30 09:53:06 2012 -0400 Fix leak diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index e04e700..7831f90 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -203,6 +203,8 @@ void _hb_ot_shaper_shape_plan_data_destroy (hb_ot_shaper_shape_plan_data_t *data) { data->map.finish (); + + free (data); } ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz
[HarfBuzz] harfbuzz-ng: Branch 'master' - 3 commits
src/hb-ot-layout-private.hh| 27 - src/hb-ot-layout.cc| 73 +++-- src/hb-ot-layout.h |5 -- src/hb-ot-map-private.hh | 26 ++--- src/hb-ot-map.cc | 35 - src/hb-ot-shape-complex-indic.cc |2 - src/hb-ot-shape-complex-private.hh |5 -- 7 files changed, 118 insertions(+), 55 deletions(-) New commits: commit f860366456d9e59b139a940da6d89c3c4fb9e96e Author: Behdad Esfahbod Date: Mon Jul 30 02:38:39 2012 -0400 [OT] Gain back some lost speed diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh index 705fe67..78c9d64 100644 --- a/src/hb-ot-layout-private.hh +++ b/src/hb-ot-layout-private.hh @@ -1,5 +1,6 @@ /* * Copyright © 2007,2008,2009 Red Hat, Inc. + * Copyright © 2012 Google, Inc. * * This is part of HarfBuzz, a text shaping library. * @@ -22,6 +23,7 @@ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. * * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod */ #ifndef HB_OT_LAYOUT_PRIVATE_HH @@ -33,9 +35,13 @@ #include "hb-font-private.hh" #include "hb-buffer-private.hh" -#include "hb-ot-shape-complex-private.hh" +/* buffer var allocations, used during the GSUB/GPOS processing */ +#define props_cache() var1.u16[1] /* GSUB/GPOS glyph_props cache */ +#define syllable() var2.u8[0] /* GSUB/GPOS shaping boundaries */ +#define lig_props()var2.u8[1] /* GSUB/GPOS ligature tracking */ + #define hb_ot_layout_from_face(face) ((hb_ot_layout_t *) face->shaper_data.ot) /* @@ -142,6 +148,25 @@ static inline uint8_t allocate_lig_id (hb_buffer_t *buffer) { } +HB_INTERNAL hb_bool_t +hb_ot_layout_would_substitute_lookup_fast (hb_face_t*face, + const hb_codepoint_t *glyphs, + unsigned int glyphs_length, + unsigned int lookup_index); + +HB_INTERNAL hb_bool_t +hb_ot_layout_substitute_lookup_fast (hb_face_t*face, +hb_buffer_t *buffer, +unsigned int lookup_index, +hb_mask_t mask); + +HB_INTERNAL hb_bool_t +hb_ot_layout_position_lookup_fast (hb_font_t*font, + hb_buffer_t *buffer, + unsigned int lookup_index, + hb_mask_t mask); + + /* * hb_ot_layout_t */ diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index c7f1f09..617034b 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -2,6 +2,7 @@ * Copyright © 1998-2004 David Turner and Werner Lemberg * Copyright © 2006 Behdad Esfahbod * Copyright © 2007,2008,2009 Red Hat, Inc. + * Copyright © 2012 Google, Inc. * * This is part of HarfBuzz, a text shaping library. * @@ -24,6 +25,7 @@ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. * * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod */ #include "hb-ot-layout-private.hh" @@ -93,6 +95,24 @@ _get_gpos (hb_face_t *face) return *hb_ot_layout_from_face (face)->gpos; } +static inline const GDEF& +_get_gdef_fast (hb_face_t *face) +{ + return *hb_ot_layout_from_face (face)->gdef; +} +static inline const GSUB& +_get_gsub_fast (hb_face_t *face) +{ + if (unlikely (!hb_ot_layout_ensure (face))) return Null(GSUB); + return *hb_ot_layout_from_face (face)->gsub; +} +static inline const GPOS& +_get_gpos_fast (hb_face_t *face) +{ + if (unlikely (!hb_ot_layout_ensure (face))) return Null(GPOS); + return *hb_ot_layout_from_face (face)->gpos; +} + /* * GDEF @@ -110,7 +130,7 @@ _hb_ot_layout_get_glyph_property (hb_face_t *face, { if (!info->props_cache()) { -const GDEF &gdef = _get_gdef (face); +const GDEF &gdef = _get_gdef_fast (face); info->props_cache() = gdef.get_glyph_props (info->codepoint); } @@ -127,7 +147,7 @@ _hb_ot_layout_match_properties_mark (hb_face_t *face, * lookup_props has the set index. */ if (lookup_props & LookupFlag::UseMarkFilteringSet) -return _get_gdef (face).mark_set_covers (lookup_props >> 16, glyph); +return _get_gdef_fast (face).mark_set_covers (lookup_props >> 16, glyph); /* The second byte of lookup_props has the meaning * "ignore marks of attachment type different than @@ -479,6 +499,17 @@ hb_ot_layout_would_substitute_lookup (hb_face_t *face, return _get_gsub (face).would_substitute_lookup (&c, lookup_index); } +hb_bool_t +hb_ot_layout_would_substitute_lookup_fast (hb_face_t*face, + const hb_codepoint_t *glyphs, + unsigned int glyphs_length, +