Commit Graph

175 Commits

Author SHA1 Message Date
Behdad Esfahbod eb45c0a2fb Minor 2013-01-16 22:07:50 -06:00
Behdad Esfahbod f0c82410db [OTLayout] Always collect default language system in collect_lookups
Not sure if this is the most desired behavior.  It's the most easily
defined though.
2013-01-03 00:07:16 -06:00
Behdad Esfahbod 15e9e4e1dd [OTLayout] Fix feature iteration in collect_lookups
Previous logic was just wrong.
2013-01-03 00:04:40 -06:00
Behdad Esfahbod 733e8c0d7b [OTLayout] Whitespace 2013-01-03 00:00:23 -06:00
Behdad Esfahbod d37ae38047 [OTLayout] Handle required_feature_index in collect_lookups 2013-01-02 23:57:36 -06:00
Behdad Esfahbod efe252e600 [OTLayout] Fix 'size' featureParams implementation
Looks at alternate location now.
2012-12-17 23:25:57 -05:00
Behdad Esfahbod 85bc44b90a [OTLayout] More 'size' feature sanity checking
We still don't look for the old incorrect place of the featureParams.
I'll wait till someone actually complains about it...
2012-12-12 11:38:49 -05:00
Behdad Esfahbod 372fe2b67b [OTLayout] Make hb_ot_layout_get_size_params() do some checks 2012-12-11 14:30:57 -05:00
Behdad Esfahbod 875a5cbc9c [OTLayout] Change hb_ot_layout_get_params() API
And add implementation for StylisticSet UINameID.  No API yet.
2012-12-11 14:17:01 -05:00
Behdad Esfahbod 6748b96d27 Minor 2012-11-30 12:02:21 +02:00
Behdad Esfahbod 3038ae6adb [OTLayout] Minor 2012-11-30 08:24:13 +02:00
Behdad Esfahbod 0dff11f6bf [OTLayout] Look for any 'size' feature, not only in DFLT script
The old code doesn't work with all fonts, as Khaled has reported.
2012-11-30 08:14:20 +02:00
Behdad Esfahbod e9ad71dee8 [OTLayout] Rename hb_ot_layout_position_get_size() to hb_ot_layout_get_size_params() 2012-11-30 08:10:26 +02:00
Behdad Esfahbod f54cce3c6a [OTLayout] Implement 'size' feature 2012-11-26 14:02:31 +02:00
Behdad Esfahbod a88e716021 [OTLayout] Implement hb_ot_layout_collect_lookups()
Untested.
2012-11-24 02:31:02 -05:00
Behdad Esfahbod cdd756b9f4 [OTLayout] Implement GPOS collect_glyphs() 2012-11-24 01:38:41 -05:00
Behdad Esfahbod 9b34677f36 [OTLayout] Clean up closure() a bit 2012-11-23 17:55:40 -05:00
Behdad Esfahbod ec35a72a44 [OTLayout] Port apply() operator to process() template 2012-11-22 16:33:46 -05:00
Behdad Esfahbod 44fc237b53 [OTLayout] Port closure() to process() template 2012-11-22 16:33:46 -05:00
Behdad Esfahbod e8cfdd7fa8 Start implementing collect_glyphs() operation
Not functional yet.
2012-11-16 19:07:06 -08:00
Behdad Esfahbod 89ca8eeb83 Implement hb_ot_layout_get_glyphs_in_class() 2012-11-16 13:53:40 -08:00
Behdad Esfahbod 5a08ecf920 Implement hb_ot_layout_get_glyph_class() 2012-11-16 13:34:29 -08:00
Behdad Esfahbod f30641038b Bunch of independent changes (ouch)
API additions:

	hb_segment_properties_t
	HB_SEGMENT_PROPERTIES_DEFAULT
	hb_segment_properties_equal()
	hb_segment_properties_hash()

	hb_buffer_set_segment_properties()
	hb_buffer_get_segment_properties()

	hb_ot_layout_glyph_class_t

	hb_shape_plan_t
	hb_shape_plan_create()
	hb_shape_plan_create_cached()
	hb_shape_plan_get_empty()
	hb_shape_plan_reference()
	hb_shape_plan_destroy()
	hb_shape_plan_set_user_data()
	hb_shape_plan_get_user_data()
	hb_shape_plan_execute()

	hb_ot_shape_plan_collect_lookups()

API changes:

	Rename hb_ot_layout_feature_get_lookup_indexes() to
	hb_ot_layout_feature_get_lookups().

New header file:

	hb-shape-plan.h

And a bunch of prototyped but not implemented stuff.  Coming soon.
(Tests fail because of the prototypes right now.)
2012-11-15 18:48:10 -08:00
Behdad Esfahbod 362a990b22 Rename hb_ot_layout_would_substitute_lookup() and hb_ot_layout_substitute_closure_lookup()
To match upcoming API.
2012-11-15 14:57:31 -08:00
Behdad Esfahbod 2bd9fe3598 Refactor 2012-09-04 15:15:19 -04:00
Behdad Esfahbod a5ddd9e31c [OT] Really fix possible NULL dereference this time 2012-09-04 14:55:00 -04:00
Behdad Esfahbod 7c8e844d92 Use namespace for OpenType tables
Avoids USHORT, SHORT, ULONG, LONG clashes with Windows API.
2012-08-28 17:57:49 -04:00
Behdad Esfahbod d9b204d3d2 [GSUB] Allow non-zero-context matching in would_apply()
To be used in the next patch.
2012-08-23 16:22:28 -04:00
Behdad Esfahbod 4c8ac4f47e Misc minor fixes 2012-08-08 17:44:19 -04:00
Behdad Esfahbod 472f229a63 [GSUB] Generalize would_apply()
Fixes logic also, where before we were always matching if glyphs_len==1
and a ligature started with the glyph.
2012-08-07 22:25:24 -04:00
Behdad Esfahbod afbcc24be0 [GSUB] Wire the font, not just the face, down to substitute()
We need the font for glyph lookup during GSUB pauses in Indic shaper.
Could perhaps be avoided, but at this point, we don't mean to support
separate substitute()/position() entry points (anymore), so there is
no point in not providing the font to GSUB.
2012-08-02 08:36:40 -04:00
Behdad Esfahbod b0e6a26a10 [OT] Hide some API
It was impossible to meaningfully use them from the outside these days.
2012-08-02 08:11:14 -04:00
Behdad Esfahbod 6f76113755 [GSUB/GPOS] Check array size before accessing digests 2012-08-02 04:00:31 -04:00
Behdad Esfahbod 22148b8c4a Use Coverage digests in would_apply 2012-08-02 03:51:51 -04:00
Behdad Esfahbod 1336ecdf8e [GSUB/GPOS] Use Coverage digests as gatekeeper
Gives me a good 10% speedup for the Devanagari test case.  Less so
for less lookup-intensive tests.

For the Devanagari test case, the false positive rate of the GSUB digest
is 4%.
2012-08-01 21:46:36 -04:00
Behdad Esfahbod 1e7d860613 [GPOS] Adjust mark advance-width zeroing logic
If there is no GPOS, zero mark advances.

If there *is* GPOS and the shaper requests so, zero mark advances for
attached marks.

Fixes regression with Tibetan, where the font has GPOS, and marks a
glyph as mark where it shouldn't get zero advance.
2012-07-31 23:41:06 -04:00
Behdad Esfahbod 3dcbdc2125 Minor 2012-07-30 19:32:42 -04:00
Behdad Esfahbod 05bd1b6342 [GSUB/GPOS] Move glyph props matching around 2012-07-30 19:30:01 -04:00
Behdad Esfahbod fd42257f8c Minor 2012-07-30 18:44:10 -04:00
Behdad Esfahbod f860366456 [OT] Gain back some lost speed 2012-07-30 03:16:38 -04:00
Behdad Esfahbod 11f4c87d01 [OT] Remove hb_ot_layout_ensure()
I didn't like it from the beginning.
2012-07-30 02:36:46 -04:00
Behdad Esfahbod 578e42182b Minor 2012-07-30 02:35:07 -04:00
Behdad Esfahbod cfe9882610 Add hb_ot_layout_ensure() and hb_uniscribe_font_ensure() 2012-07-27 03:06:30 -04:00
Behdad Esfahbod ea278d3895 Partially switch ot shaper to shape_plan 2012-07-27 02:12:28 -04:00
Behdad Esfahbod e72b360ac6 Refactor / finish would_apply() operation
Untested.
2012-07-19 14:44:46 -04:00
Behdad Esfahbod 559f706678 Fix MarkAttachmentType matching
Fixes issue reported by Khaled Hosny with his Hussaini Nastaleeq font
and sequences like those added in the previous commit.
2012-07-16 22:46:52 -04:00
Behdad Esfahbod ad4494759f Minor 2012-07-16 22:40:21 -04:00
Behdad Esfahbod ad6a6f2240 Minor 2012-06-09 01:43:20 -04:00
Behdad Esfahbod ce47613889 Micro-optimize
I know...
2012-06-09 01:43:15 -04:00
Behdad Esfahbod 0f8fea71a6 Minor. Hide _hb_ot_layout_get_glyph_property() 2012-06-09 00:24:38 -04:00