Ebrahim Byagowi [Thu, 18 Oct 2018 04:08:47 +0000 (07:38 +0330)]
[util] Better file-not-found error from hb-shape / hb-view
fixes #1266
Ebrahim Byagowi [Thu, 18 Oct 2018 03:06:48 +0000 (06:36 +0330)]
[fuzz] Add more new testcases
Ebrahim Byagowi [Thu, 18 Oct 2018 03:03:39 +0000 (06:33 +0330)]
[fuzz] Add a new testcase
Behdad Esfahbod [Thu, 18 Oct 2018 00:55:47 +0000 (17:55 -0700)]
[trak] Fix calc
We were getting the first track record always. Ie. this line:
if (trackTable[i].get_track_value () == 0.f)
{
- trackTableEntry = &trackTable[0];
+ trackTableEntry = &trackTable[i];
break;
}
The rest is cleanup.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1263 for the most part.
Behdad Esfahbod [Wed, 17 Oct 2018 22:04:35 +0000 (15:04 -0700)]
[fuzzing] Move fuzzing fonts from api/ here
Behdad Esfahbod [Wed, 17 Oct 2018 01:35:03 +0000 (18:35 -0700)]
[buffer] Add an assert
See if it helps debugging https://bugs.chromium.org/p/chromium/issues/detail?id=895117
Behdad Esfahbod [Wed, 17 Oct 2018 01:28:55 +0000 (18:28 -0700)]
[fuzzing] Delete blink fuzzed data
These are text, not font.
Behdad Esfahbod [Wed, 17 Oct 2018 01:22:54 +0000 (18:22 -0700)]
[aat] Comment
HinTak [Tue, 16 Oct 2018 23:54:39 +0000 (00:54 +0100)]
"allow-none" annotation for "out" parameters
Fixes the following warnings:
hb-ot-tag.cc:330: Warning: HarfBuzz: invalid "allow-none" annotation: only valid for pointer types and out parameters
hb-ot-tag.cc:334: Warning: HarfBuzz: invalid "allow-none" annotation: only valid for pointer types and out parameters
Behdad Esfahbod [Wed, 17 Oct 2018 00:35:46 +0000 (17:35 -0700)]
Fix indent
HinTak [Tue, 16 Oct 2018 23:36:04 +0000 (00:36 +0100)]
typo in gobject annotation - "in/out" should be "inout"
"in/out" should be "inout"
Behdad Esfahbod [Tue, 16 Oct 2018 23:39:29 +0000 (16:39 -0700)]
[fuzzing] Run tests against fuzzing fonts
Some disable.
Behdad Esfahbod [Tue, 16 Oct 2018 23:33:06 +0000 (16:33 -0700)]
[fuzzing] Rename
Behdad Esfahbod [Tue, 16 Oct 2018 23:32:26 +0000 (16:32 -0700)]
[fuzzing] Move rest of fuzzing tests here
Behdad Esfahbod [Tue, 16 Oct 2018 23:30:38 +0000 (16:30 -0700)]
[fuzzing] Delete duplicate fonts
Behdad Esfahbod [Tue, 16 Oct 2018 23:25:24 +0000 (16:25 -0700)]
Minor
Behdad Esfahbod [Tue, 16 Oct 2018 23:24:03 +0000 (16:24 -0700)]
[gpos] Protect mark attachment against out-of-bounds
Not sure how can happen, but does...
Behdad Esfahbod [Tue, 16 Oct 2018 23:18:32 +0000 (16:18 -0700)]
[fuzzing] Add more tests
Behdad Esfahbod [Tue, 16 Oct 2018 23:13:53 +0000 (16:13 -0700)]
[aat] Another non-null offset
Behdad Esfahbod [Tue, 16 Oct 2018 22:40:44 +0000 (15:40 -0700)]
[aat] Make sure Lookup offset is never nulled
It has unbounded size...
Fixes https://oss-fuzz.com/v2/testcase-detail/
5718889451749376
Behdad Esfahbod [Tue, 16 Oct 2018 22:26:51 +0000 (15:26 -0700)]
Fix tests
Behdad Esfahbod [Tue, 16 Oct 2018 22:17:31 +0000 (15:17 -0700)]
[fuzzing] One more
Behdad Esfahbod [Tue, 16 Oct 2018 22:16:20 +0000 (15:16 -0700)]
[fuzzing] Add more clusterfuzz tests I had lying around
Ebrahim Byagowi [Tue, 16 Oct 2018 22:12:04 +0000 (01:42 +0330)]
Add all the fonts found by fuzzers to the repo (#1258)
Behdad Esfahbod [Tue, 16 Oct 2018 21:46:07 +0000 (14:46 -0700)]
[morx] Reword ligation
Still fails MORX-41. Am talking to Sascha to better understand what CoreText
is doing.
Behdad Esfahbod [Tue, 16 Oct 2018 20:57:35 +0000 (13:57 -0700)]
[morx] Comment
Behdad Esfahbod [Tue, 16 Oct 2018 20:39:54 +0000 (13:39 -0700)]
[test/text-rendering-tests] Update from upstream
Behdad Esfahbod [Tue, 16 Oct 2018 20:32:52 +0000 (13:32 -0700)]
Revert "[vector] Simplify Sort" and "More of the same"
This reverts commit
de0b9a466490c2c13d6ec6f59d5122b0a87d3180.
This reverts commit
921f0e6ec722940a1e37660e1291aa69f9f39db8.
Annnnd, revert. MSVC doesn't like it.
Behdad Esfahbod [Tue, 16 Oct 2018 20:24:29 +0000 (13:24 -0700)]
[kern] Scale kern pairs before applying
Fixes https://github.com/harfbuzz/harfbuzz/issues/1255
Fixes https://github.com/harfbuzz/harfbuzz/issues/1252
Behdad Esfahbod [Tue, 16 Oct 2018 05:20:26 +0000 (22:20 -0700)]
[vector] More of the same
Behdad Esfahbod [Tue, 16 Oct 2018 05:19:17 +0000 (22:19 -0700)]
[vector] Simplify sort
Hopefully this fits fine with SFINAE with all our compilers.
Ebrahim Byagowi [Tue, 16 Oct 2018 10:47:21 +0000 (14:17 +0330)]
[test] Minor cleanup in test-multithread and test-ot-name (#1256)
Ebrahim Byagowi [Tue, 16 Oct 2018 07:28:09 +0000 (10:58 +0330)]
[kerx] Minor, remove debug bit
Behdad Esfahbod [Tue, 16 Oct 2018 04:16:58 +0000 (21:16 -0700)]
[kerx] Fix Format6 sanitize
Fixes https://oss-fuzz.com/v2/testcase-detail/
5650286710882304
Behdad Esfahbod [Tue, 16 Oct 2018 02:46:45 +0000 (19:46 -0700)]
[CBDT] Fix more offsetting
Fixes https://oss-fuzz.com/v2/testcase-detail/
5750379279548416
Behdad Esfahbod [Mon, 15 Oct 2018 18:15:54 +0000 (11:15 -0700)]
[morx] Another end-of-text corner case
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10990
Behdad Esfahbod [Mon, 15 Oct 2018 18:04:49 +0000 (11:04 -0700)]
[kerx] Merge clusters in Ligature
Behdad Esfahbod [Mon, 15 Oct 2018 17:20:39 +0000 (10:20 -0700)]
[kerx/morx] More end-of-text protection
Ebrahim Byagowi [Mon, 15 Oct 2018 08:46:47 +0000 (12:16 +0330)]
[dump-emoji] minor
Ebrahim Byagowi [Mon, 15 Oct 2018 08:34:14 +0000 (12:04 +0330)]
[dump-emoji] better explaination of the usage
Behdad Esfahbod [Mon, 15 Oct 2018 08:09:05 +0000 (01:09 -0700)]
[ot-font] Implement TrueType v_origin
Fixes https://github.com/harfbuzz/harfbuzz/issues/537
Behdad Esfahbod [Mon, 15 Oct 2018 05:22:45 +0000 (22:22 -0700)]
[blob] Fix UBSan error
Behdad Esfahbod [Mon, 15 Oct 2018 04:32:09 +0000 (21:32 -0700)]
[CBDT] Fix more offsetting issues
Fixes https://github.com/harfbuzz/harfbuzz/issues/960
dump-emoji still segfaults. Needs debugging.
Behdad Esfahbod [Mon, 15 Oct 2018 04:08:42 +0000 (21:08 -0700)]
[CBDT] Fix offset handling
Fixes https://github.com/harfbuzz/harfbuzz/issues/960
Behdad Esfahbod [Mon, 15 Oct 2018 03:49:21 +0000 (20:49 -0700)]
[CBDT] More UnsizedArrayOf cleanup
Behdad Esfahbod [Mon, 15 Oct 2018 03:37:57 +0000 (20:37 -0700)]
[CBDT] Simplify sanitize
Behdad Esfahbod [Mon, 15 Oct 2018 02:39:31 +0000 (19:39 -0700)]
[morx] Handle end-of-text conditions in Insertion
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10955
Behdad Esfahbod [Mon, 15 Oct 2018 02:36:46 +0000 (19:36 -0700)]
[buffer] Fix output_glyph at end of buffer
Part of https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10955
Behdad Esfahbod [Mon, 15 Oct 2018 02:30:44 +0000 (19:30 -0700)]
[aat] More protection against buffer fail
Behdad Esfahbod [Sun, 14 Oct 2018 23:26:03 +0000 (16:26 -0700)]
[hmtx] Whitespace
Behdad Esfahbod [Sun, 14 Oct 2018 22:20:50 +0000 (15:20 -0700)]
Ignore signed-integer-overflow while kerning
Fixes https://github.com/harfbuzz/harfbuzz/issues/1247
Behdad Esfahbod [Sun, 14 Oct 2018 21:56:32 +0000 (14:56 -0700)]
[kerx] Fix Format1 sanitize
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10948
Behdad Esfahbod [Sun, 14 Oct 2018 21:52:17 +0000 (14:52 -0700)]
[aat] Whitespace
Behdad Esfahbod [Sat, 13 Oct 2018 23:03:33 +0000 (19:03 -0400)]
[aat] Finish off massaging table
Behdad Esfahbod [Sat, 13 Oct 2018 22:37:14 +0000 (18:37 -0400)]
[aat] WIP remove feature mapping here from hb-coretext
Need to map enum values to numerics since we don't have CoreText headers.
Behdad Esfahbod [Sat, 13 Oct 2018 21:03:32 +0000 (17:03 -0400)]
[coretext] Prepare AAT feature mapping to be moved
Behdad Esfahbod [Sat, 13 Oct 2018 17:48:22 +0000 (13:48 -0400)]
[kerx] Sanitize more
Behdad Esfahbod [Sat, 13 Oct 2018 17:36:27 +0000 (13:36 -0400)]
[kerx] Fix-up previous commit
A "&" was missing. Go back to using pointers that are less error-prone.
Behdad Esfahbod [Sat, 13 Oct 2018 16:20:33 +0000 (12:20 -0400)]
[kerx] Use sanitizer instead of handcoded runtime sanitization
Behdad Esfahbod [Sat, 13 Oct 2018 16:16:12 +0000 (12:16 -0400)]
[kerx] Wire up context down to get_kerning
Behdad Esfahbod [Sat, 13 Oct 2018 15:48:49 +0000 (11:48 -0400)]
[kerx] Use sanitizer.get_num_glyphs() instead of face->get_num_glyphs()
Behdad Esfahbod [Sat, 13 Oct 2018 15:39:12 +0000 (11:39 -0400)]
[kerx] Protext against overflows
Behdad Esfahbod [Sat, 13 Oct 2018 13:47:51 +0000 (09:47 -0400)]
[hangul] Fix use-after-free issue
out_info might have moved since we copied it's position into local
info var.
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=894937
Ebrahim Byagowi [Sat, 13 Oct 2018 10:30:05 +0000 (14:00 +0330)]
Cosmetic and minor changes
Behdad Esfahbod [Fri, 12 Oct 2018 20:05:56 +0000 (16:05 -0400)]
Touch up new API
New API:
+hb_ot_layout_feature_get_name_ids()
+hb_ot_layout_feature_get_characters()
Behdad Esfahbod [Fri, 12 Oct 2018 19:52:31 +0000 (15:52 -0400)]
Add hb-ot-name.h
Actual name-fetching API to come later.
New API:
hb_name_id_t
HB_NAME_ID_INVALID
Ebrahim Byagowi [Thu, 11 Oct 2018 23:30:59 +0000 (03:00 +0330)]
Add two APIs for getting stylistic set labels
* hb_ot_layout_feature_get_characters
* hb_ot_layout_feature_get_name_ids
However HarfBuzz currently doesn't expose an API for retrieving the actual
information associated with NameId from the `name` table and that should be
done separately.
Behdad Esfahbod [Fri, 12 Oct 2018 01:37:45 +0000 (21:37 -0400)]
[sanitize] Reorder condition to silence bogus gcc warning
Was givin a dozen of:
../../src/hb-machinery.hh: In member function ‘bool AAT::ankr::sanitize(hb_sanitize_context_t*) const’:
../../src/hb-machinery.hh:307:23: warning: missed loop optimization, the loop counter may overflow [-Wunsafe-loop-optimizations]
bool ok = --this->max_ops > 0 &&
~~~~~~~~~~~~~~~~~~~~~~
this->start <= p &&
~~~~~~~~~~~~~~~~~~~
p <= this->end &&
~~~~~~~~~~~~~~~^~
(unsigned int) (this->end - p) >= len;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I believe those are bogus, but this silences them and does not introduce
logic issues I believe.
Behdad Esfahbod [Fri, 12 Oct 2018 01:22:49 +0000 (21:22 -0400)]
Add HB_DEPRECATED_FOR and mark relevant symbols
Behdad Esfahbod [Fri, 12 Oct 2018 01:19:39 +0000 (21:19 -0400)]
[graphite] Add HB_DEPRECATED annotation
Behdad Esfahbod [Fri, 12 Oct 2018 01:18:20 +0000 (21:18 -0400)]
Always compile deprecated symbols
We haven't been keeping this updated. So, while we don't expose the
symbols in the headers if HB_DISABLE_DEPRECATED is defined, we still
always build them.
David Corbett [Fri, 12 Oct 2018 02:08:14 +0000 (22:08 -0400)]
Add missing colons to GObject annotations
David Corbett [Fri, 12 Oct 2018 00:37:49 +0000 (20:37 -0400)]
Fix Indic script tags in Graphite
Behdad Esfahbod [Fri, 12 Oct 2018 00:45:00 +0000 (20:45 -0400)]
Attach CursivePositioning backwards, not forward
This is how Uniscribe does it. So, adjust. This is only relevant
to fonts that apply cursive positioning from a contextual lookup.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1181
Behdad Esfahbod [Fri, 12 Oct 2018 00:20:00 +0000 (20:20 -0400)]
[myanmar] Implement Zawgyi shaper
Enabled if script tag 'Qaag' is passed to HarfBuzz. Disables mark
advance-zeroing and fallback mark-positioning.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1162
Behdad Esfahbod [Fri, 12 Oct 2018 00:15:31 +0000 (20:15 -0400)]
[myanmar] Shuffle
Behdad Esfahbod [Fri, 12 Oct 2018 00:15:00 +0000 (20:15 -0400)]
[graphite] Remove assert
Behdad Esfahbod [Thu, 11 Oct 2018 23:39:07 +0000 (19:39 -0400)]
Minor
Behdad Esfahbod [Thu, 11 Oct 2018 23:24:52 +0000 (19:24 -0400)]
[test] Add test for USE indic3
Behdad Esfahbod [Thu, 11 Oct 2018 23:23:36 +0000 (19:23 -0400)]
Minor
Behdad Esfahbod [Thu, 11 Oct 2018 21:51:21 +0000 (17:51 -0400)]
Pass indic3 tags to USE shaper
Fixes https://github.com/harfbuzz/harfbuzz/issues/539
David Corbett [Thu, 11 Oct 2018 21:15:22 +0000 (17:15 -0400)]
Parse Indic3 tags
Behdad Esfahbod [Thu, 11 Oct 2018 21:31:29 +0000 (17:31 -0400)]
Remove remains of get-codepoint-fuzzer
Behdad Esfahbod [Thu, 11 Oct 2018 21:08:12 +0000 (17:08 -0400)]
[fuzzing] Fold get-codepoints-fuzzer into subset-fuzzer
Behdad Esfahbod [Thu, 11 Oct 2018 20:41:01 +0000 (16:41 -0400)]
[aat] Fix two wrongs that made a right before!
Unfortunately our static asserts (DEFINE_SIZE_STATIC) don't actually
fail when used in templates, thanks to SFINAE. Le sighs.
Probably fixes https://oss-fuzz.com/v2/testcase-detail/
5740171484463104
Behdad Esfahbod [Thu, 11 Oct 2018 19:56:17 +0000 (15:56 -0400)]
[aat] Fix mul overflow
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10897
Behdad Esfahbod [Thu, 11 Oct 2018 19:42:54 +0000 (15:42 -0400)]
Minor
Behdad Esfahbod [Thu, 11 Oct 2018 19:14:18 +0000 (15:14 -0400)]
[arabic] Update to latest UTR#53
From Lorna Evans: "That was a new character added to Unicode 11.0"
Behdad Esfahbod [Thu, 11 Oct 2018 19:03:21 +0000 (15:03 -0400)]
[test] Fix use of deprecated symbols
Behdad Esfahbod [Thu, 11 Oct 2018 18:32:59 +0000 (14:32 -0400)]
[graphite] Remove deprecated symbol use
Behdad Esfahbod [Thu, 11 Oct 2018 18:30:15 +0000 (14:30 -0400)]
Whitespace
Behdad Esfahbod [Thu, 11 Oct 2018 18:25:48 +0000 (14:25 -0400)]
[graphite] Fix deva/dev2 resolution
See https://github.com/harfbuzz/harfbuzz/pull/730#issuecomment-
428277800
Behdad Esfahbod [Thu, 11 Oct 2018 18:16:55 +0000 (14:16 -0400)]
Add doc stubs for recently added API
Thanks to David Corbett who revamped our script and language processing
and implemented full BCP 47 support.
https://github.com/harfbuzz/harfbuzz/pull/730
New API:
+hb_ot_layout_table_select_script()
+hb_ot_layout_script_select_language()
+HB_OT_MAX_TAGS_PER_SCRIPT
+HB_OT_MAX_TAGS_PER_LANGUAGE
+hb_ot_tags_from_script_and_language()
+hb_ot_tags_to_script_and_language()
Deprecated API:
-hb_ot_layout_table_choose_script()
-hb_ot_layout_script_find_language()
-hb_ot_tags_from_script()
-hb_ot_tag_from_language()
Behdad Esfahbod [Thu, 11 Oct 2018 18:07:44 +0000 (14:07 -0400)]
Remove use of deprecated function
David Corbett [Mon, 10 Sep 2018 17:15:00 +0000 (13:15 -0400)]
Increase HB_OT_MAX_TAGS_PER_SCRIPT to 3
No script has 3 tags yet, but the plan is for the Indic scripts to each
get a third tag someday.
David Corbett [Mon, 10 Sep 2018 16:05:51 +0000 (12:05 -0400)]
Update language system tag registry to OT 1.8.3
David Corbett [Tue, 24 Jul 2018 01:19:23 +0000 (21:19 -0400)]
Add hb_ot_tags_to_script_and_language
David Corbett [Thu, 19 Jul 2018 17:48:07 +0000 (13:48 -0400)]
Switch on the first char of a complex language tag
This results in a tenfold speed-up for the common case of tags that are
not complex, in the sense of `hb_ot_tags_from_complex_language`.
David Corbett [Tue, 17 Jul 2018 01:14:48 +0000 (21:14 -0400)]
Map Quechua languages to closest ones with tags
OpenType only officially maps four ISO 639 codes to Quechua languages,
but prior versions of HarfBuzz also mapped qu to 'QUZ '. Because qu is a
macrolanguage, the mapping now applies to all individual Quechua
languages. OpenType calls 'QUZ ' "Quechua", but it really corresponds to
Cusco Quechua, so the individual Quechua languages should not all
necessarily be mapped to it.
David Corbett [Thu, 18 Jan 2018 21:33:39 +0000 (16:33 -0500)]
Test deprecated tag fallback in a font
The font supports the deprecated tag 'DHV ' instead of 'DIV '. dv is
mapped to 'DIV ' and 'DHV ', in that order. The test specifies
`--language=dv`, demonstrating that if a font does not support the first
OpenType tag mapped to a BCP 47 tag, it will fall back to the next tag.