Commit Graph

370 Commits

Author SHA1 Message Date
Behdad Esfahbod 5cf6f94dfd Don't apply both kerx and kern
Ouch!
2018-11-07 16:07:22 -05:00
Behdad Esfahbod 41cff7afc9 Minor 2018-11-07 16:05:36 -05:00
Behdad Esfahbod 649cc3ef27 [kerx] Don't disable crossKerning if kern feature is off 2018-11-07 14:07:13 -05:00
Behdad Esfahbod 0c3b061ac2 [kern] Apply erlier, where GPOS/kerx are applied 2018-11-07 13:58:41 -05:00
Behdad Esfahbod 914b595f25 [ot-face] Include hb-ot-face directly in hb_face_t
Simplifying access coming next.
2018-11-05 23:10:12 -05:00
Behdad Esfahbod 17335a8161 Clean up buffer->swap_buffers() calls
That function checks for buffer->successful already.  No need
to check at call site.
2018-11-04 02:25:07 -05:00
Behdad Esfahbod 095f5add0b [kern] Push apply loop to each subtable 2018-11-02 13:23:54 -04:00
Behdad Esfahbod 80d9a427cf [docs] Document remaining sections 2018-10-27 04:58:32 -07:00
Behdad Esfahbod 39bd07aed5 Fix bunch of unused parameter warnings
Show up with gcc -O0.

There's a few more but those are functions that need to be filled in.

Maybe this is a lost battle...
2018-10-26 21:22:26 -07:00
Behdad Esfahbod f33ad6d692 [aat] Fix up previous commit and add files 2018-10-23 14:31:51 -07:00
Behdad Esfahbod ffe3478448 [aat] Allow enabling/disabling features
Only works at entire-buffer range, not sub-ranges.

Test with:

$ hb-shape Zapfino.dfont Zapfino
[Z_a_p_f_i_n_o=0+2333]

$ hb-shape Zapfino.dfont Zapfino --features=-dlig
[Z=0+416|a=1@-21,0+264|p_f=2+433|i=4+181|n=5+261|o=6+250]

$ hb-shape Zapfino.dfont Zapfino --features=+dlig
[Z_a_p_f_i_n_o=0+2333]

Fixes https://github.com/harfbuzz/harfbuzz/issues/1303
2018-10-23 14:14:03 -07:00
Behdad Esfahbod 76324d95ca Shift code around 2018-10-23 13:09:30 -07:00
Behdad Esfahbod cf92d6579e [trak] Allow disabling tracking for ranges of text
Fixes https://github.com/harfbuzz/harfbuzz/issues/1303
2018-10-23 03:10:56 -07:00
Ebrahim Byagowi 22ecefd88e Make tracking optout possible using 'trak' ot feature
So '--features=-trak' or 'font-feature-settings: 'trak' 0;' can prevent
applying of tracking if used.
2018-10-23 02:57:55 -07:00
Behdad Esfahbod 0b9d60e1a1 [aat] Apply kerx if GPOS kern was not applied
Ned tells me this is what Apple does.
2018-10-11 13:26:58 -04:00
Behdad Esfahbod b59a428af0 Minor 2018-10-11 13:24:17 -04:00
Behdad Esfahbod d6a12dba6d [trak] Fix, and hook up
Works beautifully!  Test coming.
2018-10-11 11:10:06 -04:00
Behdad Esfahbod 34caadc5c7 Ugh. Re-enable accidentally disabled GPOS 2018-10-10 22:17:07 -04:00
Behdad Esfahbod 504cb68fc9 Disable mark advance zeroing as well as mark fallback positioning if doing kerx 2018-10-10 21:29:46 -04:00
Behdad Esfahbod 60f86d32d7 [kerx] Don't loop over kerning subtables if kerning disabled 2018-10-10 18:10:05 -04:00
Behdad Esfahbod 38a7a8a89e Allow HB_OPTIONS=aat to prefer AAT tables over OT
Fixes https://github.com/harfbuzz/harfbuzz/issues/322
2018-10-10 17:44:46 -04:00
Behdad Esfahbod 7727e73756 [kerx] Actually hook up, and fix crash 2018-10-10 13:24:51 -04:00
Behdad Esfahbod a03850a356 Fix GPOS/kern interaction
Oops.  Was checking for kern feature in GSUB, not GPOS.
2018-10-10 10:57:28 -04:00
Behdad Esfahbod d1be805e78 More rewriting plan compile
Hopefully more clear.
2018-10-10 10:49:45 -04:00
Behdad Esfahbod 961ab46b24 More reshuffle plan compile 2018-10-10 10:42:10 -04:00
Behdad Esfahbod 2091b509e3 [kerx] Hook up to shaper 2018-10-10 10:41:08 -04:00
Behdad Esfahbod e655fd38cf Apply TT or fallback kerning when GPOS does not have kern feature
Previously we only did if there was no GPOS whatsoever.  This applies
to Arial, Times New Roman, etc in Win7.  Was not kerning before.  It
is now.
2018-10-10 10:19:07 -04:00
Behdad Esfahbod 53e5594500 [kerx] Implement Format0 apply()
Not hooked up to be called yet.
2018-10-09 22:35:22 -04:00
Behdad Esfahbod a51958819f Apply TrueType/OpenType kern table when GPOS kern feature is not available
Fixes https://github.com/harfbuzz/harfbuzz/issues/250
2018-10-08 23:57:45 -04:00
Behdad Esfahbod 09ad2613c8 Separate fallback kern vs mark positioning 2018-10-08 23:30:24 -04:00
Behdad Esfahbod c0d3bf1baf Minor 2018-10-08 16:32:44 -04:00
Behdad Esfahbod 94368855c6 Remove some code
We use scratch-flags to short-circuit this function.  No need for previous
early loop.
2018-10-07 18:52:48 -04:00
Behdad Esfahbod 71b65eb27d Add API for setting invisible-codepoint
Fixes https://github.com/harfbuzz/harfbuzz/issues/1216

New API:
hb_buffer_set_invisible_codepoint()
hb_buffer_get_invisible_codepoint()

hb-shape / hb-view --invisible-codepoint
2018-10-07 18:43:26 +02:00
Behdad Esfahbod a62f37d6fa Change vendor features from Harf/Buzz to HARF/BUZZ
a01194aaf4 (commitcomment-30772041)

"The tag space of tags consisting of four uppercase letters (A-Z) with no punctuation,
spaces, or numbers, is reserved as a vendor space. Font vendors may use such tags to
identify private features."
2018-10-05 02:49:29 +02:00
Behdad Esfahbod a01194aaf4 Enable two OpenType features, 'Harf' and 'Buzz'
One early, before script-specific features, one late, after.  Allows font
developers to detect us and behave differently if needed.
2018-10-04 13:00:37 +02:00
Behdad Esfahbod 14ff3cbe0f Apply morx if there's no GSUB! 2018-10-04 11:34:21 +02:00
Behdad Esfahbod b710ea4fde Clean Fitzpatrick hack 2018-10-03 21:17:59 +02:00
Behdad Esfahbod 03fb6dd4c7 Rewrite grapheme-formation in terms of new work
Also, don't attach ZWNJ to previous cluster.  Closer to Unicode graphemes.
2018-10-03 21:11:40 +02:00
Behdad Esfahbod 3b78318510 [emoji] Mark emoji contination sequences as continuation
This adds a new grapheme bit.  Not used yet.

Part of https://github.com/harfbuzz/harfbuzz/issues/1159
2018-10-03 20:19:42 +02:00
Behdad Esfahbod 123326e20a Dotted-circle all marks, not just non-spacing, at text beginning 2018-10-03 20:19:42 +02:00
Behdad Esfahbod 0a371fee4d Minor 2018-10-02 14:48:39 +02:00
Behdad Esfahbod 94d15528f8 Minor 2018-10-02 14:45:09 +02:00
Behdad Esfahbod 729f634728 Disable joiner-skipping when looking back for base to attach mark to
Fixes https://github.com/harfbuzz/harfbuzz/issues/1189
2018-10-02 14:41:31 +02:00
Behdad Esfahbod 48c513fec9 Minor 2018-10-02 14:19:34 +02:00
Behdad Esfahbod cca757ae56 Minor 2018-10-02 14:10:26 +02:00
Behdad Esfahbod 96eca87f89 Move things 2018-10-02 13:24:40 +02:00
Behdad Esfahbod 10b6c7c638 Minor include cleanup 2018-10-02 13:11:18 +02:00
Behdad Esfahbod 1d1734e985 Shuffle code around 2018-10-02 13:04:05 +02:00
Behdad Esfahbod d9867497d0 Minor 2018-09-24 18:11:59 -04:00
Behdad Esfahbod f048ead84a Some more 2018-09-24 18:04:17 -04:00