framework/uifw/harfbuzz.git
13 years ago[test/buffer] Add initial utf-8 tests
Behdad Esfahbod [Thu, 28 Apr 2011 22:34:42 +0000 (18:34 -0400)]
[test/buffer] Add initial utf-8 tests

13 years agoAdd test suite infrastructure
Behdad Esfahbod [Thu, 28 Apr 2011 21:10:44 +0000 (17:10 -0400)]
Add test suite infrastructure

Wraps around glib for convenience and ease of use.

13 years ago[API Remove hb_font_funcs_copy()
Behdad Esfahbod [Thu, 28 Apr 2011 20:03:29 +0000 (16:03 -0400)]
[API Remove hb_font_funcs_copy()

Will be adding font_funcs subclassing instead.

13 years ago[TODO] Remove finished items
Behdad Esfahbod [Thu, 28 Apr 2011 20:02:40 +0000 (16:02 -0400)]
[TODO] Remove finished items

13 years agoAdd _hb_unsigned_int_mul_overflows
Behdad Esfahbod [Thu, 28 Apr 2011 20:01:01 +0000 (16:01 -0400)]
Add _hb_unsigned_int_mul_overflows

13 years agoDesable possibly lethal test on 64-bit machines
Behdad Esfahbod [Thu, 28 Apr 2011 19:54:16 +0000 (15:54 -0400)]
Desable possibly lethal test on 64-bit machines

13 years ago[test/buffer] Test pre_allocate() and allocation_successful()
Behdad Esfahbod [Thu, 28 Apr 2011 18:24:16 +0000 (14:24 -0400)]
[test/buffer] Test pre_allocate() and allocation_successful()

13 years agoFix possible but improbable overflow in hb_array_t
Behdad Esfahbod [Thu, 28 Apr 2011 16:58:28 +0000 (12:58 -0400)]
Fix possible but improbable overflow in hb_array_t

13 years ago[buffer] More error handling
Behdad Esfahbod [Thu, 28 Apr 2011 16:56:49 +0000 (12:56 -0400)]
[buffer] More error handling

Should be all set now.

13 years ago[test/buffer] Add test pre_alloc(); hangs in the buffer code right now
Behdad Esfahbod [Thu, 28 Apr 2011 16:28:54 +0000 (12:28 -0400)]
[test/buffer] Add test pre_alloc(); hangs in the buffer code right now

Because the following loop overflows:

  while (size > new_allocated)
      new_allocated += (new_allocated >> 1) + 32;

13 years ago[test/buffer] Test reset(), set_length(), and set/get_unicode_data()
Behdad Esfahbod [Thu, 28 Apr 2011 16:15:24 +0000 (12:15 -0400)]
[test/buffer] Test reset(), set_length(), and set/get_unicode_data()

13 years ago[test/buffer] Test reverse() and reverse_clusters()
Behdad Esfahbod [Thu, 28 Apr 2011 15:56:29 +0000 (11:56 -0400)]
[test/buffer] Test reverse() and reverse_clusters()

13 years ago[API] Add _set/get_user_data() for all objects
Behdad Esfahbod [Thu, 28 Apr 2011 01:46:01 +0000 (21:46 -0400)]
[API] Add _set/get_user_data() for all objects

13 years agoMove code around
Behdad Esfahbod [Thu, 28 Apr 2011 01:45:51 +0000 (21:45 -0400)]
Move code around

13 years agoAdd initial implementation of user_data to objects
Behdad Esfahbod [Thu, 28 Apr 2011 01:22:32 +0000 (21:22 -0400)]
Add initial implementation of user_data to objects

13 years ago[object] Remove unnecessary use of macros
Behdad Esfahbod [Wed, 27 Apr 2011 20:38:03 +0000 (16:38 -0400)]
[object] Remove unnecessary use of macros

13 years ago[blob] Use HB_FUNC instead of __FUNCTION__
Behdad Esfahbod [Wed, 27 Apr 2011 20:14:04 +0000 (16:14 -0400)]
[blob] Use HB_FUNC instead of __FUNCTION__

13 years ago[object] Add tracing support back in
Behdad Esfahbod [Wed, 27 Apr 2011 20:12:12 +0000 (16:12 -0400)]
[object] Add tracing support back in

13 years agoGNOME Bug 612402 - (hb-arm) HarfBuzz compilation fix for arm
Behdad Esfahbod [Wed, 27 Apr 2011 19:10:12 +0000 (15:10 -0400)]
GNOME Bug 612402 - (hb-arm) HarfBuzz compilation fix for arm

With gcc on arm, request 8-bit structure alignment.

13 years ago[API] Add hb_direction_from/to_string()
Behdad Esfahbod [Wed, 27 Apr 2011 18:48:19 +0000 (14:48 -0400)]
[API] Add hb_direction_from/to_string()

And hb-view --direction argument.

13 years agoRename hb-view.c and test.c to .cc files
Behdad Esfahbod [Wed, 27 Apr 2011 16:15:06 +0000 (12:15 -0400)]
Rename hb-view.c and test.c to .cc files

13 years ago[TODO] Add hb-view items
Behdad Esfahbod [Wed, 27 Apr 2011 16:14:53 +0000 (12:14 -0400)]
[TODO] Add hb-view items

13 years agoMake buffer size growth start from 32 instead of 8
Behdad Esfahbod [Wed, 27 Apr 2011 13:33:58 +0000 (09:33 -0400)]
Make buffer size growth start from 32 instead of 8

13 years ago[API] Add hb_unicode_funcs_get_default()
Behdad Esfahbod [Wed, 27 Apr 2011 13:24:37 +0000 (09:24 -0400)]
[API] Add hb_unicode_funcs_get_default()

13 years agoReplace simple macros with inline functions for better type safety
Behdad Esfahbod [Wed, 27 Apr 2011 05:49:03 +0000 (01:49 -0400)]
Replace simple macros with inline functions for better type safety

Now that we use C++ for all source code, lets benefit from it!

The hb_be_int16/32_get/put/eq() macros grow code size if replaced with
inline functions, so leave them as is.

13 years agoAdd TODO item
Behdad Esfahbod [Wed, 27 Apr 2011 05:48:56 +0000 (01:48 -0400)]
Add TODO item

13 years agoDon't return in void function
Behdad Esfahbod [Wed, 27 Apr 2011 05:41:24 +0000 (01:41 -0400)]
Don't return in void function

Would have been nice if gcc had warned...

13 years agoFurther simplify object handling
Behdad Esfahbod [Thu, 21 Apr 2011 22:35:58 +0000 (18:35 -0400)]
Further simplify object handling

13 years agoAdd hb_object_header_t which is the common part of all objects
Behdad Esfahbod [Thu, 21 Apr 2011 22:24:02 +0000 (18:24 -0400)]
Add hb_object_header_t which is the common part of all objects

Makes way for adding arbitrary user_data support.

13 years agoMove hb_reference_count_t to hb-private.h
Behdad Esfahbod [Thu, 21 Apr 2011 21:18:22 +0000 (17:18 -0400)]
Move hb_reference_count_t to hb-private.h

13 years agoUpdate Copyright headers
Behdad Esfahbod [Thu, 21 Apr 2011 21:14:28 +0000 (17:14 -0400)]
Update Copyright headers

13 years ago[hb-view] Accept numbers in feature tag name
Behdad Esfahbod [Thu, 21 Apr 2011 20:59:10 +0000 (16:59 -0400)]
[hb-view] Accept numbers in feature tag name

Reported by Adam Twardoch.

13 years agoRemove obsolete comment
Behdad Esfahbod [Thu, 21 Apr 2011 20:55:17 +0000 (16:55 -0400)]
Remove obsolete comment

Talking to Ryan Lortie, he thinks my comment doesn't make sense.

So I'm making the getter const.  Note that g_atomic_int_get()
casts that away itself, so we don't need to worry about that
(which kinda makes me uncomfortable actually).

13 years agoAdd ASSERT_STATIC_EXPR macro
Behdad Esfahbod [Thu, 21 Apr 2011 20:34:22 +0000 (16:34 -0400)]
Add ASSERT_STATIC_EXPR macro

Unused right now.

13 years agoCleanup hb_refrence_count_t
Behdad Esfahbod [Thu, 21 Apr 2011 20:16:21 +0000 (16:16 -0400)]
Cleanup hb_refrence_count_t

13 years ago[TODO] Remove finished items
Behdad Esfahbod [Thu, 21 Apr 2011 20:03:59 +0000 (16:03 -0400)]
[TODO] Remove finished items

13 years ago[API] Allow negative font x_scale/y_scale
Behdad Esfahbod [Thu, 21 Apr 2011 19:08:01 +0000 (15:08 -0400)]
[API] Allow negative font x_scale/y_scale

I was reconsidering whether y should grow down, since all three/four
times I've used this API I was tricked and got that wrong in my use.
So I was very inclined to make y grow down instead of up.  However,
considering that the font space has y up and it would be very confusing
for callbacks to work against that, I decided that what I really want
is for the user to be able to set y_scale to a negative number to imply
that user-space y grows down.

Changing x_scale/y_scale from unsigned int to int allows that, and I've
made pango to use that instead of negating glyph y_offset later.  hb-ft
however still has y group up.  I *guess* that's how FreeType works?
I'm not sure, FreeType docs don't make this clear...

I'm happy with the resolution :-).

13 years ago[icu] Remove big script switch(), rely on reverse-lookup
Behdad Esfahbod [Thu, 21 Apr 2011 18:58:23 +0000 (14:58 -0400)]
[icu] Remove big script switch(), rely on reverse-lookup

13 years agoMove hb_reference_count_t from macros to inline methods
Behdad Esfahbod [Wed, 20 Apr 2011 22:59:10 +0000 (18:59 -0400)]
Move hb_reference_count_t from macros to inline methods

13 years agoRename all private sources and headers to C++ files
Behdad Esfahbod [Wed, 20 Apr 2011 22:50:27 +0000 (18:50 -0400)]
Rename all private sources and headers to C++ files

So we can liberally use the simple features of C++ that parts of the
codebase is already using.

13 years agoRename hb-blob.c to hb-blob.cc in preparation of more changes
Behdad Esfahbod [Wed, 20 Apr 2011 22:25:56 +0000 (18:25 -0400)]
Rename hb-blob.c to hb-blob.cc in preparation of more changes

13 years ago[TODO] Remove done items
Behdad Esfahbod [Wed, 20 Apr 2011 21:24:03 +0000 (17:24 -0400)]
[TODO] Remove done items

13 years ago[API] Make hb_face_reference_table() return empty blob instead of NULL
Behdad Esfahbod [Wed, 20 Apr 2011 21:21:23 +0000 (17:21 -0400)]
[API] Make hb_face_reference_table() return empty blob instead of NULL

The idea here is that:

  - Like pretty much all other API in harfbuzz, user does not have to
    check for NULL.

  - In any caller code, the case of missing table should be handled
    exactly the same way that a too-short table is handled.  Turning
    a non-existent talbe into a table of size 0 makes the user code
    safer.

13 years ago[API] Rename hb_face_get_table() to hb_face_reference_table()
Behdad Esfahbod [Wed, 20 Apr 2011 21:03:00 +0000 (17:03 -0400)]
[API] Rename hb_face_get_table() to hb_face_reference_table()

That correctly reflects the reference ownership transfer happening.

13 years ago[TODO] Remove done items
Behdad Esfahbod [Wed, 20 Apr 2011 20:40:56 +0000 (16:40 -0400)]
[TODO] Remove done items

13 years ago[API] Remove hb_*_get_reference_count()
Behdad Esfahbod [Wed, 20 Apr 2011 19:49:31 +0000 (15:49 -0400)]
[API] Remove hb_*_get_reference_count()

This was a bizzare piece of API that I inherited from cairo.  It has
been wrong adding them to cairo in the first place.  Remove them before
someone uses them!

13 years ago[OT] Fix script to ot-script-tag conversion
Behdad Esfahbod [Wed, 20 Apr 2011 18:20:00 +0000 (14:20 -0400)]
[OT] Fix script to ot-script-tag conversion

13 years agoMinor
Behdad Esfahbod [Wed, 20 Apr 2011 18:13:23 +0000 (14:13 -0400)]
Minor

13 years ago[test] Add test for headers included from C and C++
Behdad Esfahbod [Wed, 20 Apr 2011 07:15:31 +0000 (03:15 -0400)]
[test] Add test for headers included from C and C++

13 years ago[test] Add todo items
Behdad Esfahbod [Wed, 20 Apr 2011 07:04:56 +0000 (03:04 -0400)]
[test] Add todo items

13 years ago[API] font: move user_data before destroy()
Behdad Esfahbod [Wed, 20 Apr 2011 07:03:32 +0000 (03:03 -0400)]
[API] font: move user_data before destroy()

This is the common convention for language binding tools.

13 years ago[API] blob: move user_data before destroy()
Behdad Esfahbod [Wed, 20 Apr 2011 06:59:28 +0000 (02:59 -0400)]
[API] blob: move user_data before destroy()

This is the common convention for language binding tools.

13 years ago[test] Rename test-types to test-common
Behdad Esfahbod [Wed, 20 Apr 2011 06:56:39 +0000 (02:56 -0400)]
[test] Rename test-types to test-common

13 years ago[icu] Add two-way script conversion functions
Behdad Esfahbod [Wed, 20 Apr 2011 06:54:42 +0000 (02:54 -0400)]
[icu] Add two-way script conversion functions

Also optimizes the common-direction script lookup.

13 years ago[glib] Add two-way script conversion functions
Behdad Esfahbod [Wed, 20 Apr 2011 06:44:29 +0000 (02:44 -0400)]
[glib] Add two-way script conversion functions

Also optimizes the common-direction script lookup to be an array lookup.

13 years agoRemove verbose comments
Behdad Esfahbod [Wed, 20 Apr 2011 06:29:22 +0000 (02:29 -0400)]
Remove verbose comments

13 years agounicode: Cleanup implementation
Behdad Esfahbod [Wed, 20 Apr 2011 06:00:47 +0000 (02:00 -0400)]
unicode: Cleanup implementation

13 years agoCosmetic
Behdad Esfahbod [Wed, 20 Apr 2011 05:34:51 +0000 (01:34 -0400)]
Cosmetic

13 years ago[API] unicode: rework virtual functions for subclassing
Ryan Lortie [Wed, 20 Apr 2011 04:19:20 +0000 (00:19 -0400)]
[API] unicode: rework virtual functions for subclassing

Unicode data providers can now be subclassed, including support for
chain-up.  The interface should now be nicely bindable, as well.

Also fix glib unicode funcs that where broken after hb_script_t
changes.  Nicely caught by the test-unicode.c added in this commit.

13 years ago[API] Rename hb_buffer_add_glyph() to hb_buffer_add()
Behdad Esfahbod [Tue, 19 Apr 2011 04:38:01 +0000 (00:38 -0400)]
[API] Rename hb_buffer_add_glyph() to hb_buffer_add()

13 years ago[API] Add hb_buffer_allocation_successful()
Behdad Esfahbod [Tue, 19 Apr 2011 04:32:19 +0000 (00:32 -0400)]
[API] Add hb_buffer_allocation_successful()

Returns the error status of the buffer.

13 years ago[API] Rename hb_buffer_ensure() to hb_buffer_pre_allocate()
Ryan Lortie [Fri, 15 Apr 2011 22:34:45 +0000 (18:34 -0400)]
[API] Rename hb_buffer_ensure() to hb_buffer_pre_allocate()

The new name is self-documenting.

13 years ago[API} hb_buffer_get_glyph_{infos,positions}: Add length out parameter
Ryan Lortie [Fri, 15 Apr 2011 22:32:36 +0000 (18:32 -0400)]
[API} hb_buffer_get_glyph_{infos,positions}: Add length out parameter

Return the length, whenever we return an array.  Makes it easier on the
language bindings.

13 years ago[API] Use ISO 15924 tags for hb_script_t
Behdad Esfahbod [Tue, 19 Apr 2011 03:40:21 +0000 (23:40 -0400)]
[API] Use ISO 15924 tags for hb_script_t

This simplifies the code, reduces static data, and makes the design
more extensible to future additions of new scripts.

13 years agoChange buffer default properties to invalid
Behdad Esfahbod [Fri, 15 Apr 2011 23:26:24 +0000 (19:26 -0400)]
Change buffer default properties to invalid

This includes HB_DIRECTION_INVALID and HB_SCRIPT_INVALID.

The INVALID will cause a "guess whatever from the text" in hb_shape().
While it's not ideal, it works better than the previous defaults at
least (HB_DIRECTION_LTR and HB_SCRIPT_COMMON).

13 years agoMove enum types to hb-common.h
Behdad Esfahbod [Fri, 15 Apr 2011 23:16:54 +0000 (19:16 -0400)]
Move enum types to hb-common.h

13 years ago[TODO] Add new item
Behdad Esfahbod [Fri, 15 Apr 2011 23:16:34 +0000 (19:16 -0400)]
[TODO] Add new item

13 years agoMark internal buffer variables private
Behdad Esfahbod [Fri, 15 Apr 2011 23:12:01 +0000 (19:12 -0400)]
Mark internal buffer variables private

13 years agoAdd hb_script_from_string()
Behdad Esfahbod [Fri, 15 Apr 2011 23:07:10 +0000 (19:07 -0400)]
Add hb_script_from_string()

13 years agoRemove hb_buffer_clear_positions(), add hb_ot_layout_position_start()
Behdad Esfahbod [Fri, 15 Apr 2011 22:59:56 +0000 (18:59 -0400)]
Remove hb_buffer_clear_positions(), add hb_ot_layout_position_start()

13 years ago[API] Remove hb_buffer_clear()
Behdad Esfahbod [Fri, 15 Apr 2011 22:35:08 +0000 (18:35 -0400)]
[API] Remove hb_buffer_clear()

One should use hb_buffer_reset() really.

13 years ago[TODO] Remove done items
Behdad Esfahbod [Fri, 15 Apr 2011 22:34:55 +0000 (18:34 -0400)]
[TODO] Remove done items

13 years agoCosmetic
Behdad Esfahbod [Fri, 15 Apr 2011 18:41:04 +0000 (14:41 -0400)]
Cosmetic

13 years ago[TODO] Remove done items
Behdad Esfahbod [Fri, 15 Apr 2011 16:40:40 +0000 (12:40 -0400)]
[TODO] Remove done items

13 years agoMake hb_language_t typesafe
Behdad Esfahbod [Fri, 15 Apr 2011 16:32:06 +0000 (12:32 -0400)]
Make hb_language_t typesafe

13 years ago[test] Add more TODO items
Behdad Esfahbod [Fri, 15 Apr 2011 15:45:14 +0000 (11:45 -0400)]
[test] Add more TODO items

13 years agoAdd hb_buffer_reset() and hb_buffer_set_length()
Behdad Esfahbod [Wed, 13 Apr 2011 19:49:06 +0000 (15:49 -0400)]
Add hb_buffer_reset() and hb_buffer_set_length()

13 years agoMinor
Behdad Esfahbod [Wed, 13 Apr 2011 19:02:40 +0000 (15:02 -0400)]
Minor

13 years ago[test] Add todo items
Behdad Esfahbod [Wed, 13 Apr 2011 05:35:58 +0000 (01:35 -0400)]
[test] Add todo items

13 years ago[TODO] Add item re script iso15924 functions
Behdad Esfahbod [Wed, 13 Apr 2011 05:11:19 +0000 (01:11 -0400)]
[TODO] Add item re script iso15924 functions

13 years ago[test] Test hb-buffer.h
Behdad Esfahbod [Wed, 13 Apr 2011 05:09:09 +0000 (01:09 -0400)]
[test] Test hb-buffer.h

13 years ago[TODO] Add item re hb_buffer_reset()
Behdad Esfahbod [Wed, 13 Apr 2011 05:07:42 +0000 (01:07 -0400)]
[TODO] Add item re hb_buffer_reset()

13 years ago[TODO] Add item re hb_buffer_resize()
Behdad Esfahbod [Wed, 13 Apr 2011 05:06:02 +0000 (01:06 -0400)]
[TODO] Add item re hb_buffer_resize()

13 years ago[TODO] Add API item
Behdad Esfahbod [Wed, 13 Apr 2011 04:06:23 +0000 (00:06 -0400)]
[TODO] Add API item

13 years agoMinor
Behdad Esfahbod [Mon, 11 Apr 2011 23:47:33 +0000 (19:47 -0400)]
Minor

13 years ago[test] Actually hook up hb_script_t tests
Behdad Esfahbod [Mon, 11 Apr 2011 23:43:51 +0000 (19:43 -0400)]
[test] Actually hook up hb_script_t tests

I really shall find a way to automate the test enumeration.  Otherwise
it's too easy to add a test and wrongly hook it up.  Did it twice today.

13 years agoFold hb-language.[ch] into hb-common.[ch]
Behdad Esfahbod [Mon, 11 Apr 2011 21:55:58 +0000 (17:55 -0400)]
Fold hb-language.[ch] into hb-common.[ch]

13 years ago[test] Test hb_language_t
Behdad Esfahbod [Mon, 11 Apr 2011 21:49:33 +0000 (17:49 -0400)]
[test] Test hb_language_t

13 years agoMake hb_language_from_string("") return NULL language
Behdad Esfahbod [Mon, 11 Apr 2011 21:49:10 +0000 (17:49 -0400)]
Make hb_language_from_string("") return NULL language

13 years ago[teset] Test hb_script_t
Behdad Esfahbod [Mon, 11 Apr 2011 20:17:02 +0000 (16:17 -0400)]
[teset] Test hb_script_t

13 years agoRename hb_category_t to hb_unicode_general_category_t
Behdad Esfahbod [Mon, 11 Apr 2011 19:47:40 +0000 (15:47 -0400)]
Rename hb_category_t to hb_unicode_general_category_t

13 years agoMake HB_TAG_CHAR4 private
Behdad Esfahbod [Mon, 11 Apr 2011 18:58:28 +0000 (14:58 -0400)]
Make HB_TAG_CHAR4 private

It's just sugar.

13 years agoMake hb_tag_from_string(NULL) return HB_TAG_NONE
Behdad Esfahbod [Mon, 11 Apr 2011 17:27:30 +0000 (13:27 -0400)]
Make hb_tag_from_string(NULL) return HB_TAG_NONE

13 years agoBuild fix
Behdad Esfahbod [Mon, 11 Apr 2011 17:27:21 +0000 (13:27 -0400)]
Build fix

13 years agoMove macros around
Behdad Esfahbod [Mon, 11 Apr 2011 17:16:08 +0000 (13:16 -0400)]
Move macros around

13 years agoRename HB_TAG_STR() to HB_TAG_CHAR4()
Behdad Esfahbod [Mon, 11 Apr 2011 17:12:37 +0000 (13:12 -0400)]
Rename HB_TAG_STR() to HB_TAG_CHAR4()

The problem with HB_TAG_STR() was that it expected a string of size 4
exactly, and unlike hb_tag_from_string() it doesn't pad the tag with
space characters.  So, the new name is more appropriate.

13 years agoAdd an in-tree test suite
Behdad Esfahbod [Mon, 11 Apr 2011 16:46:49 +0000 (12:46 -0400)]
Add an in-tree test suite

Uses the glib testing framework.  Wrote unit tests for hb-common.h
types.

13 years agoAdd few more paratheses to the HB_TAG macro
Behdad Esfahbod [Mon, 11 Apr 2011 16:29:52 +0000 (12:29 -0400)]
Add few more paratheses to the HB_TAG macro

Never hurts.

13 years agoA few more ASSERTs
Behdad Esfahbod [Mon, 11 Apr 2011 16:29:31 +0000 (12:29 -0400)]
A few more ASSERTs

13 years agoRemove warning message from public header file
Behdad Esfahbod [Mon, 11 Apr 2011 15:49:08 +0000 (11:49 -0400)]
Remove warning message from public header file

Since we now assert thos in hb-private.h, the int types cannot be wrong.
(Except for when someone else includes hb-common.h in a very broken
configuration, but that's not our problem!)

Plus, we don't use inline in the public headers, so remove that too.