Commit Graph

66 Commits

Author SHA1 Message Date
Behdad Esfahbod 6d555ce82e [meta] Use std::forward instead of hb_forward() 2021-11-02 00:18:22 -06:00
Qunxin Liu 85deddb16e [subset] fuzzer fix: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40406 2021-10-27 16:16:15 -07:00
Qunxin Liu f55d834736 [subset] Move struct DeltaSetIndexMap into hb-ot-var-common.hh
Also fix naming issues in review comments
2021-10-23 11:22:39 -07:00
Qunxin Liu 8c583db9b5 [subset] COLRv1: update subset() method for new strutc ClipList and VarIdxMap
Also fix issues in struct PaintTransform definition
2021-10-23 11:22:39 -07:00
Qunxin Liu e51c7f8e79 [subset] COLRv1: add ClipList/ClipRecord/ClipBox struct definition 2021-10-23 11:22:39 -07:00
Qunxin Liu 2e5636eeaf [subset] add DeltasetIndexMap struct definition 2021-10-23 11:22:39 -07:00
Qunxin Liu d2e986fead [subset] update COLRv1 table struct definitions 2021-10-23 11:22:39 -07:00
Behdad Esfahbod c852b86841 Rename HBGlyphID to HBGlyphID16 2021-09-19 16:30:12 -04:00
Behdad Esfahbod cc3a7ceea3 Fix macro-in-macro invocation
../src/hb-ot-color-colr-table.hh:980:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
\#if COLRV1_ENABLE_SUBSETTING == 1
2021-07-28 11:53:06 -06:00
Garret Rieger f3e031539f Revert "[ci] Bin FontTools version due to recent COLRv1 changes"
This reverts commit 163748b505.
2021-07-28 11:36:34 -06:00
Garret Rieger acbd8b27dc [subset] temporarily disable COLRv1 subsetting.
Currently COLRv1 spec is being changed so the subsetting implementation is out of sync. Disable subsetting by failing sanitization for COLRv1 tables and disable all colrv1 tests.
2021-07-28 11:36:34 -06:00
Qunxin Liu 35d6af6943 [subset] fix fuzzer testcase: https://oss-fuzz.com/testcase-detail/5965777994907648 2021-06-04 18:16:23 -06:00
Qunxin Liu 1b6008ca62 fix fuzzer testcase: https://oss-fuzz.com/testcase-detail/5417934246772736 2021-06-02 17:32:16 -06:00
Qunxin Liu f739e1dc6a [subset] subset both CPAL and COLRv1 2021-05-26 15:39:42 -06:00
Qunxin Liu b23f29bf05 [subset] Add subset () method for COLRv1 Paint tables, BaseGlyphV1List and LayerV1List
Also add support for Offset24 in serializer and repacker
2021-05-12 16:05:11 -06:00
Garret Rieger de0eba20ed Remove array for visited_paint. 2021-05-12 15:29:53 -06:00
Qunxin Liu e59ffe5482 [subset] COLRv1 layer/palette indices closure 2021-05-12 15:29:53 -06:00
Qunxin Liu 430a67ceab [subset] COLRv1 struct definitions 2021-04-08 11:27:01 -06:00
Behdad Esfahbod ad28f973f3 Rename offset types to be explicit about their size
Add Offset16To<>, Offset24To<>, and Offset32To<> for most use-cases.
2021-03-31 13:00:07 -06:00
ckitagawa b198d94489 use {} rather than {0} 2021-01-25 14:07:52 -08:00
ckitagawa 2e50b517e1 Nicer more idiomatic fix 2021-01-25 14:07:52 -08:00
ckitagawa 8f6559a373 [subet/COLR] Default initialize firstLayerIdx 2021-01-25 14:07:52 -08:00
Ebrahim Byagowi a6fb8ce98a Minor, fix -Wrange-loop-analysis warnings
Fixing these complains raised by newer versions of clang,

./hb-ot-layout-common.hh:1720:53: error: loop variable 'gid_klass_pair' is always a copy because the range of type 'hb_map_iter_t<hb_sorted_array_t<OT::HBGlyphID>, (lambda at ./hb-ot-layout-common.hh:1672:29), hb_function_sortedness_t::RETAINS_SORTING, nullptr>' does not return a reference [-Werror,-Wrange-loop-analysis]
    for (const hb_pair_t<hb_codepoint_t, unsigned>& gid_klass_pair : + it)

And

./hb-ot-color-colr-table.hh:177:44: error: loop variable '_' is always a copy because the range of type 'hb_map_iter_t<hb_filter_iter_t<hb_map_iter_t<hb_range_iter_t<unsigned int, unsigned int>, (lambda at ./hb-ot-color-colr-table.hh:209:31), hb_function_sortedness_t::RETAINS_SORTING, nullptr>, (anonymous struct at ./hb-algs.hh:331:1) &, (anonymous struct at ./hb-algs.hh:51:1) &, nullptr>, (anonymous struct at ./hb-algs.hh:338:1) &, hb_function_sortedness_t::RETAINS_SORTING, nullptr>' does not return a reference [-Werror,-Wrange-loop-analysis]
    for (const hb_item_type<BaseIterator>& _ : + base_it.iter ())
2020-07-05 11:18:04 +04:30
Ebrahim Byagowi 21e1b1310a [colr] minor style fix 2020-02-11 17:10:34 +03:30
Ebrahim Byagowi cbb45c3ee7 [subset/colr] minor improve to resolve msvc complain
MSVC says,
  hb-ot-color-colr-table.hh(215): warning C4700: uninitialized local variable 'new_record' used [build\harfbuzz-subset.vcxproj]
    harfbuzz-subset.vcxproj -> build\Debug\harfbuzz-subset.lib
2020-02-11 16:46:18 +03:30
ckitagawa 92f43a99c6 [subset] COLR, simplify logic and use add_array 2020-01-29 16:06:55 -05:00
ckitagawa fba5128a9e Fix build 2020-01-29 10:24:55 -05:00
ckitagawa 7d542a5274 Refactor to two iterators 2020-01-29 10:21:00 -05:00
ckitagawa 0aed54dca6 Use one-liner methods 2020-01-28 15:35:53 -05:00
ckitagawa 81c469eb62 Try to fix Wrange-loop-analysis 2020-01-28 15:35:53 -05:00
ckitagawa 0d1ba94ac7 Minor style fixes 2020-01-28 15:35:53 -05:00
ckitagawa ed857c4680 [subset] Add COLR support 2020-01-28 15:35:53 -05:00
Ebrahim Byagowi d512087e4d Rename GlyphID to HBGlyphID
Avoid collision with macOS's ATSUnicodeTypes.h GlyphID
2019-09-14 11:55:53 +04:30
Ebrahim Byagowi d67201da5a
[colr] minor 2019-07-30 17:20:18 +04:30
Ebrahim Byagowi e5cf9718c0
[colr][feat][meta] Port sub_array iteration to dagger (#1868) 2019-07-30 04:44:23 +04:30
Ebrahim Byagowi 92588782d7
Remove space between right angle brackets now that we have C++11 (#1689) 2019-04-30 13:05:10 -07:00
Behdad Esfahbod ef00654962 Convert tag enum class consts to static constexpr
Part of https://github.com/harfbuzz/harfbuzz/issues/1553
2019-01-22 12:17:26 +01:00
Behdad Esfahbod b1152d5e66 Use NNOffsetTo<> 2019-01-17 18:17:04 -05:00
Behdad Esfahbod 474a12058d [array/vector] Rename len to length 2018-12-21 18:53:01 -05:00
Ebrahim Byagowi e412008599 Remove redundant void from C++ sources (#1486) 2018-12-17 13:01:01 -05:00
Ebrahim Byagowi b2ebaa9afa Remove redundant 'inline' from methods (#1483) 2018-12-16 14:08:10 -05:00
Behdad Esfahbod 5c4fead734 Convert "static const hb_tag_t" constants to enum 2018-11-29 15:05:47 -05:00
Behdad Esfahbod ae96c98dfa [color] Use SortedUnsizedArrayOf<> 2018-11-24 10:25:10 -05:00
Ebrahim Byagowi 1d82b4761d [colr/feat/trak] minor 2018-11-10 19:31:12 +03:30
Behdad Esfahbod 17ffbc070f [color] Use Index for colorIdx
Doesn't matter, but matches the description.
2018-10-22 21:22:25 -07:00
Behdad Esfahbod 3bf91bd269 [color] Rewrite colr access
COLR table has one function: return layers for a glyph, and we expose exactly
that, so should just wire it through.  Also use sub_array() for verifiable
safety.

Also, BaseGlyphRecord's null object is enough.  We don't need to special-case
the not-found.
2018-10-22 14:21:23 -07:00
Behdad Esfahbod 3b3668acc8 [color] Rename / reorder a bit
Implement has_data() for realz.
2018-10-22 14:21:23 -07:00
Behdad Esfahbod 228fa71bf9 [colr] Move sanitize 2018-10-22 13:03:29 -07:00
Behdad Esfahbod b92b9d7e52 [colr] Move compare function into a static
Not sure if MSVC would be unhappy about this.
2018-10-22 10:17:31 +02:00
Behdad Esfahbod b6b171732a [colr] Minor 2018-10-22 10:17:31 +02:00