[HarfBuzz] Question on lxnt/ex-sdl-freetype-harfbuzz

Jonathan Kew jfkthame at googlemail.com
Wed Apr 10 01:39:10 PDT 2013


On 10/4/13 08:47, Nicolas Rougier wrote:
>
>
> I tried to compile the ex-sdl-freetype-harfbuzz example and get:
>
> Assertion failed: (buffer->content_type ==
> HB_BUFFER_CONTENT_TYPE_UNICODE || (!buffer->len &&
> buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID)), function
> hb_buffer_add_utf, file hb-buffer.cc, line 914.

You're trying to add more text to a buffer after it's been shaped (i.e. 
the content has been converted from unicode character data to glyphs and 
positions). You can't do that. If you want to reuse the same hb_buffer 
to shape a new piece of text, you need to clear its existing (shaped) 
contents first.

>
> I'm a but clueless since I did not even understand why the text is
> coded as char (and not wchar_t).

utf-8 has 8-bit (i.e. char-sized) code units.

> Does anyone get the same problem ?
>
>
> Relevant info:
>
> -> gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build
> 2336.11.00) -> latest git harfbuzz
>
>
> Nicolas
>
>
>
> _______________________________________________ HarfBuzz mailing
> list HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
>



More information about the HarfBuzz mailing list