Commit Graph

6865 Commits

Author SHA1 Message Date
Michiharu Ariza
b5aa5dbb11 Merge branch 'master' into cff-subset 2018-10-10 18:36:35 -07:00
Michiharu Ariza
af61c3b10f added vsindex test & fixed process_vsindex 2018-10-10 18:35:12 -07:00
Behdad Esfahbod
ab1f30bd05 [kerx] Implement Format6
Untested.  The only Apple font shipping with this format is San Francisco fonts
that use this for their kerx variation tables, which we don't support.
2018-10-10 20:10:20 -04:00
Behdad Esfahbod
c9a2ce9e05 [kerx] Move bounds-checking to subtable length itself 2018-10-10 20:00:44 -04:00
Behdad Esfahbod
22955b23cd [kerx] Start fleshing out Format6 2018-10-10 19:58:20 -04:00
Behdad Esfahbod
f6aaad9b4f [kerx] When rejecting variable kerning, also check for tupleCount 2018-10-10 19:20:06 -04:00
Behdad Esfahbod
7ed5366d3c [kerx] No-op
Tested that Format0 works with Kannada MN font:

$ make -j5 lib -s && HB_OPTIONS=aat ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2
[kn_ka=0+1000|kn_matra_uu=0@-30,0+1345]

$ make -j5 lib -s && HB_OPTIONS=aat ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2 --features=-kern
[kn_ka=0+1030|kn_matra_uu=0+1375]

Note that GPOS does the same with 'dist' feature, and applies the whole difference to the
same glyph:

$ make -j5 lib -s && ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2
[kn_ka=0+970|kn_matra_uu=0+1375]

$ make -j5 lib -s && ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2 --features=-dist
[kn_ka=0+1030|kn_matra_uu=0+1375]
2018-10-10 19:12:27 -04:00
Behdad Esfahbod
7fa69e92ca Comment 2018-10-10 19:02:32 -04:00
Behdad Esfahbod
7e6e5bf614 Fix option string matching 2018-10-10 18:59:07 -04:00
Behdad Esfahbod
5d34164d98 [kern/kerx] Fix offset base
Disable kern Format2.

Fix kerx Format2.  Manually tested this with Tamil MN font and it works:

$ HB_OPTIONS=aat ./hb-shape Tamil\ MN.ttc -u 0B94,0B95
[tgv_au=0+3435|tgc_ka=1@-75,0+1517]

 HB_OPTIONS=aat ./hb-shape Tamil\ MN.ttc -u 0B94,0B95 --features=-kern
[tgv_au=0+3510|tgc_ka=1+1592]
2018-10-10 18:23:09 -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
44f09afd5b [kerx] Skip variation subtables 2018-10-10 17:32:32 -04:00
Behdad Esfahbod
1e8fdd285f Remove HAVE_OT
We never tested compiling without it.  Just kill it.  We always build
our own shaper.
2018-10-10 16:32:35 -04:00
Behdad Esfahbod
7727e73756 [kerx] Actually hook up, and fix crash 2018-10-10 13:24:51 -04:00
Behdad Esfahbod
b3390990f5 Add per-subtable set-digests
This speeds up Roboto shaping by ~10%.  I was hoping for more.
Still, good defense against lookups with many subtables.
2018-10-10 12:13:25 -04:00
Behdad Esfahbod
e78549edfb Move apply down into subtables accel 2018-10-10 11:54:48 -04:00
Behdad Esfahbod
78c09bf213 Move subtable array into lookup accel 2018-10-10 11:50:46 -04:00
Behdad Esfahbod
97e5913d5a Move more code 2018-10-10 11:41:05 -04:00
Behdad Esfahbod
c8f2d9334c Move code
In preparation to move add per-subtable set digests...
2018-10-10 11:36:28 -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
8d00c39bfc [kern] Minor 2018-10-10 10:19:07 -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
754cf440bf Minor 2018-10-10 10:19:07 -04:00
Ebrahim Byagowi
187df7d7a9
[circleci] Add an iOS bot (#1233) 2018-10-10 17:12:52 +03:30
Michiharu Ariza
c06a5dff0b Merge branch 'master' into cff-subset 2018-10-09 22:00:10 -07:00
Michiharu Ariza
83c5298f33 added cff1_legacyops.otf as test-ot-extents-cff test case
fixed roll operator bugs uncovered by the test
2018-10-09 21:59:36 -07:00
Behdad Esfahbod
0537a40193 [kerx] Comment 2018-10-09 23:37:00 -04:00
Behdad Esfahbod
362d324119 [aat] Rename 2018-10-09 23:27:00 -04:00
Behdad Esfahbod
54c9ecb92d [morx] Use subtable range for embedded sanitizer here as well 2018-10-09 23:18:19 -04:00
Behdad Esfahbod
d35315cc02 [aat] Fixup recent commit
For 329f240108

max_ops is signed.
2018-10-09 23:17:32 -04:00
Behdad Esfahbod
948f59a13a [kerx] Use subtable range for runtime checks 2018-10-09 23:07:47 -04:00
Behdad Esfahbod
329f240108 [aat] Set embedded sanitizer max ops really high
Since we consume it legitimately during shaping.
2018-10-09 23:03:20 -04:00
Behdad Esfahbod
ad76307486 [kerx] Comment 2018-10-09 22:57:00 -04:00
Behdad Esfahbod
db9600bbe1 [kerx] Remove junk 2018-10-09 22:55:47 -04:00
Behdad Esfahbod
27db859416 [kern/kerx] Adjust bounds check 2018-10-09 22:55:17 -04:00
Behdad Esfahbod
c66f7f8c5d [kerx] Implement Format2 apply()
Still, not hooked.
2018-10-09 22:49:33 -04:00
Behdad Esfahbod
4b461785bd Fix check 2018-10-09 22:46:30 -04:00
Behdad Esfahbod
4df8eb200d [kern] Use kern subtable length for sanitizing in the accelerator 2018-10-09 22:46:12 -04:00
Behdad Esfahbod
8bff1d2994 [kern] Minor 2018-10-09 22:39:31 -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
60318f8715 Minor 2018-10-09 22:25:53 -04:00
Behdad Esfahbod
210f899aca [kern] Sanitize 4 bytes, not 2 2018-10-09 21:58:04 -04:00
Michiharu Ariza
588518ea51 fixed test-ot-extents-cff failure on some platforms 2018-10-09 14:48:04 -07:00
Behdad Esfahbod
be2f148da4 [ft] Use mutex to lock access to FT_Face
Makes our FT-backed hb_font_t safe to use from multiple threads.  Still,
the underlying FT_Face should NOT be used from other threads by client
or other libraries.

Maybe I add a lock()/unlock() public API ala PangoFT2 and cairo-ft.
Maybe not.
2018-10-09 16:24:50 -04:00
Behdad Esfahbod
d18c3c5861 [ft] Remove (probably) stale comment 2018-10-09 16:09:53 -04:00
Behdad Esfahbod
7003b601af Minor 2018-10-09 15:55:26 -04:00