Ebrahim Byagowi
0558413f27
Minor, tweak spaces
2019-10-01 13:50:11 +03:30
Behdad Esfahbod
faace9437e
Merge pull request #1807 from harfbuzz/subset-varstore
...
VariationStore serializer
2019-09-30 13:34:05 -07:00
Qunxin Liu
b0c3eb06b6
[subset] GPOS Lookup Type 3: CursivePos
2019-09-25 05:43:25 +09:00
Ebrahim Byagowi
d512087e4d
Rename GlyphID to HBGlyphID
...
Avoid collision with macOS's ATSUnicodeTypes.h GlyphID
2019-09-14 11:55:53 +04:30
Behdad Esfahbod
0e294c455e
Rename VAR to HB_VAR_ARRAY
2019-09-06 16:54:27 -04:00
Behdad Esfahbod
c379faed2b
Fix a few struct size declarations
...
Was wrong. As excercised by defining VAR to other than 1 in hb.hh.
2019-09-06 16:41:12 -04:00
qxliu76
0313ef86e3
bug fix in optimizing coverage table format ( #1942 )
...
We are comparing number of shorts, NOT number of bytes.
2019-08-29 14:09:05 -07:00
Ebrahim Byagowi
a0b4ac4dce
Turn 8 spaces to tab across the project
...
According to the current code style of the project
2019-08-27 02:40:41 +04:30
blueshade7
68ac767e43
added skip(), get_next_value() to inc_bimap to subset VarStore with retain-gids
2019-07-12 23:02:29 -07:00
blueshade7
634390ecaf
added VariationStore serializer to be used by HVAR/VVAR subsetters
2019-07-01 18:52:57 -07:00
Behdad Esfahbod
6c725c7799
[config] Add HB_NO_LAYOUT_FEATURE_PARAMS
...
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-06-19 20:12:25 -07:00
Behdad Esfahbod
c8f529a07e
[config] Add HB_NO_HINTING, enabled by HB_TINY
...
Disables HintingDevice tables and Anchors addressing contour points.
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-06-19 19:33:15 -07:00
Behdad Esfahbod
a849873124
[config] Add HB_NO_VAR to disable variations support, enabled by HB_TINY
...
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-06-19 19:26:22 -07:00
Behdad Esfahbod
1834cf86d4
[serialize] Pass offset to serialize_subset()
2019-05-31 14:39:32 -07:00
Behdad Esfahbod
9260441624
[serialize] Pass offset to serialize_copy()
2019-05-31 14:35:01 -07:00
Garret Rieger
962f95cf80
[subset] Switch SingleSubst to use iterators in serialize.
2019-05-15 18:37:32 -07:00
Behdad Esfahbod
889dc1eb06
[iter] Remove sort categorization
...
See comments.
2019-05-14 22:28:07 -07:00
Behdad Esfahbod
513762849a
[iter] Track strictly-sorted iterators
...
This make output of hb_enumerate() sorted regardless of input iterator.
2019-05-13 15:36:14 -07:00
Behdad Esfahbod
a487fc3324
Another extra semi-colon
2019-05-13 14:16:33 -07:00
Behdad Esfahbod
4d67743ffd
[subset] Use more auto typing
2019-05-10 18:43:48 -07:00
Behdad Esfahbod
a27a31b9ee
Minor
2019-05-10 18:43:48 -07:00
Behdad Esfahbod
2ade008628
[serialize] More rewrite
2019-05-10 18:43:48 -07:00
Behdad Esfahbod
99ed6e29d8
[serialize] Fix a TODO
2019-05-10 18:43:48 -07:00
Behdad Esfahbod
25a5b287f2
Fix sanitize fail of extension sublookups
...
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=960331
2019-05-10 16:03:20 -07:00
Behdad Esfahbod
9c0c3589f3
Minor
2019-05-10 13:56:50 -07:00
Behdad Esfahbod
5d4437fad0
Minor
2019-05-10 13:43:29 -07:00
Behdad Esfahbod
ed972d5d73
[iter] Rewrite test functions
...
Notably, add hb_is_source_of(,) and hb_is_sink_of(,) to replace most
uses of hb_is_iterator_of(,).
2019-05-09 16:58:28 -07:00
Behdad Esfahbod
4c9e0c37a3
[serialize] LangSys subset->copy
2019-05-08 10:40:39 -07:00
Behdad Esfahbod
af571dbffc
[meta] Replace most hb_enable_if with hb_requires
...
They do absolutely same thing. hb_requires is to encode constraints,
whereas hb_enable_if is for more conditional enabling.
2019-05-07 21:39:20 -07:00
Behdad Esfahbod
83e3eabd84
Whitespace
2019-05-07 20:58:43 -07:00
Behdad Esfahbod
e33ad25222
[serialize] FeatureVariations subset->copy
2019-05-07 15:46:24 -07:00
Behdad Esfahbod
4c2fd05ca5
[iter] Implement range-based for loops
...
Part of https://github.com/harfbuzz/harfbuzz/issues/1648
2019-05-06 19:57:35 -07:00
Behdad Esfahbod
36bb24f7b4
[dispatch] Forward arguments in all dispatch multiplexers
2019-05-05 10:14:17 -07:00
Behdad Esfahbod
88a4147240
[serializer] Accept exact type in serialize_subset/copy()
2019-05-02 14:22:31 -07:00
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
699de689e9
Delete default assignment operator Offset<>
2019-04-15 16:00:20 -04:00
Behdad Esfahbod
c68eb7002f
Minor
2019-04-03 16:24:12 -07:00
Behdad Esfahbod
85adf4ad5c
[GDEF] Don't assume glyphlist is sorted
...
As was hit by the fuzzer.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14032
2019-04-03 16:07:36 -07:00
Jonathan Kew
e5d6fe9782
Don't skip setting the .end field of the first range
...
Fixes a bug in CoverageFormat2::serialize whereby the first range
was not serialized correctly if it consists of only a single glyph ID.
This broke shaping of U+0626 in the Arabic fallback shaper, because it
is not found in the coverage table of the 'init' and 'medi' lookups.
Also fix similar bug in ClassDefFormat2::serialize, noted during code
inspection (I haven't observed a case that was actually affected by
this, but it looks broken).
Fixes https://github.com/harfbuzz/harfbuzz/issues/1504
2019-03-31 19:02:47 -07:00
Behdad Esfahbod
b986c6a321
[C++11] Remove IntType::set() in favor of operator=
2019-03-29 20:21:21 -07:00
Behdad Esfahbod
cbe2118c58
Merge branch 'master' into iter
2019-01-30 15:07:09 -08:00
Behdad Esfahbod
849a0f1758
[iter] Add hb_iter_with_fallback_t instead
2019-01-29 17:10:19 -08:00
Behdad Esfahbod
4d40ed9d1a
[iter] Add hb_iter_with_mixin_t<>
2019-01-29 13:55:23 -08:00
Behdad Esfahbod
84a25d79c6
[iter] Rename
2019-01-29 13:39:19 -08:00
Garret Rieger
925be29223
Update hb-ot-vorg-table and hb-ot-layout-common to use the updated subset plan api.
2019-01-29 13:19:21 -08:00
Behdad Esfahbod
d438e61042
[iter] Fix operator() impls
2019-01-28 16:34:04 -05:00
Behdad Esfahbod
090fe56dc6
Merge branch 'master' into iter
2019-01-25 16:06:52 +01:00
Behdad Esfahbod
5d4b0377b9
Convert unsigned 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
93551669c5
Remove unused Coverage::iter_t::get_coverage()
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
a7de144df3
Implement uniform map interface
...
Coverage, ClassDef, hb_set_t, and hb_map_t implement.
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
7987095e64
[meta] Remove hb_enable_if_t
...
It was only used for C++<11 which does not allow default parameters
in function templates. Looks like we cannot support <11 anyway, so,
start cleaning up.
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
7798e4fcc3
[iter] Change Coverage iterator to only return glyph-id
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
636786ecaf
[iter] Rename __item_type__ to __item_t__
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
6caf76f4a8
Tighten Coverage iteration
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
ff3a7ce1e7
[subset] Minor
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
74ca7b580c
[OT] Implement operator[] for Coverage and ClassDef
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
445364d80a
[iter] Rename hb_is_[sorted_]iterator() -> hb_is_[sorted_]iterator_of()
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
815cde9fa3
[iter] Use is_sorted_iterator
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
b5d6fe1a45
[iter] Remove hb_sorted_iter_t
...
Not enforcing it using type hierarchy.
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
a685bfe8fc
Separate GlyphID from HBUINT16
...
For stricter enforcement.
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
40c24fd4a6
[iter] Port Coverage towards iter_t instead of array_t specifics
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
851fbb23ea
[iter] Port Coverage::serialize to hb_is_iterator
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
bcb913efb4
Minor
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
0828db8444
[iter] Rename
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
2cbf5bf3a9
[iter] Test OT::Coverage iter
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
cde31988c2
[iter] Mark Coverage iterator sorted
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
e16884248f
[iter] Port Coverage iterator to hb_iter_t
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
8303a9b011
[Coverage] Ensure increasing coverage in iteration
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
50cd26d394
[Coverage] Mark iterator methods const
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
9df1a6eba7
[iter] Use operator bool in a few places
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
474a12058d
[array/vector] Rename len to length
2018-12-21 18:53:01 -05:00
Behdad Esfahbod
6124123393
[serialize] Adjust ClassDef
...
[skip ci]
2018-12-20 12:26:44 -05:00
Behdad Esfahbod
f1e95e40ed
[arrays] Remove hb_supplier_t<>
2018-12-18 16:49:08 -05:00
Behdad Esfahbod
9aebfb4182
[serialize] Streamline error propagation
2018-12-18 13:22:17 -05:00
Behdad Esfahbod
cf39c24205
[arrays] Rename Supplier to hb_supplier_t
2018-12-17 22:36:23 -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
c9c746c7f6
[subset] Fix up ClassDef some more
2018-12-13 18:39:30 -05:00
Behdad Esfahbod
7ee6128902
[subset] Fix ClassDefFormat1 subsetting
2018-12-13 18:32:04 -05:00
Behdad Esfahbod
705e2f5056
[subset] Implement for ClassDef
2018-12-13 17:48:42 -05:00
Behdad Esfahbod
cc65901ca7
[serialize] Implement for ClassDef
2018-12-13 16:01:45 -05:00
Behdad Esfahbod
e5309e4fd8
[serialize] Implement for ClassDefFormat2
2018-12-13 15:57:12 -05:00
Behdad Esfahbod
c8b43cbe31
[serialize] Implement for ClassDefFormat1
2018-12-13 15:53:00 -05:00
Behdad Esfahbod
602fbfe3c9
[sanitize] Fix sanitizing sublookup array
2018-12-12 09:56:47 -05:00
Behdad Esfahbod
f9d211af1d
Revert "Minor fix re sanitize of Lookup subtables"
...
This reverts commit 7146718bef
.
Fixing differently.
2018-12-12 09:44:30 -05:00
Behdad Esfahbod
7146718bef
Minor fix re sanitize of Lookup subtables
...
We were dereferencing Null pointers and trying to sanitize them,
which is not necessary...
2018-12-11 23:44:29 -05:00
Michiharu Ariza
32d291ae89
Merge branch 'master' into cff-subset
2018-11-28 16:27:45 -08:00
Behdad Esfahbod
d77a098b73
[arrays] Improve bfind() interface
...
Much more useful now. :)
2018-11-24 10:06:13 -05:00
Behdad Esfahbod
30cb45b3ea
Change ArrayOf.bsearch() return semantics
...
Towards consolidating all array bsearch/...
2018-11-24 00:48:26 -05:00
Behdad Esfahbod
5cd9546ba7
Minor
2018-11-24 00:46:07 -05:00
Behdad Esfahbod
fd94e729cb
Whitespace
2018-11-24 00:46:07 -05:00
Behdad Esfahbod
a2b6d308a4
Remove DEFINE_SIZE_ARRAY2
2018-11-21 23:23:49 -05:00
Michiharu Ariza
b403be8ad9
Merge branch 'master' into cff-subset
2018-11-16 12:29:18 -08:00
Ebrahim Byagowi
11aa0468ac
[subset] minor, adjust spaces
2018-11-16 00:02:47 +03:30
Michiharu Ariza
892ab37e7c
Merge branch 'master' into cff-subset
2018-11-14 13:54:07 -08:00
Behdad Esfahbod
e014405a21
Rename check_array(array, a, b) to check_range()
2018-11-12 14:23:31 -05:00
Michiharu Ariza
e600e5440b
Merge branch 'master' into cff-subset
2018-11-01 16:13:56 -07:00
Garret Rieger
0e1ad5a075
[subset] Limit the number of scripts and langsys' that should be checked when collecting features.
2018-10-30 14:15:58 -07:00
Ebrahim Byagowi
f7a08cd41d
Fix extra semicolon issues and test that on CI ( #1330 )
2018-10-30 11:29:09 +03:30
Behdad Esfahbod
7e998d193a
Fix spurious warning re uninitialized use
2018-10-30 00:52:22 -07:00
Behdad Esfahbod
ca5e5a4979
Port Coverage::Iter off hb_auto_t<>
2018-10-29 22:30:21 -07:00
Behdad Esfahbod
e8ff27c208
Minor
2018-10-28 18:33:10 -07:00
Behdad Esfahbod
e98af6d1ed
[layout] Try to speed up collect_lookups some more
...
Barely made a dent :(.
2018-10-25 22:25:29 -07:00
Behdad Esfahbod
84098b1639
[layout] Remove unintentionally added code
2018-10-25 21:33:12 -07:00
Behdad Esfahbod
e8e67503ff
[lookup] More prep work for memoizing collect_features
...
https://github.com/harfbuzz/harfbuzz/pull/1317
2018-10-25 20:48:20 -07:00
Michiharu Ariza
857c58279e
Merge branch 'master' into cff-subset
2018-10-22 09:57:20 -07:00
Bruce Mitchener
5a24ea15e0
Make more 'coords' params const.
2018-10-19 19:15:42 -07:00
Bruce Mitchener
257d0e5aa3
Fix typos.
2018-10-19 19:24:05 +03:30
Michiharu Ariza
db0d83ddc7
Merge branch 'master' into cff-subset
2018-10-13 17:25:38 -07:00
Ebrahim Byagowi
63109432cf
Cosmetic and minor changes
2018-10-13 07:23:33 -04:00
Behdad Esfahbod
477bc9aafe
Add hb-ot-name.h
...
Actual name-fetching API to come later.
New API:
hb_name_id_t
HB_NAME_ID_INVALID
2018-10-12 16:06:39 -04:00
Ebrahim Byagowi
dc49bd8d81
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.
2018-10-12 16:06:39 -04:00
Michiharu Ariza
b51418f596
added CFF2 get_extents
...
added source hb-ot-cff2-table.cc
augmented VariationData to return scalars
misc bug fixes, renaming, cleanup
2018-10-08 15:05:36 -07:00
Michiharu Ariza
d050ab8d3e
Merge branch 'master' into cff-subset
2018-09-17 13:07:29 -07:00
Behdad Esfahbod
606bf57430
Revert forcing use of single-parameter static_assert()
...
Some clang versions define static_assert as a macro apparently, so we cannot
redefine it...
This reverts commit 94bfea0ce6
.
This reverts commit 4e62627831
.
2018-09-16 19:34:39 +02:00
Behdad Esfahbod
4e62627831
Enforce single-param static_assert() only
...
So we don't accidentally break it again.
2018-09-16 18:09:36 +02:00
Behdad Esfahbod
10642b3fbf
Disallow null-enabled offsets to unsized structures...
...
...like UnsizedArrayOf<>.
This fixes a class of crasher bugs, mostly with color and AAT tables. We
cannot use nullable offsets to varsized data that does not declare min_size,
because it's nost safe to use our fixed-size null pool for types that have
their size external. So, use non_null'able offsets for these.
A further enhancement would be to make use of min_size in Null<> itself.
Will try that after.
2018-09-15 19:43:33 +02:00
Michiharu Ariza
45e564a519
Merge branch 'master' into cff-subset
2018-09-11 09:46:37 -07:00
Behdad Esfahbod
dff2c45f1e
Port rest from VAR to UnsizedArrayOf<>
2018-09-11 01:01:08 +02:00
Behdad Esfahbod
9507b05a7a
Simplify sanitize->check_array()
...
Fix a bug in CBDT sanitize, and redundant check in avar.
2018-09-10 23:18:23 +02:00
Behdad Esfahbod
fda994e1d4
Use enum instead of "static const" in class scope
...
Technically, static const needs an out-of-class definition. Eg:
CXXLD libharfbuzz-subset.la
Undefined symbols for architecture x86_64:
"OT::FeatureVariationRecord::min_size", referenced from:
bool OT::GSUBGPOS::subset<OT::PosLookup>(hb_subset_context_t*) constin libharfbuzz_subset_la-hb-subset.o
bool OT::GSUBGPOS::subset<OT::SubstLookup>(hb_subset_context_t*) constin libharfbuzz_subset_la-hb-subset.o
"OT::Record<OT::LangSys>::min_size", referenced from:
OT::Script::subset(hb_subset_context_t*) constin libharfbuzz_subset_la-hb-subset.o
"OT::IntType<unsigned short, 2u>::min_size", referenced from:
OT::Script::subset(hb_subset_context_t*) constin libharfbuzz_subset_la-hb-subset.o
OT::RecordListOf<OT::Feature>::subset(hb_subset_context_t*) const in libharfbuzz_subset_la-hb-subset.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[4]: *** [libharfbuzz-subset.la] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Exited with code 2
2018-09-07 15:02:57 -04:00
Michiharu Ariza
1e88b1755c
Merge branch 'master' into cff-subset
2018-09-07 10:50:55 -07:00
Behdad Esfahbod
ebe67137ab
Try fixing bots
2018-09-07 10:46:13 -04:00
Michiharu Ariza
22b88632d5
Merge branch 'master' into cff-subset
2018-09-06 22:27:44 -07:00
Michiharu Ariza
f2d299b0b7
Drop hints from CFF2 charstrings
...
Templatized ArgStack so it may store the default value along with blend deltas as BlendArg while parsing blend operator arguments in CFF2 charstring
Added get_region_count() method to VarRegionList & VariationStore
2018-09-04 10:25:21 -07:00
Behdad Esfahbod
339d3603b9
[subset] Wire up subset() call down to subtables
2018-09-03 17:40:16 -07:00
Behdad Esfahbod
7b2ef551da
Templatize Lookup::sanitize()
2018-09-03 17:16:09 -07:00
Behdad Esfahbod
49c44b58f6
[subset] Fix serialize_subset() calls
...
Ouch.
2018-09-03 16:37:17 -07:00
Behdad Esfahbod
7c9cfa2b40
Add intersects() method to GSUB/GPOS lookups
2018-09-02 19:47:50 -07:00
Behdad Esfahbod
61ce62e554
[subset] Minor
...
Remove Lookup::subset().
2018-09-02 17:00:39 -07:00
Behdad Esfahbod
bfa72a9a72
[subset] Towards GSUB/GPOS subsetting
...
Add subset() call for GSUBGPOS struct and its dependencies.
Not hooked up anywhere.
2018-09-01 18:34:50 -07:00
Behdad Esfahbod
c77ae40852
Rename hb-*private.hh to hb-*.hh
...
Sorry for the noise, downstream custom builders. Please adjust.
2018-08-25 22:36:36 -07:00