Commit Graph

22 Commits

Author SHA1 Message Date
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
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
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
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
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
Behdad Esfahbod ebe67137ab Try fixing bots 2018-09-07 10:46:13 -04: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