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.
Behdad Esfahbod [Thu, 21 Apr 2011 21:18:22 +0000 (17:18 -0400)]
Move hb_reference_count_t to hb-private.h
Behdad Esfahbod [Thu, 21 Apr 2011 21:14:28 +0000 (17:14 -0400)]
Update Copyright headers
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.
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).
Behdad Esfahbod [Thu, 21 Apr 2011 20:34:22 +0000 (16:34 -0400)]
Add ASSERT_STATIC_EXPR macro
Unused right now.
Behdad Esfahbod [Thu, 21 Apr 2011 20:16:21 +0000 (16:16 -0400)]
Cleanup hb_refrence_count_t
Behdad Esfahbod [Thu, 21 Apr 2011 20:03:59 +0000 (16:03 -0400)]
[TODO] Remove finished items
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 :-).
Behdad Esfahbod [Thu, 21 Apr 2011 18:58:23 +0000 (14:58 -0400)]
[icu] Remove big script switch(), rely on reverse-lookup
Behdad Esfahbod [Wed, 20 Apr 2011 22:59:10 +0000 (18:59 -0400)]
Move hb_reference_count_t from macros to inline methods
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.
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
Behdad Esfahbod [Wed, 20 Apr 2011 21:24:03 +0000 (17:24 -0400)]
[TODO] Remove done items
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.
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.
Behdad Esfahbod [Wed, 20 Apr 2011 20:40:56 +0000 (16:40 -0400)]
[TODO] Remove done items
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!
Behdad Esfahbod [Wed, 20 Apr 2011 18:20:00 +0000 (14:20 -0400)]
[OT] Fix script to ot-script-tag conversion
Behdad Esfahbod [Wed, 20 Apr 2011 18:13:23 +0000 (14:13 -0400)]
Minor
Behdad Esfahbod [Wed, 20 Apr 2011 07:15:31 +0000 (03:15 -0400)]
[test] Add test for headers included from C and C++
Behdad Esfahbod [Wed, 20 Apr 2011 07:04:56 +0000 (03:04 -0400)]
[test] Add todo items
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.
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.
Behdad Esfahbod [Wed, 20 Apr 2011 06:56:39 +0000 (02:56 -0400)]
[test] Rename test-types to test-common
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.
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.
Behdad Esfahbod [Wed, 20 Apr 2011 06:29:22 +0000 (02:29 -0400)]
Remove verbose comments
Behdad Esfahbod [Wed, 20 Apr 2011 06:00:47 +0000 (02:00 -0400)]
unicode: Cleanup implementation
Behdad Esfahbod [Wed, 20 Apr 2011 05:34:51 +0000 (01:34 -0400)]
Cosmetic
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.
Behdad Esfahbod [Tue, 19 Apr 2011 04:38:01 +0000 (00:38 -0400)]
[API] Rename hb_buffer_add_glyph() to hb_buffer_add()
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.
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.
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.
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.
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).
Behdad Esfahbod [Fri, 15 Apr 2011 23:16:54 +0000 (19:16 -0400)]
Move enum types to hb-common.h
Behdad Esfahbod [Fri, 15 Apr 2011 23:16:34 +0000 (19:16 -0400)]
[TODO] Add new item
Behdad Esfahbod [Fri, 15 Apr 2011 23:12:01 +0000 (19:12 -0400)]
Mark internal buffer variables private
Behdad Esfahbod [Fri, 15 Apr 2011 23:07:10 +0000 (19:07 -0400)]
Add hb_script_from_string()
Behdad Esfahbod [Fri, 15 Apr 2011 22:59:56 +0000 (18:59 -0400)]
Remove hb_buffer_clear_positions(), add hb_ot_layout_position_start()
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.
Behdad Esfahbod [Fri, 15 Apr 2011 22:34:55 +0000 (18:34 -0400)]
[TODO] Remove done items
Behdad Esfahbod [Fri, 15 Apr 2011 18:41:04 +0000 (14:41 -0400)]
Cosmetic
Behdad Esfahbod [Fri, 15 Apr 2011 16:40:40 +0000 (12:40 -0400)]
[TODO] Remove done items
Behdad Esfahbod [Fri, 15 Apr 2011 16:32:06 +0000 (12:32 -0400)]
Make hb_language_t typesafe
Behdad Esfahbod [Fri, 15 Apr 2011 15:45:14 +0000 (11:45 -0400)]
[test] Add more TODO items
Behdad Esfahbod [Wed, 13 Apr 2011 19:49:06 +0000 (15:49 -0400)]
Add hb_buffer_reset() and hb_buffer_set_length()
Behdad Esfahbod [Wed, 13 Apr 2011 19:02:40 +0000 (15:02 -0400)]
Minor
Behdad Esfahbod [Wed, 13 Apr 2011 05:35:58 +0000 (01:35 -0400)]
[test] Add todo items
Behdad Esfahbod [Wed, 13 Apr 2011 05:11:19 +0000 (01:11 -0400)]
[TODO] Add item re script iso15924 functions
Behdad Esfahbod [Wed, 13 Apr 2011 05:09:09 +0000 (01:09 -0400)]
[test] Test hb-buffer.h
Behdad Esfahbod [Wed, 13 Apr 2011 05:07:42 +0000 (01:07 -0400)]
[TODO] Add item re hb_buffer_reset()
Behdad Esfahbod [Wed, 13 Apr 2011 05:06:02 +0000 (01:06 -0400)]
[TODO] Add item re hb_buffer_resize()
Behdad Esfahbod [Wed, 13 Apr 2011 04:06:23 +0000 (00:06 -0400)]
[TODO] Add API item
Behdad Esfahbod [Mon, 11 Apr 2011 23:47:33 +0000 (19:47 -0400)]
Minor
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.
Behdad Esfahbod [Mon, 11 Apr 2011 21:55:58 +0000 (17:55 -0400)]
Fold hb-language.[ch] into hb-common.[ch]
Behdad Esfahbod [Mon, 11 Apr 2011 21:49:33 +0000 (17:49 -0400)]
[test] Test hb_language_t
Behdad Esfahbod [Mon, 11 Apr 2011 21:49:10 +0000 (17:49 -0400)]
Make hb_language_from_string("") return NULL language
Behdad Esfahbod [Mon, 11 Apr 2011 20:17:02 +0000 (16:17 -0400)]
[teset] Test hb_script_t
Behdad Esfahbod [Mon, 11 Apr 2011 19:47:40 +0000 (15:47 -0400)]
Rename hb_category_t to hb_unicode_general_category_t
Behdad Esfahbod [Mon, 11 Apr 2011 18:58:28 +0000 (14:58 -0400)]
Make HB_TAG_CHAR4 private
It's just sugar.
Behdad Esfahbod [Mon, 11 Apr 2011 17:27:30 +0000 (13:27 -0400)]
Make hb_tag_from_string(NULL) return HB_TAG_NONE
Behdad Esfahbod [Mon, 11 Apr 2011 17:27:21 +0000 (13:27 -0400)]
Build fix
Behdad Esfahbod [Mon, 11 Apr 2011 17:16:08 +0000 (13:16 -0400)]
Move macros around
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.
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.
Behdad Esfahbod [Mon, 11 Apr 2011 16:29:52 +0000 (12:29 -0400)]
Add few more paratheses to the HB_TAG macro
Never hurts.
Behdad Esfahbod [Mon, 11 Apr 2011 16:29:31 +0000 (12:29 -0400)]
A few more ASSERTs
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.
Behdad Esfahbod [Mon, 11 Apr 2011 15:47:14 +0000 (11:47 -0400)]
Assert int types
Behdad Esfahbod [Thu, 7 Apr 2011 20:05:07 +0000 (16:05 -0400)]
Add test directory
Behdad Esfahbod [Thu, 7 Apr 2011 19:53:26 +0000 (15:53 -0400)]
Update TODO items
Behdad Esfahbod [Wed, 6 Apr 2011 18:04:56 +0000 (14:04 -0400)]
Disable 'cswh' by default except for Arabic shaper
That better matches OpenType spec. Note that we enable it for all
Arabic-shaper scripts. Ie. we enable it by default for Syriac too,
but the SyriacOT spec does not require it. I think this is a more
useful compromise than special-casing for Arabic script alone.
Behdad Esfahbod [Mon, 4 Apr 2011 19:36:51 +0000 (15:36 -0400)]
[hb-view] setlocale (LC_ALL, "")
For now we don't use anything from the locale, but we should default
to using $LANG, etc, if --language is not specified. Right?
Behdad Esfahbod [Mon, 4 Apr 2011 18:50:09 +0000 (14:50 -0400)]
[hb-view] Rewrite --features parsing, with range support
The --features parsing handles errors now. More importantly, it
allos limiting individual features to specific byte ranges. The
format is Python-esque. Here is how it all works:
Syntax: Value: Start: End:
Setting value:
"kern" 1 0 ∞ # Turn feature on
"+kern" 1 0 ∞ # Turn feature off
"-kern" 0 0 ∞ # Turn feature off
"kern=0" 0 0 ∞ # Turn feature off
"kern=1" 1 0 ∞ # Turn feature on
"kern=2" 2 0 ∞ # Choose 2nd alternate
Setting index:
"kern[]" 1 0 ∞ # Turn feature on
"kern[:]" 1 0 ∞ # Turn feature on
"kern[5:]" 1 5 ∞ # Turn feature on, partial
"kern[:5]" 1 0 5 # Turn feature on, partial
"kern[3:5]" 1 3 5 # Turn feature on, range
"kern[3]" 1 3 3+1 # Turn feature on, single char
Mixing it all:
"kern[3:5]=0" 1 3 5 # Turn feature off for range
Behdad Esfahbod [Mon, 4 Apr 2011 18:49:50 +0000 (14:49 -0400)]
[hb-view] Use cached hb-ft face creation
Avoids recreating the face the second time we call draw().
Behdad Esfahbod [Mon, 4 Apr 2011 18:45:28 +0000 (14:45 -0400)]
[hb-view] Add --debug
Frees all allocated memory before exiting. Useful for valgrind run.
Behdad Esfahbod [Fri, 1 Apr 2011 19:48:43 +0000 (15:48 -0400)]
[hb-view] Support --features
Accepts values like:
--features="-mkmk,aalt=2,calt=1,+cswh"
A minus sign means "=0", a plus sign means "=1". Default is "=1".
A minus sign overrides an explicit value.
Behdad Esfahbod [Fri, 1 Apr 2011 18:19:10 +0000 (14:19 -0400)]
Sort options for clarity
Behdad Esfahbod [Wed, 16 Mar 2011 20:36:32 +0000 (17:36 -0300)]
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.
Behdad Esfahbod [Wed, 16 Mar 2011 17:53:32 +0000 (14:53 -0300)]
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.
Behdad Esfahbod [Wed, 2 Mar 2011 06:01:03 +0000 (01:01 -0500)]
[hb-view] Handle write_to_png errors
Behdad Esfahbod [Wed, 2 Mar 2011 04:18:09 +0000 (23:18 -0500)]
[hb-view] Link with -lm
Behdad Esfahbod [Mon, 28 Feb 2011 18:13:52 +0000 (10:13 -0800)]
Fix possible overflow
Behdad Esfahbod [Wed, 23 Feb 2011 17:47:56 +0000 (12:47 -0500)]
Default background color shall either be white or transparent
Definitely not black!
Behdad Esfahbod [Tue, 22 Feb 2011 23:06:19 +0000 (18:06 -0500)]
Add initial hb-view tool
Currently doesn't handle script or direction.
Bradley Grainger [Tue, 15 Feb 2011 23:37:29 +0000 (18:37 -0500)]
Fix #pragma message for MSVC.
__LOC__ was renamed to _HB__LOC__ in cd7555 but the corresponding
change wasn't made in hb-private.h.
Behdad Esfahbod [Mon, 10 Jan 2011 12:45:41 +0000 (07:45 -0500)]
Fix language extension matching
Behdad Esfahbod [Mon, 10 Jan 2011 07:27:49 +0000 (02:27 -0500)]
Don't use the m4/ dir
We just require people to have libtool, pkg-config, etc installed
when running autogen.sh
Behdad Esfahbod [Mon, 10 Jan 2011 03:29:14 +0000 (22:29 -0500)]
Fix 'make distcheck'
Javier Jardón [Mon, 10 Jan 2011 03:18:53 +0000 (22:18 -0500)]
Bug 31174 - Update autotools configuration
Behdad Esfahbod [Thu, 6 Jan 2011 19:58:52 +0000 (14:58 -0500)]
Fix ChanContext backtrack matching with GPOS
Reported on mailing list by Keith Stribley and Khaled Hosny.
Behdad Esfahbod [Thu, 6 Jan 2011 19:44:14 +0000 (14:44 -0500)]
Remove unused realloc
We always allocate and grow str and pos together.
Behdad Esfahbod [Thu, 6 Jan 2011 19:16:59 +0000 (14:16 -0500)]
Fix ICU detection
Behdad Esfahbod [Mon, 27 Dec 2010 01:52:40 +0000 (20:52 -0500)]
Remove Graphite backend
It was unmaintained and the code has to be replaced to use the new
grphite-ng code base.
Behdad Esfahbod [Wed, 22 Dec 2010 06:39:29 +0000 (01:39 -0500)]
Docs
Behdad Esfahbod [Tue, 21 Dec 2010 23:36:25 +0000 (18:36 -0500)]
Bug 32274 - classic mongolian shaper
Add support for classic Mongolian script to the Arabic shaper.
Still work to be done around U+180E MONGOLIAN VOWEL SEPARATOR as it
should not be included in the final glyph stream the same way that
ZWNJ, etc should not appear in the final glyph stream.
But the joining part should be done.
There remains the question of how should the U+18A9 MONGOLIAN LETTER ALI
GALI DAGALGA be handled as it has General Category NSM but a letter
nonetheless. For now, our generic logic makes this a joining T instead
of joining D as other Mongolian letters are.