Re: [HarfBuzz] harfbuzz-ng: Branch 'master'

2011-05-11 Thread Tom Hacohen
On Tue, 2011-05-10 at 14:17 -0400, Behdad Esfahbod wrote: I'm hesitant to offer API for purely optimization purposes. In this case, it's not even possible to offer a meaningful API since the user is free to fetch the glyph array and manipulate it as they wish. So, if there is going to be an

[HarfBuzz] Inheriting/copying font functions

2011-05-11 Thread Tom Hacohen
Dear Behadad, After your recent changes (which removed the hb_font_funcs_get_contour_point_func and the like) and since there's no way to inherit/copy other func functions. It's now impossible to implement only part of the font functions and use Harfbuzz's default for freetype for the rest.

Re: [HarfBuzz] Inheriting/copying font functions

2011-05-11 Thread Behdad Esfahbod
On 05/11/11 09:57, Tom Hacohen wrote: Dear Behadad [sic], Hi Tom, After your recent changes (which removed the hb_font_funcs_get_contour_point_func and the like) and since there's no way to inherit/copy other func functions. It's now impossible to implement only part of the font functions

[HarfBuzz] Possible memory leaks in latest revision

2011-05-11 Thread Tom Hacohen
Dear all, Using the attached source code (also available at: http://pastebin.com/yu3gwvM5 if you find it more convenient) valgrind complains about a lot of memory leaks in Harfbuzz (latest revision), for example: ==23594== 64 bytes in 1 blocks are definitely lost in loss record 5 of 6 ==23594==

[HarfBuzz] harfbuzz-ng: Branch 'master' - 6 commits

2011-05-11 Thread Behdad Esfahbod
TODO|4 +- src/Makefile.am |3 + src/hb-blob.cc |2 - src/hb-open-type-private.hh |8 ++--- src/hb-ot-head-private.hh |1 src/hb-ot-layout.cc |1 src/hb-ot-map-private.hh|7 src/hb-ot-maxp-private.hh

Re: [HarfBuzz] [PATCH] Implement threading primitives on Windows; fix compile error and leak

2011-05-11 Thread Bradley Grainger
Now, since we are using C++ in HarfBuzz, I wonder if we can use constructors to initialize the static mutexes automatically? This little gem seems to do the trick: struct hb_static_mutex_t : hb_mutex_t { hb_static_mutex_t (void) { hb_mutex_init (this); } }; What do you

Re: [HarfBuzz] [PATCH] Implement threading primitives on Windows; fix compile error and leak

2011-05-11 Thread Behdad Esfahbod
On 05/11/11 15:58, Bradley Grainger wrote: Now, since we are using C++ in HarfBuzz, I wonder if we can use constructors to initialize the static mutexes automatically? This little gem seems to do the trick: struct hb_static_mutex_t : hb_mutex_t { hb_static_mutex_t (void) {

Re: [HarfBuzz] [PATCH] Implement threading primitives on Windows; fix compile error and leak

2011-05-11 Thread Behdad Esfahbod
n 05/11/11 15:58, Bradley Grainger wrote: It does seem like this would need a destructor, too, to avoid leaking CRITICAL_SECTION objects (unless they're only ever destroyed at process shutdown, when it wouldn't be necessary). That was the idea. But I added it anyway. Not that we explicitly

[HarfBuzz] harfbuzz-ng: Branch 'master' - 9 commits

2011-05-11 Thread Behdad Esfahbod
TODO|4 +- src/hb-buffer.cc|6 src/hb-buffer.h |3 ++ src/hb-common.h |1 src/hb-font.cc | 18 + src/hb-font.h |9 ++ src/hb-mutex-private.hh | 65

[HarfBuzz] harfbuzz-ng: Branch 'master' - 8 commits

2011-05-11 Thread Behdad Esfahbod
src/hb-font.cc | 24 ++--- src/hb-font.h | 24 ++--- src/hb-ft.cc| 22 ++-- src/test.cc |2 test/Makefile.am|1 test/test-buffer.c |2 test/test-font.c| 237 test/test-object.c |4

[HarfBuzz] harfbuzz-ng: Branch 'master' - 5 commits

2011-05-11 Thread Behdad Esfahbod
src/hb-font.cc | 10 - src/hb-font.h|2 src/hb-ft.cc |2 test/test-font.c | 290 --- 4 files changed, 284 insertions(+), 20 deletions(-) New commits: commit 52df150efeff4cf003cee65f8c91618f1a980bc8 Author: Behdad Esfahbod