src/hb-open-type.hh


Log

Author Commit Date CI Message
Behdad Esfahbod 3656f56d 2018-12-16T20:35:11 [arrays] Minor
Ebrahim Byagowi b2ebaa9a 2018-12-16T22:38:10 Remove redundant 'inline' from methods (#1483)
Behdad Esfahbod ce069d19 2018-12-11T23:07:48 Minor
Behdad Esfahbod ca23b719 2018-12-06T10:19:03 Add default-value for second arg of sub_array()
Behdad Esfahbod 2087f5a2 2018-12-01T20:04:45 Add casts to hb_array_t<>
Behdad Esfahbod 11d2f49a 2018-12-01T13:12:21 New approach to change BigEndian casts to be int-sized Fixes spurious warnings like: Fixes https://github.com/harfbuzz/harfbuzz/issues/1436
Behdad Esfahbod c3a8b047 2018-12-01T00:14:48 Revert "Change BigEndian casts to be int-sized" This reverts commit eb5ddd32bf4e458ca0af8d5784f8fd46485ad225. Broke tests, badly. To be investigated and reenabled.
Behdad Esfahbod eb5ddd32 2018-12-01T00:03:01 Change BigEndian casts to be int-sized Fixes spurious warnings like: Fixes https://github.com/harfbuzz/harfbuzz/issues/1436
Behdad Esfahbod dfad19ad 2018-11-30T19:57:12 Make operator [] take signed int The built-in operator takes signed int. So, match it, such that the built-in is never a better or equally-good match to our operator. Fixes "ambiguous overload" errors from gcc 4.2 and VS 2008. See https://github.com/harfbuzz/harfbuzz/issues/1374
Behdad Esfahbod 52ae9867 2018-11-24T10:46:56 [AAT.feat] Use lsearch for looking up SettingName's They are not sorted.
Behdad Esfahbod 3d309726 2018-11-24T23:12:28 [aat] Skip terminator in VarSizedBinSearchArray<> Fixes shaping with Apple Chancery on 10.13 again. In that font, there was a terminator segment, that was tripping off sanitize().
Behdad Esfahbod 4202a3cd 2018-11-24T22:48:34 Minor
Behdad Esfahbod 3246a8eb 2018-11-24T21:32:00 [arrays] Merge ArrayOf's sub_array into hb_array_t's
Behdad Esfahbod 918b1ee5 2018-11-24T10:09:17 [arrays] Add not_found to reference bsearch as well
Behdad Esfahbod d77a098b 2018-11-24T10:06:13 [arrays] Improve bfind() interface Much more useful now. :)
Behdad Esfahbod 7c1600dc 2018-11-24T01:37:11 [arrays] Add (unused) SortedUnsizedArrayOf<>
Behdad Esfahbod e700392f 2018-11-24T01:31:00 [arrays] Port SortedArrayOf.bsearch/bfind to hb_sorted_array_t's
Behdad Esfahbod e604306f 2018-11-24T01:24:48 [arrays] Port hb_vector_t.bsearch/bfind to (new) hb_sorted_array_t's
Behdad Esfahbod 268eca24 2018-11-24T01:11:12 [arrays] Port (unused) ArrayOf.lsearch() to hb_array_t's
Behdad Esfahbod 3e26c8d2 2018-11-24T00:58:44 [arrays] Update ArrayOf.lsearch() Currently unused apparently
Behdad Esfahbod 70d80c90 2018-11-24T01:59:50 [arrays] Port ArrayOf.qsort() and hb_vector_t.qsort() to hb_array_t
Behdad Esfahbod 073d837a 2018-11-24T01:48:48 [arrays] Port ArrayOf.qsort() to hb_array_t's
Behdad Esfahbod 30cb45b3 2018-11-24T00:35:31 Change ArrayOf.bsearch() return semantics Towards consolidating all array bsearch/...
Behdad Esfahbod bb2a2065 2018-11-24T00:31:40 Assert that item-type of arrays have static size
Behdad Esfahbod c514f651 2018-11-23T16:04:56 [arrays] Add as_array() to ArrayOf<>
Behdad Esfahbod 4d4fd64f 2018-11-22T18:07:36 Allow non-nullable OffsetTo<> to non-Null'able objects
Behdad Esfahbod f47a60a7 2018-11-22T17:53:29 Mark UnsizedArrayOf<> as UNBOUNDED Since min_size is 0, Null() still accepts this type.
Behdad Esfahbod 2737aa81 2018-11-22T01:44:27 Fix up recent change Fixes https://github.com/harfbuzz/harfbuzz/issues/1300
Behdad Esfahbod fffea5af 2018-11-22T01:25:34 Minor
Behdad Esfahbod 9714e114 2018-11-16T16:52:42 Fix recent commits
Behdad Esfahbod 0328a1ce 2018-11-16T16:48:28 Revert b4c61130324455bfd42095b01fa14ac901e441f1 Was causing more trouble than it solved. We use unsigned for indexing, and it's not helpful to allow that wrapping to negative integers on 32bit machines. The only way we could work around it would have been by accepting int64_t arg, but that's overkill. Ignore the MSVC 2008 build issue. We don't support that compiler.
Behdad Esfahbod 52f61cdb 2018-11-16T16:41:59 Detect over/under-flow in UnsizedArray::operator[] Was causing bad substitutions in mort table because of WordOffsetToIndex() producing negative numbers that were cast to unsigned int and returned as large numbers (which was desirable, so they would be rejected), but then they were cast to int when passed to this operator and acting as small negative integers, which was bad... Detect overflow. Ouch, however, now I see this still fails on 32-bit. Guess I'm going to revert an earlier change.
Ebrahim Byagowi 11aa0468 2018-11-15T23:10:56 [subset] minor, adjust spaces
Behdad Esfahbod e014405a 2018-11-12T14:23:31 Rename check_array(array, a, b) to check_range()
Behdad Esfahbod 1d66cdcf 2018-11-10T19:54:08 Better fix for MSVC 2008 Follow up on b4c61130324455bfd42095b01fa14ac901e441f1 Fixes https://github.com/harfbuzz/harfbuzz/issues/1374
Behdad Esfahbod b4c61130 2018-11-10T16:35:39 Try fixing MSVC 2008 build Fixes https://github.com/harfbuzz/harfbuzz/issues/1374
Ebrahim Byagowi b8b00fb3 2018-11-08T18:53:14 [aat] Support Lookup<OffsetTo<>>, needed by just and lcar (#1368)
Behdad Esfahbod d0163afb 2018-11-03T21:38:24 Revert "Add operator char * to the naked array types as well" This reverts commit db889c182ee5f54127285bfaab5bc94dafe46bda. Was resulting in ambigious overloads...
Behdad Esfahbod db889c18 2018-11-03T16:04:19 Add operator char * to the naked array types as well
Behdad Esfahbod 04b82b18 2018-11-02T13:47:33 Remove pointer cast operators from ArrayOf<> ArrayOf<>, unlike UnsizedArrayOf<>, has data before the array. This was confusing. Remove.
Behdad Esfahbod 91de9dfc 2018-11-02T12:14:21 Fix &array_of<>
Behdad Esfahbod 72462eb7 2018-11-02T11:46:24 Add UnsizedArrayOf::as_array() instead of hb_array() template
Behdad Esfahbod 1cf075ec 2018-11-02T11:38:00 Add get_size to UnsizedArrayOf
Behdad Esfahbod 28b68cff 2018-10-30T23:33:30 [mort] Implement / adjust Contextual substitution
Behdad Esfahbod ea0e51d1 2018-10-29T16:00:23 Add HB_NO_CREATE_COPY_ASSIGN
Behdad Esfahbod a256a92b 2018-10-29T11:25:35 Make Array types uncopyable-unassignable Finally! Catches hard-to-find errors like this: - const SortedArrayOf<SVGDocumentIndexEntry> docs = this+svgDocEntries; + const SortedArrayOf<SVGDocumentIndexEntry> &docs = this+svgDocEntries; We implement this for our array types. This, in turn, trickles down into all types that embed the arrays. So, as long as we define all open-ended structs in terms of Array types (all can be done using UnsizedArrayOf), this achieves the goal of making uncopyable all structs that are variable-sized. Yay!
Behdad Esfahbod e8ff27c2 2018-10-28T16:29:09 Minor
Behdad Esfahbod 65621723 2018-10-28T16:27:18 [sbix] Use LOffsetLArrayOf<>
Ebrahim Byagowi c7a4e3df 2018-10-23T18:00:48 [svg] Add public API * hb_ot_color_has_svg * hb_ot_color_glyph_svg_create_blob
Behdad Esfahbod 21ede867 2018-10-25T13:19:34 Fix possible overflow in bsearch impls From bungeman. Fixes https://github.com/harfbuzz/harfbuzz/pull/1314
Behdad Esfahbod 8c78ced9 2018-10-22T21:49:42 Unbreak builds
Behdad Esfahbod 8d689f8a 2018-10-22T21:33:18 Add hb_array<>() specialization for UnsizedArrayOf Related https://github.com/harfbuzz/harfbuzz/issues/1301
Behdad Esfahbod 07386ea4 2018-10-22T21:18:27 Remove const and references when binding Null() Fixes https://github.com/harfbuzz/harfbuzz/issues/1299 Removes anomaly I was seeing in cpal table trying to use implicit Null(NameID).
Behdad Esfahbod f3336580 2018-10-22T16:16:21 [color] Use hb_array_t in CPAL Doesn't work though, ouch :(. Need to figure out if it's unreasonable to expect Null(T) inside hb_array_t<T> to see the later specialization of Null for NameID.
Behdad Esfahbod 3bf91bd2 2018-10-22T12:40:38 [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.
Behdad Esfahbod f7c0b431 2018-10-19T15:23:49 [aat] Implement LookupFormat10
Behdad Esfahbod 87205ef9 2018-10-16T15:40:44 [aat] Make sure Lookup offset is never nulled It has unbounded size... Fixes https://oss-fuzz.com/v2/testcase-detail/5718889451749376
Behdad Esfahbod 2c824d36 2018-10-11T16:41:01 [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 22955b23 2018-10-10T19:58:20 [kerx] Start fleshing out Format6
Behdad Esfahbod 4c3b19d5 2018-10-07T22:30:42 Support HBUINT32 BinSearchArrayOf
Behdad Esfahbod 456a68c5 2018-10-07T22:28:45 Move code
Behdad Esfahbod 606bf574 2018-09-16T19:33:48 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 94bfea0ce6a7b4d5641c198d50751748a353df11. This reverts commit 4e62627831e7457ed60ff87712570065b14b200a.
Behdad Esfahbod 4e626278 2018-09-16T18:09:36 Enforce single-param static_assert() only So we don't accidentally break it again.
Behdad Esfahbod ebd50b3c 2018-09-16T17:57:12 Fix static_assert
Behdad Esfahbod 10642b3f 2018-09-15T19:43:33 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.
Behdad Esfahbod f8ccb545 2018-09-14T18:59:53 [dfont] Disable null-processsing for offsets An offset to unsized arrayis not safe to be redirected to our fixed-sized null pool. Plus, we want to reject, not repair, bad-looking dfonts.
Behdad Esfahbod 3789c557 2018-09-13T20:30:04 [dfont] Solve the mystery +2 offset thing! Previously, ResourceForkHeader was defined as 30 bytes, having the typeCountM1 as last member. There was a mysterious offset-by-2 in the code, derived from FontTools and JDK code this was ported from. In testing, I observed that typeListZ offset is actually 28. Suggesting that the typeCountM1 does NOT actually belong to ResourceForkHeader, but belongs to the array itself. Adjusting for that resolves the mystery +2 offset hack, so everything is clean and good now. This, concludes my dfont hacking. The code looks great now, and I'm happy to leave it. Fuzzers might disagree though, we will see!
Behdad Esfahbod effc7ced 2018-09-13T20:21:54 Rename HeadlessArrayOf::len to lenP1 So it doesn't accidentally match our templates, etc.
Behdad Esfahbod 29faebe9 2018-09-13T18:45:35 Allow Offset<>'s that have no 0==null
Behdad Esfahbod 361fc268 2018-09-13T16:47:33 Fix OffsetTo::sanitize() after reshuffling
Behdad Esfahbod 4c6b0fb5 2018-09-13T16:39:30 OffsetTo::sanitize() Add version with three user_data
Behdad Esfahbod a73bea69 2018-09-13T16:31:31 OffsetTo::sanitize() more shuffling
Behdad Esfahbod b482e523 2018-09-13T16:29:49 OffsetTo::sanitize() reshuffling
Behdad Esfahbod bccf3e18 2018-09-11T01:04:50 Minor
Behdad Esfahbod dff2c45f 2018-09-10T23:29:26 Port rest from VAR to UnsizedArrayOf<>
Behdad Esfahbod 9507b05a 2018-09-10T23:18:07 Simplify sanitize->check_array() Fix a bug in CBDT sanitize, and redundant check in avar.
Behdad Esfahbod fda994e1 2018-09-07T15:02:57 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
Behdad Esfahbod 49c44b58 2018-09-03T16:37:17 [subset] Fix serialize_subset() calls Ouch.
Behdad Esfahbod bfa72a9a 2018-09-01T18:34:50 [subset] Towards GSUB/GPOS subsetting Add subset() call for GSUBGPOS struct and its dependencies. Not hooked up anywhere.
Behdad Esfahbod d1f29908 2018-08-31T16:31:00 [subset] Add hb_subset_context_t<>
Behdad Esfahbod c77ae408 2018-08-25T22:36:36 Rename hb-*private.hh to hb-*.hh Sorry for the noise, downstream custom builders. Please adjust.