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.
Behdad Esfahbod [Tue, 21 Dec 2010 19:19:32 +0000 (14:19 -0500)]
Reroute Mandaic shaping through the Arabic shaper
We added Mandaic joining data to the Arabic shaper a while ago, but
were not actually using the Arabic shaper for Mandaic. Fixed.
Behdad Esfahbod [Tue, 21 Dec 2010 19:18:24 +0000 (14:18 -0500)]
Annotate the Arabic joining table with block information
Behdad Esfahbod [Sat, 18 Dec 2010 01:15:05 +0000 (20:15 -0500)]
Rename remaining metrics uses to extents
Behdad Esfahbod [Wed, 15 Dec 2010 04:51:29 +0000 (23:51 -0500)]
Rename TableDirectory to TableRecord as per OpenType 1.6
Behdad Esfahbod [Mon, 13 Dec 2010 20:54:56 +0000 (15:54 -0500)]
Update 'head' table to OpenType 1.6
Behdad Esfahbod [Mon, 13 Dec 2010 19:22:35 +0000 (14:22 -0500)]
Disallow ligature substitutions replacing one glyph
Behdad Esfahbod [Mon, 13 Dec 2010 19:13:35 +0000 (14:13 -0500)]
Mozilla Bug 618592 - freeze on typekit
Fix apply_lookup() for zero-input broken fonts.
Behdad Esfahbod [Tue, 7 Dec 2010 21:22:02 +0000 (16:22 -0500)]
Rename original_direction to target_direction
Behdad Esfahbod [Tue, 7 Dec 2010 21:20:42 +0000 (16:20 -0500)]
Fix arabic shaping of LTR text
We should ensure-direction before doing any complex work. The only
exception is mirroring that needs to see the original / final direction,
not the native. Handle that.
Behdad Esfahbod [Tue, 30 Nov 2010 05:57:15 +0000 (00:57 -0500)]
Bug 31965 - some GNU/Linux distributions lack icu.pc but have icu-config
Patch from suzuki toshiya.
Behdad Esfahbod [Mon, 29 Nov 2010 00:39:47 +0000 (19:39 -0500)]
Adjust pyx files to reflect change from int to hb_var_int_t
Patch from Thomas Hunger.
Behdad Esfahbod [Mon, 22 Nov 2010 16:30:32 +0000 (11:30 -0500)]
Fix failing checks
Behdad Esfahbod [Mon, 22 Nov 2010 16:03:18 +0000 (11:03 -0500)]
Remove email address from Copyright headers
Behdad Esfahbod [Thu, 18 Nov 2010 18:58:32 +0000 (13:58 -0500)]
Clarify copyright notice
Behdad Esfahbod [Wed, 17 Nov 2010 21:58:21 +0000 (16:58 -0500)]
Move generated table to its own file
Behdad Esfahbod [Wed, 17 Nov 2010 21:52:58 +0000 (16:52 -0500)]
Update Arabic joining table to include Mandaic
Mandaic was added to Unicode 6.0, but the joining data was not updated.
Draft ArabicShaping.txt from 6.1 includes the joining data for Mandaic.
Use that.
Behdad Esfahbod [Wed, 17 Nov 2010 19:49:40 +0000 (14:49 -0500)]
Add OpenType script tags for Unicode 5.2 and Unicode 6.0 scripts
Based on tags proposed by Microsoft for inclusion in OpenType.
Behdad Esfahbod [Wed, 17 Nov 2010 19:35:34 +0000 (14:35 -0500)]
Add Unicode 6.0 scripts
Behdad Esfahbod [Wed, 17 Nov 2010 19:25:44 +0000 (14:25 -0500)]
Change HB_SCRIPT_MEITEI_MAYEK to HB_SCRIPT_MEETEI_MAYEK
The new name matches the Unicode name. Reported by Jonathan Kew.
Behdad Esfahbod [Wed, 17 Nov 2010 18:08:47 +0000 (13:08 -0500)]
Add TODO item
Behdad Esfahbod [Wed, 17 Nov 2010 17:57:23 +0000 (12:57 -0500)]
Add XXX marks
Behdad Esfahbod [Fri, 5 Nov 2010 14:51:37 +0000 (10:51 -0400)]
Add TODO item
Behdad Esfahbod [Wed, 3 Nov 2010 20:37:24 +0000 (16:37 -0400)]
Save general category and combining class in the buffer for reuse
Behdad Esfahbod [Wed, 3 Nov 2010 19:50:36 +0000 (15:50 -0400)]
More "unreached code" warning fixes
Ugly :(.
Behdad Esfahbod [Wed, 3 Nov 2010 19:47:12 +0000 (15:47 -0400)]
Add comment
Behdad Esfahbod [Wed, 3 Nov 2010 19:40:07 +0000 (15:40 -0400)]
Pedantic
Behdad Esfahbod [Wed, 3 Nov 2010 19:28:56 +0000 (15:28 -0400)]
Minor code shuffling
Behdad Esfahbod [Wed, 3 Nov 2010 19:11:04 +0000 (15:11 -0400)]
Fix a few more "unreachable code" warnings
Behdad Esfahbod [Wed, 3 Nov 2010 16:46:58 +0000 (12:46 -0400)]
Remove another couple lines of dead code
Behdad Esfahbod [Wed, 3 Nov 2010 15:50:21 +0000 (11:50 -0400)]
Fix unreachable-code warning
Behdad Esfahbod [Thu, 28 Oct 2010 03:18:51 +0000 (23:18 -0400)]
Move things around some more
Behdad Esfahbod [Thu, 28 Oct 2010 03:09:10 +0000 (23:09 -0400)]
Move buffer var allocation local
Behdad Esfahbod [Thu, 28 Oct 2010 02:48:31 +0000 (22:48 -0400)]
Move code around
Behdad Esfahbod [Thu, 28 Oct 2010 02:37:59 +0000 (22:37 -0400)]
Move some more code around
Behdad Esfahbod [Thu, 28 Oct 2010 02:11:32 +0000 (22:11 -0400)]
Simplify mark skipping logic
Behdad Esfahbod [Thu, 28 Oct 2010 02:07:49 +0000 (22:07 -0400)]
Rename lookup_flags to lookup_props since it's more than just flags
Behdad Esfahbod [Wed, 27 Oct 2010 21:39:01 +0000 (17:39 -0400)]
WIP removing external synthesized GDEF support and implementing it internally
Behdad Esfahbod [Wed, 27 Oct 2010 21:37:20 +0000 (17:37 -0400)]
Remove unused function
Behdad Esfahbod [Wed, 27 Oct 2010 21:07:04 +0000 (17:07 -0400)]
More cleanup
Behdad Esfahbod [Wed, 27 Oct 2010 21:06:12 +0000 (17:06 -0400)]
More lig-id cleanup
Behdad Esfahbod [Wed, 27 Oct 2010 21:01:03 +0000 (17:01 -0400)]
More removal of lig-id code from buffer
Behdad Esfahbod [Wed, 27 Oct 2010 20:57:01 +0000 (16:57 -0400)]
Minor renaming
Behdad Esfahbod [Wed, 27 Oct 2010 20:51:02 +0000 (16:51 -0400)]
Move setting lig_id/component out of buffer and to the gsub code
Behdad Esfahbod [Wed, 27 Oct 2010 20:25:28 +0000 (16:25 -0400)]
Always allocate new ligature id
No practical point in reusing ligature ids.
Behdad Esfahbod [Wed, 27 Oct 2010 20:19:13 +0000 (16:19 -0400)]
Set component=0 for ligature glyph
Behdad Esfahbod [Wed, 27 Oct 2010 19:38:06 +0000 (15:38 -0400)]
Remove comment
Behdad Esfahbod [Wed, 27 Oct 2010 18:42:15 +0000 (14:42 -0400)]
Get rid of the OpenType-specific internal buffer representation
Add variant integers to buffer item types. More cleanup coming.
Behdad Esfahbod [Wed, 27 Oct 2010 18:27:03 +0000 (14:27 -0400)]
Add hb_var_int_t
Behdad Esfahbod [Tue, 2 Nov 2010 23:12:37 +0000 (19:12 -0400)]
Remove trailing comma
Behdad Esfahbod [Wed, 27 Oct 2010 18:09:27 +0000 (14:09 -0400)]
Supposedly implement vertical support in GPOS
Not tested at all.
Behdad Esfahbod [Wed, 27 Oct 2010 17:44:59 +0000 (13:44 -0400)]
Clarify cursive_chain (and change its sign)
Behdad Esfahbod [Wed, 27 Oct 2010 16:34:50 +0000 (12:34 -0400)]
Remove more pointless LONGTERMTODO items
Behdad Esfahbod [Wed, 27 Oct 2010 16:32:02 +0000 (12:32 -0400)]
Rename hb_ot_layout_get_lig_carets() to hb_ot_layout_get_ligature_carets()
Behdad Esfahbod [Wed, 27 Oct 2010 16:30:46 +0000 (12:30 -0400)]
Implement vertical support in get_lig_carets()
Behdad Esfahbod [Wed, 27 Oct 2010 16:07:49 +0000 (12:07 -0400)]
Remove LONGTERMTODO item that I'll never fix
Behdad Esfahbod [Wed, 27 Oct 2010 16:00:49 +0000 (12:00 -0400)]
Remove unused macro
Behdad Esfahbod [Wed, 27 Oct 2010 15:54:26 +0000 (11:54 -0400)]
Rewrite Cursive joining to act more like other pair lookups
Look forward for next character instead of joining to the last character.
Behdad Esfahbod [Wed, 27 Oct 2010 15:09:48 +0000 (11:09 -0400)]
Fix Cursive positioning
Test case: "مرا" rendered using IranNastaliq.
Behdad Esfahbod [Wed, 27 Oct 2010 14:40:39 +0000 (10:40 -0400)]
Fix segfault with Arabic combining marks
Behdad Esfahbod [Wed, 27 Oct 2010 05:28:28 +0000 (01:28 -0400)]
Remove obsolete TODO item
We don't cache any metrics internally, so the correct way to add more
glyph metrics items is to add new callbacks for them. We already have
separeate callbacks for advance vs extents.
Behdad Esfahbod [Wed, 27 Oct 2010 05:23:14 +0000 (01:23 -0400)]
Oops, remove extra mask setting that broke complex shaping
Behdad Esfahbod [Wed, 27 Oct 2010 05:13:56 +0000 (01:13 -0400)]
Divide get_metrics into get_advance and get_extents
Graphite module not updated.
Bump version to 0.3.
Behdad Esfahbod [Tue, 26 Oct 2010 15:28:14 +0000 (11:28 -0400)]
Fix blob leak
Behdad Esfahbod [Wed, 13 Oct 2010 22:33:16 +0000 (18:33 -0400)]
Massage mask setting a bit more
Still finding the exact correct way the masks should be set.
Behdad Esfahbod [Wed, 13 Oct 2010 21:17:00 +0000 (17:17 -0400)]
Oops, actually set global mask
Behdad Esfahbod [Wed, 13 Oct 2010 19:54:06 +0000 (15:54 -0400)]
Make sure boolean features always use value=1
Previously boolean features turned on the entire feature mask. This is
wrong if feature is Alternate and user has provided values bigger than one.
Though, I don't think other engines support such corner cases.
Behdad Esfahbod [Wed, 13 Oct 2010 19:38:52 +0000 (15:38 -0400)]
Return early if mask is 0
Behdad Esfahbod [Wed, 13 Oct 2010 19:36:38 +0000 (15:36 -0400)]
Make sure feature values don't leak out of their mask
Behdad Esfahbod [Wed, 13 Oct 2010 19:34:50 +0000 (15:34 -0400)]
Fix applying default-value for features
Previously if a default global feature was overrided by a non-global
user feature, we were not setting any default mask for the feature,
essentially disabling the feature by default. Fix that.
Behdad Esfahbod [Wed, 13 Oct 2010 19:18:29 +0000 (15:18 -0400)]
Set user masks after complex masks
Behdad Esfahbod [Wed, 13 Oct 2010 18:20:48 +0000 (14:20 -0400)]
Add TODO item
Behdad Esfahbod [Wed, 13 Oct 2010 14:57:27 +0000 (10:57 -0400)]
Cleanup TODO
Looks like a roadmap now.
Behdad Esfahbod [Wed, 13 Oct 2010 14:41:53 +0000 (10:41 -0400)]
Fix stupid bug, oops
Behdad Esfahbod [Tue, 12 Oct 2010 22:34:20 +0000 (18:34 -0400)]
Step the version up to 0.2 now that Arabic shaper is in
Behdad Esfahbod [Tue, 12 Oct 2010 21:37:44 +0000 (17:37 -0400)]
Fix Arabic shaper
It's tested now. It works!
Behdad Esfahbod [Tue, 12 Oct 2010 21:23:54 +0000 (17:23 -0400)]
Hookup Arabic shaper!
Not tested yet.
Behdad Esfahbod [Tue, 12 Oct 2010 21:07:02 +0000 (17:07 -0400)]
Merge clearing masks and setting global masks