Log

Author Commit Date CI Message
Behdad Esfahbod 23a28f5a 2021-04-16T13:22:05 Avoid undefined-behavior If a struct had (because it's a union) sizeof that is larger than the null_size, we were providing only null_size bytes for its Null object. We know we'd never access beyond that, but is undefined-behavior nonetheless according to the standard. The alternative fix would have required use of flexible-arrays, which are not standard and have their own issues in various compiler. We've discussed that extensively in the follow Mozilla issue (currently locked; I've asked that it be opened): https://bugzilla.mozilla.org/show_bug.cgi?id=1577584 Part of https://github.com/harfbuzz/harfbuzz/pull/2067
Behdad Esfahbod 499248c5 2021-04-16T13:14:48 [blob] Use min_size, instead of null_size in .as<T>() Part of https://github.com/harfbuzz/harfbuzz/pull/2067
Khaled Hosny a4fb5da9 2021-04-16T14:10:37 [ci] Enable DirectWrite in win32 tarballs
Khaled Hosny f2240d12 2021-04-16T02:37:11 [ci] Use -j2 for make and ninja in distcheck job Lets see if this makes it faster without crashing gcc.
Khaled Hosny f5c922b7 2021-04-16T01:47:34 [ci] Try to stop distcheck job from crashing gcc
Khaled Hosny e116058b 2021-04-15T13:52:19 [directwrite] Use correct UTF-16 string length Fixes https://github.com/harfbuzz/harfbuzz/issues/2474
Ben Denckla 43d95520 2021-04-12T14:01:56 improve comments on Hebrew ccc 18 & 19 improve comments to reflect that: ccc 18 includes both "flavors" of qamats: qamats [gadol] and qamats qatan ccc 19 includes both "flavors" of holam: holam [not haser for vav] and holam haser for vav This code and its comments may have been written before these code points were added to Unicode. I.e. originally, these comments may have been complete, but they may have become incomplete in the meantime.
Ben Denckla 668acff1 2021-04-12T14:25:19 similarly improve comments on Hebrew ccc 18 & 19 Should have committed this along with commit 9658435a25c2ba82 but forgot.
Ambient Lighter 4cc4cd3b 2021-04-10T14:11:23 [docs] Fix spelling typo (#2945)
Qunxin Liu 9dc9f038 2021-04-08T11:00:17 [subset] fix for fuzzer testcase: https://oss-fuzz.com/testcase-detail/5858518134554624
Qunxin Liu 430a67ce 2021-04-01T12:01:19 [subset] COLRv1 struct definitions
Qunxin Liu 553ffaf6 2021-04-07T17:15:32 [subset] fix for fuzzer testcase: https://oss-fuzz.com/testcase-detail/6382598554255360 avoid writing to null pointer
Qunxin Liu 4af5dace 2021-04-07T10:56:49 [subset] add fuzzer testcase
Garret Rieger 8b686afe 2021-04-06T11:33:38 [subset] add unlikely().
Garret Rieger 64122b5a 2021-04-05T12:53:08 [subset] don't visit lookup if covered glyph set has failed. If covered glyph set is in error then the same lookup can be recursed into repeatedly potentially causing a fuzzer timeout. Fixes: https://oss-fuzz.com/testcase-detail/5416421032067072.
Garret Rieger 4ec18c85 2021-04-02T15:33:54 [subset] add subsetting tests with drop hints and layout subsetting enabled.
Garret Rieger 6f98a8ed 2021-04-02T14:37:10 [subset] Anchor should only use format 1 when hints are dropped. Refactor Anchor to have a subset method instead of copy. This also allows use to use serialize_subset in several places which simplifies calculating offset bases.
Garret Rieger 71d6d156 2021-04-05T12:03:17 [subset] clamp distance to prevent shifting outside of the limits of int64. Fixes https://oss-fuzz.com/testcase-detail/4961171477233664.
Khaled Hosny fcacd177 2021-04-05T22:27:39 [ot] Update _hb_glyph_info_is_default_ignorable_and_not_hidden() Used _hb_glyph_info_substituted() similar to the change made to _hb_glyph_info_is_default_ignorable() in 7686ff854bbb9698bb1469dcfe6d288c695a76b7.
Garret Rieger 596f4258 2021-04-02T12:41:09 [subset] copy Lookup::markFilteringSet when subseting.
Behdad Esfahbod d3a2f999 2021-04-02T08:32:41 Fix up build This was left out; oops.
Garret Rieger c35d7863 2021-04-01T14:32:38 [subset] never drop the 'pref' feature. Never ever drop feature 'pref', even if it's empty. Harfbuzz uses it to choose the shaper for Khmer.
Behdad Esfahbod 092094f7 2021-04-01T15:47:21 Use as_array() and range loops in a few places
Garret Rieger 55e7f3fe 2021-04-01T13:35:30 [subset] Match FeatureVariationRecord dropping from fontTools. Only drop records with no matching features that are at the end of the list. See: https://github.com/fonttools/fonttools/commit/cab7d13dc0883765cde435215c7d65e9212f152d
Garret Rieger f0c78e02 2021-03-25T12:57:12 [subset] don't drop features referenced in a feature variation substitution.
Garret Rieger dae99b77 2021-03-25T12:33:51 [subset] don't keep FeatureVariationRecord's with no subsittutions.
Garret Rieger 85b07287 2021-03-25T12:17:18 Add full variable font subsetting test.
Behdad Esfahbod c4b49075 2021-04-01T10:47:18 Update CMakeLists.txt Keep the warning.
Timo Suoranta 9945f327 2021-02-06T14:24:25 Test fix to export target include directories
Garret Rieger b10741ca 2021-03-25T19:14:48 [subset] when closing glyphs in context lookups don't use a current glyph set if a lookup is already applied.
Garret Rieger 2773d057 2020-11-04T11:11:16 [subset] Add a test case using NotoNastaliqUrdu.
Garret Rieger 8ef4257d 2021-03-31T15:00:46 [sanitize] change max ops to track number of bytes processed. Counting bytes as the operations is likely to be a better proxy for how much work processing the table will cost vs. the current approach of counting the number of sub-objects. This should allow checks for max features, max scripts, etc. to be removed. I tested this change against the full collection of fonts at https://github.com/google/fonts and a max ops factor of 3 was sufficient to successfully sanitize all of them.
Behdad Esfahbod 70110f6a 2021-03-31T17:04:02 Modify OffsetTo<>::sanitize() overflow check The code in question was introduced in 70eb2ff682. Rewrite it to not call sanitizer check_range() as we want to use check_range() for byte accounting. Part of https://github.com/harfbuzz/harfbuzz/pull/2923
Behdad Esfahbod 4dba749d 2021-03-31T16:09:39 Add SortedArray{16,32}Of<>
Behdad Esfahbod 5639e253 2021-03-31T16:04:43 Add Array16Of<>
Behdad Esfahbod 2520a82d 2021-03-31T15:34:26 s/LArrayOf/Array32Of/g
Behdad Esfahbod 5efe3609 2021-03-31T15:33:22 Rename (Unsized)OffsetListOf
Behdad Esfahbod 6c4e0491 2021-03-31T15:31:32 s/OffsetArrayOf/Array16OfOffset16To/g
Behdad Esfahbod 1fc6b69a 2021-03-31T15:30:35 s/UnsizedOffsetArrayOf/UnsizedArray16OfOffsetTo/g
Behdad Esfahbod 2a54c9f7 2021-03-31T15:26:42 .
Behdad Esfahbod c539afb0 2021-03-31T13:28:25 [CFF] Use NNOffsetTo<> instead of OffsetTo<> I'm pretty sure that's what is intended.
Behdad Esfahbod 9b4b5849 2021-03-31T13:27:21 Fixup for recent OffsetTo<> changes
Behdad Esfahbod ad28f973 2021-03-31T12:49:14 Rename offset types to be explicit about their size Add Offset16To<>, Offset24To<>, and Offset32To<> for most use-cases.
Garret Rieger c5c13006 2021-03-31T11:23:46 [subset] fix memory leaks found in https://oss-fuzz.com/testcase-detail/5179935334465536
Behdad Esfahbod bd2950b3 2021-03-31T11:36:36 Make VariationStore::get_delta(outer, inner) private
Behdad Esfahbod 934675a4 2021-03-31T11:34:41 Use VarIdx in VariationDevice
Behdad Esfahbod 0f7f7536 2021-03-31T11:31:49 [hvar] Change variation-index types from "unsigned int" to uint32_t
Behdad Esfahbod 9ffc46b8 2021-03-31T11:26:18 Add VarIdx
Behdad Esfahbod 2179281c 2021-03-31T11:20:21 Add Offset24
Behdad Esfahbod b3159ed8 2021-03-30T20:52:56 [util] Silence compiler warning
Andrzej Perczak cab9d5a5 2021-03-19T22:10:50 hb-config: Include config-override earlier Currently config-override.h is included at the end of this file. This caused a problem for me while undefing HB_DISABLE_DEPRECATED, namely HB_IF_NOT_DEPRECATED was defined before actual undef took place and broke the whole build. I believe it would break builds for some other defines, too. Moving config-override.h include right after predefined configs is more sane and fixes all potential problems with includes.
Garret Rieger adca4ce0 2021-03-30T13:20:50 [subset] fixes https://oss-fuzz.com/testcase-detail/6173520787800064. Caused by incorrect bounds check in glyph closure for context lookups.
Garret Rieger 9f77a0c1 2021-03-30T14:10:45 [subset] use hb_set_clear to avoid calling clear() on null pool set.
Garret Rieger 752e393a 2021-03-29T17:23:33 [subset] avoid calling clear on null pool set.
Behdad Esfahbod 9ed5f04a 2021-03-29T18:14:30 [subset] Simplify recent out-of-memory fixes By checking return status of map->set().
Behdad Esfahbod a8f9f85a 2021-03-29T18:12:05 [map] Return success from ->set()
Garret Rieger 8741914a 2021-03-29T16:39:44 [subset] fix memory leak when map insert fails.
Behdad Esfahbod 23976893 2021-03-29T17:34:23 Remove hb_success_t Was not rolled-out yet. So just expand.
Behdad Esfahbod 7a2eda78 2021-03-29T17:32:29 Move code around
Behdad Esfahbod bcb57dcc 2021-03-29T17:31:09 [sanitize] Add short-circuit to ArrayOfM1 Like the sibling ArrayOf types.
Garret Rieger 5b6da6d2 2021-03-29T16:19:17 [subset] add fuzzer test case.
Garret Rieger 52df6b9f 2021-03-29T16:17:27 [subset] check for set insertion success.
Garret Rieger c6adb90a 2021-03-29T16:08:44 [subset] fix nullptr deref.
Garret Rieger 9a3537e5 2021-03-29T14:34:24 [subset] invert err() return value. Undo previous change to check_success.
Garret Rieger a804a0c9 2021-03-29T14:25:20 [subset] add fuzzer test case.
Garret Rieger cdba5d44 2021-03-29T14:23:59 [subset] fix incorrect handling of return value in check_success in the error case.
Behdad Esfahbod 05e845c4 2021-03-29T16:02:10 Make previous commit gcc-only
Behdad Esfahbod b5e40323 2021-03-29T15:54:40 -Wno-unused-result GCC doesn't let one turn off the warning using "(void) foo()". People have introduced macros that do "unused << foo()" instead. Until we do something similar, silence gcc. Clang on the other hand understands "(void) foo()".
Khaled Hosny c30349d5 2021-03-21T20:12:59 [hb-view] Support kitty inline images protocol https://github.com/harfbuzz/harfbuzz/issues/2758
Khaled Hosny f7d5889b 2021-03-21T18:16:33 [hb-view] Support iTerm2 inline images protocol https://github.com/harfbuzz/harfbuzz/issues/2758
Khaled Hosny 743baf35 2021-03-22T15:51:17 [build] Don’t look for FontConfig We don’t currently use it anywhere. It was used briefly for the hb-fc-list tool, but this tool have not been built since 2015: commit cd042fc8c4a3984c3647cd22a27c34f00636f6e8 Author: Behdad Esfahbod <behdad@behdad.org> Date: Thu Jun 18 10:55:13 2015 -0700 [util] Disable hb-fc-list for now Until I figure out what to do about the API, and finalize the tool.
Qunxin Liu 95230e29 2021-03-18T17:41:25 [subset] support subsetting GSUB8
David Corbett d18915f9 2021-03-28T10:09:13 Reformat gen-tag-table.py
Garret Rieger 3c8273ab 2021-03-25T11:39:57 Check for alloc failures on the gsub/gpos_langsys maps in subset plan creation.
Behdad Esfahbod 29708e95 2021-03-22T15:22:15 [aat] Fix offsetToIndex math for out-of-bounds values Previously, some bad font data was accidentally being interpretted as legit if it happened to not fall out of memory bounds. The intention of the code was what this commit does. I'm surprised we weren't getting a "arithmetic between signed and unsigned values" warning / error before.
Behdad Esfahbod c5d6bdb4 2021-03-18T14:38:55 Merge pull request #2857 from googlefonts/repacker [subset] add a GSUB/GPOS table repacker to resolve offset overflows.
Garret Rieger 46bf03d6 2021-03-18T14:35:36 [subset] add NODISCARD to error checking methods on serializer.
Garret Rieger 3827a3eb 2021-03-18T11:20:03 [subset] rename serializer::set_error() to err().
Garret Rieger f561fa6e 2021-03-18T11:13:47 Change priority queue to use (priority, value) instead of (value, priority).
Garret Rieger b14475d2 2021-03-18T10:51:26 [subset] further changes to serializer error handling. - Rename enum type and enum members. - in_errors() now returns true for any error having been set. hb-subset now looks for offset overflow only errors to divert to repacker. - Added INT_OVERFLOW and ARRAY_OVERFLOW enum values.
Garret Rieger 73ed59f7 2021-03-17T15:53:10 [subset] store errors in the serializer as a flag set. Make check_assign/check_equal specify the type of error to set.
Garret Rieger b9ecc742 2021-02-16T13:39:10 [subset] init offset_overflow in hb_serialize_context_t.
Garret Rieger cf79fc34 2021-02-16T13:24:43 [subset] limit priority bumps to 16.
Garret Rieger 01044099 2021-02-16T11:38:14 Fix repack_tests for distcheck.
Garret Rieger e2f14e81 2020-11-11T13:55:35 [subset] fix memory leaks in test-repacker.
Garret Rieger d3e2ba7c 2020-11-11T13:50:18 [subset] comment cleanup in hb-repacker.hh
Garret Rieger 832f2b59 2020-11-10T16:15:37 [subset] Refactor _subset () to reduce nesting and eliminate the use of 'goto'.
Garret Rieger bb5c80a7 2020-11-10T14:11:57 [subset] add error tracking to the repacker. Also check for allocation failures as needed.
Garret Rieger b8b8c58b 2020-11-10T11:56:09 [subset] add tests that check for successful repacking of a real font file.
Garret Rieger 6e9468fc 2020-11-09T16:52:36 [subset] cleanup memory leaks in the repacker.
Garret Rieger a7a86a6e 2020-11-06T16:22:48 [subset] Add prioritization offset resolution. Vertices can now be prioritized to force them to sort closer to their parent. The resolver will attempt to use this for overflows on non-shared vertices.
Garret Rieger b452b2c7 2020-11-06T15:37:05 [subset] refactor repacker graph to cache edge count and distances of vertices.
Garret Rieger 75414e82 2020-11-05T16:39:23 [subset] Add table duplication overflow resolution.
Garret Rieger 8286bd80 2020-11-05T14:23:29 [subset] use vectors instead of hashmaps throughout the repacker since all keys will be mapped for these use cases.
Garret Rieger 519ae966 2020-11-05T11:22:16 [subset] switch sort_shortest_distance() to use priority queue.
Garret Rieger 5d3511e5 2020-11-05T10:34:26 [subset] Change compute_distances() to use a priority queue.
Garret Rieger 59ac0a0d 2020-11-05T10:29:56 [subset] Use priority for comparison in heap.
Garret Rieger 4c8dd41e 2020-11-05T09:21:25 [subset] re-write compute distances to use an array lookup for the distance map.
Garret Rieger 5c4e0ffd 2020-11-04T16:08:01 [subset] Add a basic priority queue datastructure (binary heap).
Garret Rieger dd8e5d0e 2020-11-03T14:01:42 [subset] Only run the repacker for GSUB/GPOS.