Commit Graph

3729 Commits

Author SHA1 Message Date
mhosken 74b99ef224 Fix graphite2 rtl conversion (#475) 2017-04-20 11:13:22 -07:00
Chris Peterson aacca37590 Fix clang -Wcomma warnings (#471) (#472)
clang's new -Wcomma compiler option warns about possible misuse of the
comma operator such as between two statements.

hb-common.cc:190:9 [-Wcomma] possible misuse of comma operator here
hb-ot-layout-gsubgpos-private.hh:345:30 [-Wcomma] possible misuse of
comma operator here
hb-shape-plan.cc:438:26 [-Wcomma] possible misuse of comma operator here
2017-04-17 23:25:24 -07:00
William Hua 5ecf96e3a2 Use absolute paths of ragel generated headers (#467)
https://github.com/behdad/harfbuzz/issues/455
2017-04-16 22:33:42 -07:00
jfkthame c04c1fe86e Blacklist GDEF table in additional Tahoma versions. (#459)
There are more broken versions of Tahoma out there on various Windows releases,
so we need to add them to our blacklist to avoid broken rendering.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1279925 for details.
2017-04-11 14:29:13 -07:00
ebraminio adfd4ae1cf [cmake] Improve third party libraries support (#461) 2017-04-11 23:18:18 +04:30
Behdad Esfahbod a4471d0c2c Move list of ragel sources to Makefile.sources as well 2017-04-05 15:42:11 +02:00
ebraminio d2acaf6d72 Split ragel generated files lists and remove hardcoded rl files lists (#453) 2017-04-05 11:21:23 +02:00
jfkthame 740fdbcd0e avoid UBSan warning in get_stage_lookups (#450)
See https://bugzilla.mozilla.org/show_bug.cgi?id=1336600
2017-04-03 13:22:39 +02:00
Behdad Esfahbod edcf6344bc Blacklist more versions of Padauk
Patch from Phil Race.
2017-03-24 10:24:52 -07:00
Khaled Hosny 91570a1eeb Just always use strtod here 2017-03-22 23:07:20 +02:00
Chun-wei Fan 539571c1a9 src/hb-common.cc: Fix build on older Visual Studio
Visual Studio only supported strtof() from Visual Studio 2013 onwards, so
use strtod() instead to do the operation, which should do the same thing,
sans going to a double, not a float.
2017-03-22 23:03:49 +02:00
Behdad Esfahbod 47e7a1800f Revert "Fix Context lookup application when moving back after a glyph delete"
This reverts commit b9b005f3a4.

This introduced invalid access cases. Revert until I fix correctly.
2017-03-10 13:23:02 -08:00
Behdad Esfahbod 3c080a7a0a Fix buffer serialize of empty buffer
Ouch!
2017-03-07 18:13:28 -08:00
Behdad Esfahbod 9ac9af725c Add TODO item 2017-03-05 13:51:01 -08:00
Behdad Esfahbod 5aec2fb8d0 Remove TODO item that is not going to happen 2017-03-02 11:46:33 -08:00
Behdad Esfahbod b9b005f3a4 Fix Context lookup application when moving back after a glyph delete
This was broken forever, since days that we did not allow moving
tape backwards. Works now. Reported by Doug Felt.
2017-03-01 14:27:23 -08:00
Behdad Esfahbod 85630996b8 Fix buffer-overrun with Bengali reph positioning code
This has no security implications whatsoever since we always keep
and extra element at the end of buffer, just in case.

Discovered by oss-fuzz
CC https://github.com/behdad/harfbuzz/issues/139
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=660
2017-02-25 13:32:20 -08:00
Dominik Röttsches a657f23ca3 Blacklist another instance of Padauk (#419)
In https://crbug.com/681813 another instance of Padauk was identified
triggering collapsed glyphs. Blacklist this version by patching
hb-ot-layout.cc to print out gdef, gsub, and gpos table length, then
adding those to the list of blacklisted versions.
2017-02-20 13:52:07 -06:00
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