Commit Graph

38 Commits

Author SHA1 Message Date
Behdad Esfahbod a8949df487 [introspection] Annotate Unicode / font callbacks
Should move these out of the public header...

We're "clean" of introspection warnings now.  Remaining ones are about
graphite2 / freetype types not being introspectable.
2013-09-13 20:31:07 -04:00
Behdad Esfahbod 6adf417bc1 Use a lookup table for modified_combining_class 2012-08-01 18:07:42 -04:00
Behdad Esfahbod 21fdcee001 Add hb_unicode_combining_class_t 2012-08-01 16:28:50 -04:00
Behdad Esfahbod 378d279bbf Implement Unicode compatibility decompositions
Based on patch from Philip Withnall.
https://bugs.freedesktop.org/show_bug.cgi?id=41095
2012-07-31 21:36:16 -04:00
Behdad Esfahbod 1bc1cb3603 Make source more digestable for gobject-introspection 2012-06-16 15:21:55 -04:00
Behdad Esfahbod d1c9eb458c Make it an error to include non-top-level headers
Users should #include <hb.h> (or hb-ft.h, hb-glib.h, etc), but
never things like hb-shape.h directly.  This makes it easier to
refactor headers later on without breaking compatibility.
2012-04-12 13:17:44 -04:00
Behdad Esfahbod 33ccc77902 [API] Make set_user_data() functions take a replace parameter
We need this to set data on objects safely without worrying that some
other thread unsets it by setting it at the same time.
2011-08-09 00:43:24 +02:00
Behdad Esfahbod c4641723fb [API] Add compose() and decompose() unicode funcs, rename other ones
Add compose() and decompose() unicode funcs.  These implement
pair-wise canonical composition/decomposition.

The glib/icu implementations are lacking for now.  We are adding
API for this to glib, but I cannot find any useful API in ICU.
May end of implementing these in-house.

Changed all unicode_funcs callback names to remove the "_get" part.
Eg, hb_unicode_get_script_func_t is now hb_unicode_script_func_t,
and hb_unicode_get_script() is hb_unicode_script() now.
2011-07-08 00:09:31 -04:00
Behdad Esfahbod 80a6833b03 [API] Add hb_*_get_empty() for all objects 2011-05-11 18:21:58 -04:00
Behdad Esfahbod 446df9cdb1 Whitespace 2011-05-10 20:14:44 -04:00
Behdad Esfahbod defc45be6d [API] Add hb_font_create_sub_font() and hb_font_get_parent()
Not quite useful just yet.
2011-05-10 20:02:49 -04:00
Behdad Esfahbod 6af9cff5e1 [test/unicode] Use text fixture instead of static variables 2011-04-29 12:12:37 -04:00
Behdad Esfahbod 5fa849b77d [API] Add _set/get_user_data() for all objects 2011-04-27 21:46:01 -04:00
Behdad Esfahbod d4bee9f813 [API] Add hb_unicode_funcs_get_default() 2011-04-27 09:38:19 -04:00
Behdad Esfahbod 2409d5f8d7 Update Copyright headers 2011-04-21 17:14:28 -04:00
Behdad Esfahbod af02933739 [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!
2011-04-20 15:49:31 -04:00
Behdad Esfahbod fb194b8794 unicode: Cleanup implementation 2011-04-20 02:27:39 -04:00
Behdad Esfahbod ecfb773829 Cosmetic 2011-04-20 01:34:51 -04:00
Ryan Lortie 2fd0c577e3 [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.
2011-04-20 00:19:20 -04:00
Behdad Esfahbod 00bec2c969 Move enum types to hb-common.h 2011-04-15 19:16:54 -04:00
Behdad Esfahbod 0e8d35c093 Add hb_script_from_string() 2011-04-15 19:08:43 -04:00
Behdad Esfahbod 99b74760a4 Rename hb_category_t to hb_unicode_general_category_t 2011-04-11 15:47:40 -04:00
Behdad Esfahbod 5d91c3d547 Add script to/from ISO 15924 tag support
Also adds --script support to hb-view.

If a script tag is not known to us, we pass the ISO 15924 tag around.
Right now, the OT layer ignores that, but we can fix it to blindly
convert that to an OT script tag.
2011-03-16 17:36:32 -03:00
Behdad Esfahbod 3286fc0e9a Let hb_shape() guess script and direction...
- Rename HB_SCRIPT_INVALID_CODE to HB_SCRIPT_INVALID

- Add HB_DIRECTION_INVALID

- Make hb_script_get_horizontal_direction() public

- Make hb_shape() guess script from buffer text (first non-common
  non-inherit script) if buffer script is set to HB_SCRIPT_INVALID (this
  is NOT the default.)

- Make hb_shape() guess direction from buffer script if buffer direction
is set to HB_DIRECTION_INVALID (this is NOT the default.)

- Make hb-view.c set INVALID script and direction on the buffer.

The above changes are meant to make hb-view fairly useful for uni-script
uni-direction text.  The guessing behavior however is NOT the default of
hb_shape() and must be asked for explicitly.  This is intended, because
the guess is not a suitable substitute to full-fledged bidi and script
segmentation.  It's just a testing tool.
2011-03-16 14:53:32 -03:00
Behdad Esfahbod f3d9d98793 Docs 2010-12-22 01:39:29 -05:00
Behdad Esfahbod afab01cf7c Add Unicode 6.0 scripts 2010-11-17 14:35:34 -05:00
Behdad Esfahbod f234b68d18 Change HB_SCRIPT_MEITEI_MAYEK to HB_SCRIPT_MEETEI_MAYEK
The new name matches the Unicode name.  Reported by Jonathan Kew.
2010-11-17 14:25:44 -05:00
Behdad Esfahbod 645f6f265b Add is_mutable() functions
Correspond to the make_mutable() ones.
2010-10-04 17:01:01 -04:00
Behdad Esfahbod 19c0eab8cf Add getters for all setter APIs
One in particular is not a straight getter: hb_font_unset_funcs() is
special because of the specific needs of the lifecycle management of
the user_data object.
2010-10-04 16:45:21 -04:00
Behdad Esfahbod acdba3f90b Prefer C linkage 2010-07-23 15:39:27 -04:00
Behdad Esfahbod 4fa67f34ec Add Unicode 5.2 scripts 2010-05-21 13:29:12 +01:00
Behdad Esfahbod c755cb3e3a Change header comment 2010-04-22 00:11:43 -04:00
Behdad Esfahbod 5ceefa1d8d Add hb_unicode_get_*() functions 2009-12-20 15:29:16 +01:00
Behdad Esfahbod 214ac7c1ff Another one 2009-11-04 18:12:32 -05:00
Behdad Esfahbod 49f261df2a [HB] Add hb-glib 2009-11-02 14:40:39 -05:00
Behdad Esfahbod eb27ec0cef [HB] Add hb_unicode_funcs_make_immutable() 2009-11-02 14:40:39 -05:00
Behdad Esfahbod 04cc0a29ee [HB] Flesh out Unicode funcs 2009-11-02 14:40:38 -05:00
Behdad Esfahbod 5c44188455 [HB] Start adding Unicode funcs 2009-11-02 14:40:36 -05:00