Commit Graph

3711 Commits

Author SHA1 Message Date
jfkthame 44f7d6ecde Guard against underflow when adjusting length (#421)
* Guard against underflow when adjusting length

With the fuzz-testcase in mozilla bug 1295299, we end up with a recursed lookup that removes 3 items, when `match_positions[idx]` is 0, which results in (unsigned) `end` wrapping to a huge value.

Making `end` a signed int is probably the simplest route to a fix.

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1295299.

* Add testcase for #421.
2017-02-16 19:03:24 -08:00
jfkthame 45766b673f [indic] Add support for Grantha marks that may be used in Tamil to th… (#401)
* [indic] Add support for Grantha marks that may be used in Tamil to the Indic table.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1331339.

Testcase: U+0BA4,U+0BC6,U+1133c,U+0BAA,U+1133c,U+0BC6,U+1133c

* [indic] Add test for Grantha nukta that is allowed in Tamil by ScriptExtensions.txt
2017-02-16 09:40:21 -08:00
Behdad Esfahbod d4bb52b9fd Unbreak hb-coretext build 2017-02-09 14:13:25 -08:00
Behdad Esfahbod c8dfed8e1e Merge pull request #357 from khaledhosny/graphite-scale
[graphite] Fix shaping with varying font sizes
2017-02-08 14:36:18 -08:00
Behdad Esfahbod 7c47474f20 Set LC_ALL instead of LANG when creating harfbuzz.def
Hopefully fixes Travis faliure?
https://github.com/behdad/harfbuzz/pull/413#issuecomment-278481882
https://travis-ci.org/khaledhosny/harfbuzz/jobs/199785332#L1065
2017-02-08 14:33:28 -08:00
Philip Withnall ffde3c9f9e hb-font: Fix a potentially undefined use of memcmp() (#413)
While it’s fine to call memcmp(x, 0, 0) in practice, the C99 standard
explicitly says that this is not allowed: even if the length is zero,
the pointer arguments must be valid.

http://stackoverflow.com/a/16363034

Coverity ID: 141178

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-02-08 13:56:57 -08:00
Behdad Esfahbod 73c6dcbb45 Silence Coverity warning
Fixes https://github.com/behdad/harfbuzz/issues/408
2017-02-07 16:53:21 -08:00
Behdad Esfahbod 466b3e58bd Shuffle things around a bit 2017-02-03 16:57:15 -08:00
Behdad Esfahbod fc8189b639 Minor 2017-02-03 16:17:08 -08:00
Behdad Esfahbod d3d3691806 Add dirty-state tracking to hb_face_t 2017-02-03 15:42:03 -08:00
Behdad Esfahbod 2171f48b4b Add dirty-state tracking to hb_font_t 2017-02-03 10:58:09 -08:00
Behdad Esfahbod 95808bad2c Add new API hb_font_set_face()
For completeness.
2017-02-03 10:39:40 -08:00
jfkthame 4ec19319ab Add Win10 Anniversary Update version of Tahoma to GDEF blacklist. (#412) 2017-02-02 10:48:23 -08:00
Behdad Esfahbod 1dd630a7f2 Minor
Fixes https://github.com/behdad/harfbuzz/issues/411
2017-02-01 11:57:21 -08:00
Behdad Esfahbod e888f642db Route Adlam through Arabic shaper
Fixes joined Adlam rendering.

Fixes https://github.com/googlei18n/noto-fonts/issues/828
2017-01-26 14:50:14 -08:00
jfkthame 72c754873c Add Win7 version of himalaya.ttf to the GDEF table blacklist. (#407) 2017-01-26 14:35:41 -08:00
Behdad Esfahbod 22af28a3f1 [var] Implement MVAR table
Unhooked. Untested.
2017-01-23 23:42:53 -08:00
Behdad Esfahbod 67a191164d [var] Whitespace 2017-01-23 23:21:30 -08:00
Behdad Esfahbod 79e8e27ffd [var] Hook up advance variations to hb-ot-font
Yay, works!
2017-01-23 17:57:27 -08:00
Behdad Esfahbod 6074340371 [var] Fix bug in HVAR/VVAR impl 2017-01-23 17:55:16 -08:00
Behdad Esfahbod bd3b11d926 [var] Prepare for hooking up advance variations to hb-ot-font 2017-01-23 17:37:19 -08:00
Behdad Esfahbod a4fca9f005 [var] Implement DeltaSetIndexMap and advance delta fetching
Not hooked up to hb-ot-font yet.
2017-01-23 12:25:40 -08:00
Behdad Esfahbod 7b399f73ef [var] Start adding HVAR/VVAR 2017-01-23 11:41:43 -08:00
Behdad Esfahbod b732c53eb5 Add LArrayOf<> 2017-01-22 20:31:53 -08:00
Behdad Esfahbod 5e156fa5ed Add LOffsetTo<> 2017-01-22 20:28:56 -08:00
Behdad Esfahbod d6bdbbca30 [var] Remove HB_OT_TAG_fvar/avar
We're not going to define public macros for tags for tables.
There's little use to those and they are implementation detail.
2017-01-22 20:16:51 -08:00
Behdad Esfahbod a11d9a0466 Minor 2017-01-22 20:11:57 -08:00
Behdad Esfahbod 7a860f656e [var] Add macros for standard axes 2017-01-22 19:52:09 -08:00
Behdad Esfahbod a484e237b1 [var] Implement 'avar' table mapping
Untested!
2017-01-22 19:41:33 -08:00
Behdad Esfahbod 5ec96d30ca [var] Adjust API in prep for 'avar' implementation
The 'avar' table does not allow random access to axis maps,
so change API to avoid quadratic-time implementation.

Removed -hb_ot_var_normalize_axis_value(), added
+hb_ot_var_normalize_variations() and
+hb_ot_var_normalize_coords() instead.
2017-01-22 18:52:00 -08:00
Behdad Esfahbod 8a577aaa0d [var] Stub implementation of avar table 2017-01-22 18:22:40 -08:00
Behdad Esfahbod 7647a05a0b Minor 2017-01-22 17:47:49 -08:00
Behdad Esfahbod d2f249e745 Stub out doc comments for new symbols 2017-01-22 17:42:33 -08:00
Behdad Esfahbod 5dfd341f51 Minor 2017-01-22 16:55:40 -08:00
Behdad Esfahbod 825e40407d [hb-ft] Remove use of variable-length array
Hopefully also fixes build failure on msvc.
2017-01-22 16:41:45 -08:00
Behdad Esfahbod 47ee34e847 [var] Hook up variations to FreeType face
hb-view correctly renders variations with ft font-funcs now.
hb-ot-font needs HVAR implementation.
2017-01-21 18:10:08 -08:00
Behdad Esfahbod bb1e19268f [var] Rename var_coord to variation
Looks much better.
2017-01-21 17:42:50 -08:00
Behdad Esfahbod 64fe92bf2d [var] Remove use of variable-length arrays 2017-01-21 15:36:35 -08:00
Behdad Esfahbod 2491134b38 [var] Add hb_font_set_var_coords() 2017-01-21 15:21:50 -08:00
Behdad Esfahbod 113393efec Remove a few unused includes 2017-01-21 15:12:03 -08:00
Behdad Esfahbod 2d40923ca9 Minor 2017-01-21 15:06:15 -08:00
Behdad Esfahbod 8b2a580470 [var] Add hb_font_set_var_coords_design() 2017-01-21 15:05:00 -08:00
Behdad Esfahbod 0dcc7b49a8 [var] Minor lifecycle adjustment 2017-01-21 14:50:22 -08:00
Behdad Esfahbod bf0d3a665b [var] Add hb_font_get_var_coords_normalized() 2017-01-21 14:48:46 -08:00
Behdad Esfahbod b3c0714b4b [var] Add hb_var_coord_t and parsing routines 2017-01-20 20:30:03 -08:00
Behdad Esfahbod 72364103bc Move code around 2017-01-20 20:16:53 -08:00
Behdad Esfahbod 785982bf83 [var] Flesh out some more 2017-01-20 20:05:45 -08:00
Behdad Esfahbod 422c0c36c8 [var] Flesh out a bit 2017-01-20 19:14:54 -08:00
Behdad Esfahbod b8376b1090 Minor 2017-01-20 18:19:28 -08:00
Behdad Esfahbod f2e73d37e7 [var] Remove over-optimization 2017-01-20 17:42:18 -08:00