Commit Graph

136 Commits

Author SHA1 Message Date
Behdad Esfahbod 7627100f42 Mark unsigned integer literals with the u suffix
Simplifies hb_in_range() calls as the type can be inferred.
The rest is obsessiveness, I admit.
2014-07-11 16:22:13 -04:00
Behdad Esfahbod 911ca38645 Add back API removed recently
Add hb_ot_layout_language_get_required_feature_index() again, which
is used in Pango.  This was removed in
da13293798 in favor of
hb_ot_layout_language_get_required_feature().

API changes:

  - Added hb_ot_layout_language_get_required_feature_index back.
2014-06-24 10:20:36 -06:00
Jonathan Kew da13293798 Rework handling of requiredFeature to solve problem with rlig in arial.ttf from winxp
https://bugzilla.mozilla.org/show_bug.cgi?id=986802
Fixes https://github.com/behdad/harfbuzz/pull/39

API Change:

-hb_ot_layout_language_get_required_feature_index
+hb_ot_layout_language_get_required_feature

New API takes an extra pointer argument.  Pass NULL in to get
behavior of previous API.

Reworked by behdad
2014-06-19 16:33:48 -04:00
Luis de Bethencourt fbd4acc58a Clean ht-ob headers 2013-12-22 22:52:57 -05:00
Behdad Esfahbod 27674b4bb3 [OTLayout] Protect against out-of-range lookup indices
Filter them out when compiling map.
2013-10-03 14:54:50 -04:00
Behdad Esfahbod 6c48f20eea [otlayout] Add structs for JSTF table 2013-09-09 15:43:10 -04: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 4ab99fb8c3 Minor 2012-11-30 15:02:04 +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 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 977f1740ac Unbreak tests 2012-11-16 13:10:07 -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 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 5f4c52867c Minor 2012-08-08 16:53:37 -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 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 05bd1b6342 [GSUB/GPOS] Move glyph props matching around 2012-07-30 19:30:01 -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 cfe9882610 Add hb_ot_layout_ensure() and hb_uniscribe_font_ensure() 2012-07-27 03:06:30 -04:00
Behdad Esfahbod e72b360ac6 Refactor / finish would_apply() operation
Untested.
2012-07-19 14:44:46 -04:00
Behdad Esfahbod 5caece67ab Make closure() return void 2012-04-23 23:03:12 -04:00
Behdad Esfahbod 0b08adb353 Add hb_set_t 2012-04-23 22:44:59 -04:00
Behdad Esfahbod 6a9be5bd35 Rename hb_glyph_map_t to hb_set_t 2012-04-23 22:23:17 -04:00
Behdad Esfahbod c64ddab3c3 Flesh out closure() for GSUB
The GSUBGPOS part still missing.
2012-04-23 15:28:35 -04:00
Behdad Esfahbod 3e32cd9570 Minor 2012-04-23 13:22:50 -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 c47a31fb47 [OT] Save chosen script tag 2011-07-30 20:57:01 -04:00
Behdad Esfahbod 60fbb36096 [Vertical] GPOS is always done with horizontal origin 2011-05-19 18:46:15 -04:00
Behdad Esfahbod 46d6a21cc8 [API] Add hb_ot_layout_substitute_start/finish() 2011-05-11 22:33:13 -04:00
Behdad Esfahbod 72657e4ce7 [API] Make hb_font_create() take a face and reference it 2011-05-02 20:47:23 -04:00
Behdad Esfahbod 2409d5f8d7 Update Copyright headers 2011-04-21 17:14:28 -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 1e7c1fcbc3 Move code around 2010-11-02 19:12:59 -04:00
Behdad Esfahbod 98370e89d1 WIP removing external synthesized GDEF support and implementing it internally 2010-11-02 19:12:58 -04:00
Behdad Esfahbod e204674fe3 Rename hb_ot_layout_get_lig_carets() to hb_ot_layout_get_ligature_carets() 2010-10-27 12:32:02 -04:00
Behdad Esfahbod 3357d145f8 Implement vertical support in get_lig_carets() 2010-10-27 12:30:46 -04:00
Behdad Esfahbod acdba3f90b Prefer C linkage 2010-07-23 15:39:27 -04:00
Behdad Esfahbod c755cb3e3a Change header comment 2010-04-22 00:11:43 -04:00
Behdad Esfahbod 555d11273e [GDEF] Fix bug in building synthetic GDEF 2010-01-26 12:58:59 -05:00
Behdad Esfahbod 2014b8d110 Hook OpenType shaping up
Default features only for now.
2009-12-20 20:58:26 +01:00
Behdad Esfahbod b4b4272c8d Oops, wrong change 2009-11-06 17:46:33 -05:00
Behdad Esfahbod 52ea47767c Change order of font and face for API consistency 2009-11-06 17:45:38 -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 8a3511ac6c Add hb_language_t as well as language/script conversion to OT tags 2009-11-04 19:45:39 -05:00
Behdad Esfahbod e21899bc35 Fix array query API
The array query APIs now all do:

  - Return the total number of items
  - Take a start_offset, such that individual items can be fetched
  - The _count IN/OUT variable always has number of items written
    into the array upon return of the function
2009-11-04 16:36:14 -05:00
Behdad Esfahbod 6bdab706ec [HB] Indent 2009-11-02 14:40:36 -05:00
Behdad Esfahbod 17878255fa [HB] Remove hb_ot_layout_table_find_feature()
That function doesn't make much sense as multiple features in the table may
have the same tag.
2009-11-02 14:40:35 -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 bff3c0fde5 [HB] Remove clumsy macros and improve API 2009-11-02 14:40:34 -05:00
Behdad Esfahbod 0ead481a5a [HB] Port ot-layout to new public API 2009-11-02 14:40:26 -05:00
Behdad Esfahbod 0090dc0f67 [HB] Remove hinting setting and use ppem==0 to mean "no hinting" 2009-11-02 14:40:24 -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 62964afcec [HB] Implement get_lig_carets() 2009-11-02 14:40:19 -05:00
Behdad Esfahbod 79420ad9ca [HB] Add get_attach_points() 2009-11-02 14:40:19 -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
Behdad Esfahbod b857b49c82 [HB] Remove all references to the old code! 2009-11-02 14:40:15 -05:00
Behdad Esfahbod e1593a6e62 [GPOS] Finally it's working, up to Cursive
Wow, IranNastaliq renders perfectly again!
2009-11-02 14:40:15 -05:00
Behdad Esfahbod 0f7e6b2cea [GPOS] Fix more brokenness 2009-11-02 14:40:15 -05:00
Behdad Esfahbod 9c42f05a5c Switch Pango to new, defunt, GPOS 2009-11-02 14:40:13 -05:00
Behdad Esfahbod 5e5eb0573f [HB] Start GPOS! 2009-11-02 14:40:13 -05:00
Behdad Esfahbod a84e71ad11 [GSUB] Start Ligature subtable support 2009-11-02 14:40:07 -05:00
Behdad Esfahbod 5a0b791184 [harfbuzz/GSUB] towards a partially working GSUB 2009-11-02 14:40:06 -05:00
Behdad Esfahbod 30bd763fa2 Implement the first substitute() 2009-11-02 14:40:06 -05:00
Behdad Esfahbod 2d15e72c75 Give it a start at GSUB 2009-04-15 19:50:16 -04:00
Behdad Esfahbod c44733596c [hb-ot-layout] Add proper namespace to accessors 2008-02-18 21:33:22 -05:00
Behdad Esfahbod 4a26ea408c Finish script, language, and feature public API 2008-01-29 17:42:11 -05:00
Behdad Esfahbod 706ab25a4c Add script and language public getter API 2008-01-28 05:58:50 -05:00
Behdad Esfahbod e50c3978d3 Rename HB_OT_Layout to hb_ot_layout_t 2008-01-28 00:16:49 -05:00
Behdad Esfahbod dfa8119651 Rename hb_ot_layout_create() to hb_ot_layout_create_for_data() 2008-01-28 00:12:21 -05:00
Behdad Esfahbod 6f425b1179 [GDEF] Finish internal API 2008-01-24 19:39:49 -05:00
Behdad Esfahbod 590d55cbb9 [GDEF] Finish public API 2008-01-24 19:15:35 -05:00
Behdad Esfahbod aff831ed67 Implement glyph properties 2008-01-24 06:03:45 -05:00
Behdad Esfahbod ead428d7a0 More public api 2008-01-24 04:09:46 -05:00
Behdad Esfahbod fd92a3dde3 Starting public interface 2008-01-24 03:36:11 -05:00
Behdad Esfahbod 64aef3a549 Add copyright notices. 2008-01-23 16:14:38 -05:00
Behdad Esfahbod 8dd1c8b8d6 Clean up file names, add namespace 2008-01-23 05:02:14 -05:00