src/hb-open-type.hh


Log

Author Commit Date CI Message
Behdad Esfahbod 915b9ea5 2019-04-24T10:07:19 [serialize] Add c->check_assign() To check for assignment overflows.
Behdad Esfahbod 27377a7e 2019-04-24T09:22:14 Rely on variadic parameter pack more
Behdad Esfahbod 3ad20c38 2019-04-24T09:09:00 [serialize] Fix a few overflow TODO items
Behdad Esfahbod 441cca23 2019-04-23T23:49:21 Use hb_forward() when forwarding parameter pack
Behdad Esfahbod 20f31347 2019-04-23T12:58:52 Use variadic templates in OffsetTo<> and various ArrayOf<>s
Behdad Esfahbod 07776b60 2019-04-15T16:43:34 More tweaks to previous commit Delete assignment operator of OffsetTo<> instead of Offset<>. In simple ArrayOf<>::sanitize() assert that Type has assignment operator. Ideally we should SFINAE this and fallback to calling Type::sanitize() if assignment operator is not available. But we don't have a case of that in the codebase.
Behdad Esfahbod 699de689 2019-04-15T16:00:20 Delete default assignment operator Offset<>
Behdad Esfahbod 95df00ae 2019-04-12T17:50:03 Hide a few static methods Looks like static methods that do not get inlined end up exported. We have a lot more. Need to protect all at some point. Wish there was an easier way, like the visibility flag we pass that automatically hides all inline methods. Was exposed by check-symbols.sh when compiling on OS X 10.14 with: $ make CPPFLAGS=-Oz CXXFLAGS=-flto=thin LDFLAGS=-lc++
Behdad Esfahbod b52c0e54 2019-04-11T11:20:10 Use injected class name to simplify macros
Behdad Esfahbod 824fd342 2019-04-11T11:16:01 Rename a few macros
Behdad Esfahbod aa2293a5 2019-04-02T17:42:10 [serialize] Minor
Behdad Esfahbod e42b82c8 2019-04-02T17:21:54 [serialize] Handle non-nullable offsets
Behdad Esfahbod 7f73c974 2019-04-02T17:12:24 [serialize] Minor
Behdad Esfahbod bfa02bef 2019-04-01T21:36:13 [serialize] Switch to tetris-packing
Behdad Esfahbod 4c38a9f6 2019-03-29T20:23:07 Remove hb_assign() Not needed anymore. We just use operator= now.
Behdad Esfahbod b986c6a3 2019-03-29T20:17:46 [C++11] Remove IntType::set() in favor of operator=
Behdad Esfahbod 489faf82 2019-03-29T20:01:37 [C++11] Use type aliases for template partial instantiations
Behdad Esfahbod 9a5b15dc 2019-03-29T17:57:24 [C++11] Replace BEInt.set() with operator=
Behdad Esfahbod 0aa59b1d 2019-03-29T17:49:55 [C++11] Add operator= to IntType<> Now that we require C++11 we can do this.
Behdad Esfahbod 3f36c89f 2019-03-29T15:22:46 Inline explicit_operator macro Now that we require C++11, no need to macro.
Behdad Esfahbod 090fe56d 2019-01-25T15:34:03 Merge branch 'master' into iter
Behdad Esfahbod 70a52d6b 2019-01-22T12:15:23 Convert all other enum class consts to static constexpr Fixes https://github.com/harfbuzz/harfbuzz/issues/1553
Behdad Esfahbod 5d4b0377 2019-01-22T12:11:24 Convert unsigned enum class consts to static constexpr Part of https://github.com/harfbuzz/harfbuzz/issues/1553
Behdad Esfahbod 445364d8 2019-01-08T12:42:15 [iter] Rename hb_is_[sorted_]iterator() -> hb_is_[sorted_]iterator_of()
Behdad Esfahbod 8237809f 2019-01-07T22:00:45 [serialize] Make SortedArrayOf:;serialize() take sorted-iterator
Behdad Esfahbod 255085bd 2019-01-02T16:14:00 [iter] Const correctness
Behdad Esfahbod 415f3f43 2018-12-31T13:37:13 Add operator= to IntType, commented out https://github.com/harfbuzz/harfbuzz/pull/1510
Behdad Esfahbod a685bfe8 2018-12-30T20:24:21 Separate GlyphID from HBUINT16 For stricter enforcement.
Behdad Esfahbod 851fbb23 2018-12-30T18:45:50 [iter] Port Coverage::serialize to hb_is_iterator
Behdad Esfahbod 06a44e2e 2018-12-30T18:42:14 [iter/meta] Match hb_is_iterator<> using SFINAE By specifying Item type, which is desirable.
Behdad Esfahbod 3d22900f 2018-12-28T20:01:57 [meta] Don't use template default arguments for functions That's a C++11 extension apparently...
Behdad Esfahbod df138da2 2018-12-28T16:29:48 [iter/meta] Implement is_iterator Removes use of auto type deduction again, which was not supported on many bots.
Behdad Esfahbod 442f4a58 2018-12-28T14:34:00 [meta] Move more code here
Behdad Esfahbod 8c6cbbdf 2018-12-28T14:29:09 [iter/meta] Add hb_is_iterable
Behdad Esfahbod 49161d41 2018-12-26T22:50:33 [subset] Take iterator in ArrayOf serialize Still not satisfied with how I can enforce iterators only, but seems to work for now.
Behdad Esfahbod 7987095e 2019-01-09T01:02:38 [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.
Behdad Esfahbod a4ea0d36 2019-01-09T00:32:11 [iter] Change from const_iter_t/iter_t to iter_t/writer_t
Behdad Esfahbod 362d4e7c 2019-01-08T13:41:30 [iter] Implement for OT::ArrayOf / OT::SortedArrayOf
Behdad Esfahbod 2f837a36 2019-01-08T13:05:01 [SortedArrayOf] Fix sub_array() return type
Behdad Esfahbod 205d72a1 2019-01-17T18:10:38 Add NNOffsetTo<>
Behdad Esfahbod 474a1205 2018-12-21T18:46:51 [array/vector] Rename len to length
Behdad Esfahbod 879faa2a 2018-12-21T01:57:40 Rename
Behdad Esfahbod bd369773 2018-12-20T23:14:24 Rename
Behdad Esfahbod 5b70074e 2018-12-20T15:38:59 Add hb_assign(obj, value)
Behdad Esfahbod f1e95e40 2018-12-18T16:49:08 [arrays] Remove hb_supplier_t<>
Behdad Esfahbod cf39c242 2018-12-17T22:36:23 [arrays] Rename Supplier to hb_supplier_t
Ebrahim Byagowi e4120085 2018-12-17T21:31:01 Remove redundant void from C++ sources (#1486)
Ebrahim Byagowi 7ace1007 2018-12-17T20:07:04 Minor, fix two more ArrayOf incorrect operator logic
Behdad Esfahbod a1240383 2018-12-17T10:44:14 [arrays] Minor fix
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 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 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 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