Commit Graph

151 Commits

Author SHA1 Message Date
Behdad Esfahbod 1bc1cb3603 Make source more digestable for gobject-introspection 2012-06-16 15:21:55 -04:00
Behdad Esfahbod 0594a24484 Cleanup TRUE/FALSE vs true/false 2012-06-05 20:35:40 -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 e6c09cdf43 Remove the pre_allocate argument from hb_buffer_create()
For two reasons:

1. User can always call hb_buffer_pre_allocate() themselves, and

2. Now we do a pre_alloc in add_utfX anyway, so the total number of
reallocs is limited to a small number (~3) anyway.  This just makes the
API cleaner.
2011-08-19 19:20:26 +02: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 944b2ba1ce [buffer] Make API take signed int length
Since we already switched to accepting -1 as 'zero-terminated'.
2011-08-09 00:23:58 +02:00
Behdad Esfahbod 02aeca985b [API] Changes to main shape API
hb_shape() now accepts a shaper_options and a shaper_list argument.
Both can be set to NULL to emulate previous API.  And in most situations
they are expected to be set to NULL.

hb_shape() also returns a boolean for now.  If shaper_list is NULL, the
return value can be ignored.

shaper_options is ignored for now, but otherwise it should be a
NULL-terminated list of strings.

shaper_list is a NULL-terminated list of strings.  Currently recognized
strings are "ot" for native OpenType Layout implementation, "uniscribe"
for the Uniscribe backend, and "fallback" for the non-complex backend
(that will be implemented shortly).  The fallback backend never fails.

The env var HB_SHAPER_LIST is also parsed and honored.  It's a
colon-separated list of shaper names.  The fallback shaper is invoked if
none of the env-listed shapers succeed.

New API hb_buffer_guess_properties() added.
2011-08-04 22:38:09 -04:00
Behdad Esfahbod 80a6833b03 [API] Add hb_*_get_empty() for all objects 2011-05-11 18:21:58 -04:00
Behdad Esfahbod 5fa849b77d [API] Add _set/get_user_data() for all objects 2011-04-27 21:46:01 -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 f85faee9b3 [API] Rename hb_buffer_add_glyph() to hb_buffer_add() 2011-04-19 00:38:01 -04:00
Behdad Esfahbod aab0de50e2 [API] Add hb_buffer_allocation_successful()
Returns the error status of the buffer.
2011-04-19 00:32:19 -04:00
Ryan Lortie 02a534b23f [API] Rename hb_buffer_ensure() to hb_buffer_pre_allocate()
The new name is self-documenting.
2011-04-19 00:05:43 -04:00
Ryan Lortie 70566befc5 [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.
2011-04-19 00:03:44 -04:00
Behdad Esfahbod b54cd07b26 Mark internal buffer variables private 2011-04-15 19:12:01 -04:00
Behdad Esfahbod 8f0d7e0c3f Remove hb_buffer_clear_positions(), add hb_ot_layout_position_start() 2011-04-15 19:08:43 -04:00
Behdad Esfahbod 2fc56edff6 [API] Remove hb_buffer_clear()
One should use hb_buffer_reset() really.
2011-04-15 19:08:38 -04:00
Behdad Esfahbod c910bec863 Add hb_buffer_reset() and hb_buffer_set_length() 2011-04-13 15:49:06 -04:00
Behdad Esfahbod 8e4bb3cacc Fold hb-language.[ch] into hb-common.[ch] 2011-04-11 17:55:58 -04:00
Behdad Esfahbod 88474c6fda Get rid of the OpenType-specific internal buffer representation
Add variant integers to buffer item types.  More cleanup coming.
2010-11-02 19:12:58 -04:00
Behdad Esfahbod 6cb8c34930 Add hb_var_int_t 2010-11-02 19:12:57 -04:00
Behdad Esfahbod acdba3f90b Prefer C linkage 2010-07-23 15:39:27 -04:00
Behdad Esfahbod a6a79df5fe Handle malloc failture in the buffer 2010-05-14 23:20:16 -04:00
Behdad Esfahbod c755cb3e3a Change header comment 2010-04-22 00:11:43 -04:00
Behdad Esfahbod ff44f88df2 Handle shaping in non-native direction 2009-11-06 19:48:16 -05:00
Behdad Esfahbod 9db8ad7531 Add hb_ot_layout_position_finish()
We expect buffer to be setup with default positions before GPOS.
2009-11-06 16:47:31 -05:00
Behdad Esfahbod 3d14528b8b Rename hb_buffer_get_len() to hb_buffer_get_length() 2009-11-06 15:13:17 -05:00
Behdad Esfahbod 9bef3611f0 Rename [xy]_pos to [xy]_offset since we don't accumulate positions 2009-11-05 12:20:11 -05:00
Behdad Esfahbod ae070b7d39 Add script and language to buffer 2009-11-04 20:29:54 -05:00
Behdad Esfahbod 5ebabecef3 Move unicode_funcs to buffer 2009-11-03 15:15:07 -05:00
Behdad Esfahbod 2f5931e404 [HB] Hide lig_id and component members of hb_glyph_info_t 2009-11-02 14:40:46 -05:00
Behdad Esfahbod 864e2560b6 [HB] Fix pedantic warnings 2009-11-02 14:40:45 -05:00
Behdad Esfahbod 2866d2974b [HB] Bitfield packing *is* very delicate
Fix the second instance.
2009-11-02 14:40:42 -05:00
Behdad Esfahbod 299f08961f [HB] Implement buffer UTF-X input 2009-11-02 14:40:37 -05:00
Behdad Esfahbod 1b7b97f28a [HB] Add buffer UTF-X API 2009-11-02 14:40:37 -05:00
Behdad Esfahbod fbaf8ffa09 [HB] Add hb_buffer_reverse() 2009-11-02 14:40:37 -05:00
Behdad Esfahbod 468769b8f5 [HB] Rename hb_ot_layout_feature_mask_t to hb_mask_t 2009-11-02 14:40:34 -05:00
Behdad Esfahbod f1322e52d5 [HB] Cleanup public buffer structs 2009-11-02 14:40:26 -05:00
Behdad Esfahbod 6d5bb18e93 [OT] Match struct with HB's 2009-11-02 14:40:25 -05:00
Behdad Esfahbod 11fbb5487d [HB] Port buffert to new object API 2009-11-02 14:40:25 -05:00
Behdad Esfahbod 02a370697d [HB] Move direction to buffer 2009-11-02 14:40:23 -05:00
Behdad Esfahbod f9cd1014f8 Apply patch from Jonathan Kew 2009-11-02 14:40:23 -05:00
Behdad Esfahbod 2ebb89d63d Revert "XX"
This reverts commit c939f6aff405ca7b10b1f1538f46148bff719fcb.
2009-11-02 14:40:22 -05:00
Behdad Esfahbod 55520d2af1 XX 2009-11-02 14:40:22 -05:00
Behdad Esfahbod e35bbd570a [HB] Improve buffer. Don't dup out buffer unless out is longer than in
That is, we work in-place even for ligatures now.
2009-11-02 14:40:22 -05:00
Behdad Esfahbod c968fc2dc8 [HB] More buffer cleanup 2009-11-02 14:40:19 -05:00
Behdad Esfahbod d9d2a07f4a [HB] Remove one XXX, add another 2009-11-02 14:40:18 -05:00
Behdad Esfahbod 6c78683c04 [HB] Update copyright years 2009-11-02 14:40:18 -05:00
Behdad Esfahbod f96ffd43bc [HB] simplify macros 2009-11-02 14:40:18 -05:00
Behdad Esfahbod 5c0adce1cc [HB] Rename harfbuzz-buffer to hb-buffer 2009-11-02 14:40:15 -05:00