src/hb-open-file.hh

Branch


Log

Author Commit Date CI Message
Behdad Esfahbod 7a890c2e 2024-09-22T13:19:02 Add hb_barrier() to switches of unions https://github.com/harfbuzz/harfbuzz/pull/4864#issuecomment-2366923736
Behdad Esfahbod 3a9262cc 2023-11-04T12:52:46 [sanitize] More hb_barrier() annotations
Behdad Esfahbod 2c359635 2023-06-26T18:28:11 [face-builder] Don't zero allocation We overwrite it.
Behdad Esfahbod 59c45f6d 2022-11-22T12:54:50 Use hb_memcpy instead of memcpy consistently
Behdad Esfahbod a0bde1e1 2022-11-16T21:27:12 [open-type] Remove (Sorted)ArrayOf.sub_array()
Behdad Esfahbod b57ea3b0 2022-08-05T14:29:27 Revert "[iter] Use && in uses of is_source_of" This reverts commit ccbba667a9bdc096f0053d5e3ee951a8b6298e8a.
Behdad Esfahbod ccbba667 2022-08-05T11:51:51 [iter] Use && in uses of is_source_of
Behdad Esfahbod f7a9c3ea 2021-08-05T13:05:07 [open-file] Use hb_is_source_of instead of hb_is_iterator
Behdad Esfahbod fa90cb8a 2021-08-05T12:31:06 Whitespace again
Behdad Esfahbod a110a47e 2021-08-05T12:28:39 Whitespace
Garret Rieger c2ee1fdd 2021-08-04T16:42:49 [subset] remove unsed table_entry struct.
Garret Rieger dea0fe57 2021-08-04T16:36:20 [subset] discard extra copies of a table in face builder. Fixes #2361. Stores tables in the builder in a hashmap so you end up with at most one copy of each table. Table serialization order is now based on tag sort order instead of order of insertion into the builder.
Behdad Esfahbod f0a1892f 2021-07-28T17:36:22 [serialize] Remove unnecessary pointer indirection
Behdad Esfahbod ba6db26b 2021-07-22T11:37:39 Tolerate unsorted OT table entries for small number of entries See comment. Fixes https://github.com/harfbuzz/harfbuzz/issues/3065
Behdad Esfahbod 03cd9c5c 2021-07-22T11:27:33 Align lfind() API to match bfind()
Behdad Esfahbod 29c9833e 2021-07-09T11:58:36 Remove Offset::serialize() Finishing https://github.com/harfbuzz/harfbuzz/pull/2355
Behdad Esfahbod 2520a82d 2021-03-31T15:34:26 s/LArrayOf/Array32Of/g
Behdad Esfahbod ad28f973 2021-03-31T12:49:14 Rename offset types to be explicit about their size Add Offset16To<>, Offset24To<>, and Offset32To<> for most use-cases.
Behdad Esfahbod 505b3fc6 2021-02-17T11:34:47 [harfbuzz.cc] Fix OffsetTable name clash with Mac headers There's no easy way to undo a "using namespace" in our sources, so by the time we get to include hb-coretext.cc from harfbuzz.cc, we already have "using namespace OT" active, which clashes with Mac headers. Error was: $ gcc -O3 -Wall -arch i386 -DHAVE_CORETEXT=1 -c harfbuzz.cc -o harfbuzz.o -std=c++11 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/TextUtils.h:288:3: error: reference to 'OffsetTable' is ambiguous OffsetTable offsets, ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/IntlResources.h:115:41: note: candidate found by name lookup is 'OffsetTable' typedef OffPair OffsetTable[3]; ^ ./hb-open-file.hh:81:16: note: candidate found by name lookup is 'OT::OffsetTable' typedef struct OffsetTable ^ 1 error generated.
Ebrahim Byagowi 25cf6874 2020-06-20T01:36:50 Use dagger in OffsetTable::get_table_tags (#2477)
Ebrahim Byagowi 2dda6dd7 2020-04-20T14:12:45 minor, tweak spacing turn 8 spaces to tab, add space before Null/Crap
Behdad Esfahbod 858b6279 2019-12-10T13:18:32 [machinery] Remove CastR<>()
Ebrahim Byagowi 0558413f 2019-10-01T13:49:55 Minor, tweak spaces
Ebrahim Byagowi a0b4ac4d 2019-08-24T17:57:14 Turn 8 spaces to tab across the project According to the current code style of the project
Ebrahim Byagowi a6065d05 2019-07-10T16:41:40 Don't call memcpy when a table is empty
Behdad Esfahbod 41248cce 2019-05-07T20:54:31 Remove MIN/MAX in favor of hb_min/hb_max
Ebrahim Byagowi 92588782 2019-04-30T13:05:10 Remove space between right angle brackets now that we have C++11 (#1689)
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 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 b986c6a3 2019-03-29T20:17:46 [C++11] Remove IntType::set() in favor of operator=
Behdad Esfahbod 6e1c3eaf 2019-01-28T14:12:41 Fix sign comparison error
Behdad Esfahbod b1152d5e 2019-01-17T18:17:04 Use NNOffsetTo<>
Behdad Esfahbod 474a1205 2018-12-21T18:46:51 [array/vector] Rename len to length
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)
Behdad Esfahbod 0d0fe9df 2018-12-16T22:29:40 [arrays] Remove need of stride in Supplier<>
Ebrahim Byagowi b2ebaa9a 2018-12-16T22:38:10 Remove redundant 'inline' from methods (#1483)
Behdad Esfahbod d77a098b 2018-11-24T10:06:13 [arrays] Improve bfind() interface Much more useful now. :)
Behdad Esfahbod 30cb45b3 2018-11-24T00:35:31 Change ArrayOf.bsearch() return semantics Towards consolidating all array bsearch/...
Behdad Esfahbod e2ffb33a 2018-11-23T16:24:28 Remove lsearch for small TableDirectorys
Behdad Esfahbod 72462eb7 2018-11-02T11:46:24 Add UnsizedArrayOf::as_array() instead of hb_array() template
Behdad Esfahbod 8d689f8a 2018-10-22T21:33:18 Add hb_array<>() specialization for UnsizedArrayOf Related https://github.com/harfbuzz/harfbuzz/issues/1301
Behdad Esfahbod abfbba19 2018-10-22T21:27:45 Add hb_array<>() Simplifies transient object creation. Fixes https://github.com/harfbuzz/harfbuzz/issues/1301
Behdad Esfahbod d7865107 2018-10-22T16:18:34 Remove const from hb_array_t details Will come in through <T> if desired.
Bruce Mitchener 257d0e5a 2018-10-19T22:49:21 Fix typos.
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 67449c39 2018-09-14T10:58:00 Don't dereference offset before check_struct()
Behdad Esfahbod ca746f26 2018-09-13T20:35:21 [dfont] Also check dataLen range in sanitize Just to disagree with myself re being done with this code...
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 180a88a9 2018-09-13T19:19:57 [dfont] Some more
Behdad Esfahbod 0ab0f1e5 2018-09-13T19:13:01 [dfont] Push methods further down
Behdad Esfahbod 8c9bdcc1 2018-09-13T19:08:22 [dfont] Minor
Behdad Esfahbod 4479d3a2 2018-09-13T19:05:59 [dfon]t Sanitize OpenTypeFontFace
Behdad Esfahbod 3fba4190 2018-09-13T18:49:16 [dfont] Minor
Behdad Esfahbod bf852f0e 2018-09-13T18:47:53 [dfont] Make test pass Offset 0 is not null in this context.
Behdad Esfahbod 82f4d776 2018-09-13T18:27:20 [dfont] Minor
Behdad Esfahbod dbb764dc 2018-09-13T16:49:26 [dfont] Clean up sanitize() I don't think I broke anything. Fuzzers will let me know..
Behdad Esfahbod bd75fd45 2018-09-11T18:12:26 [dfont] Some renaming, plus add link to reference doc
Behdad Esfahbod 4134ec13 2018-09-11T17:56:03 [dfont] Sanitize only sfnt resources as OpenTypeFontFile
Behdad Esfahbod 6b5e4d07 2018-09-11T17:26:24 [dfont] Minor
Behdad Esfahbod d5c50927 2018-09-11T17:18:21 [dfont] Fix test expecatation and minor touch up I have no way to authoritatively know, but looks like test font only has one face. So, adjust test expectation instead.
Behdad Esfahbod 9479ffef 2018-09-11T16:41:26 [dfont] Re-enable and fix offset handling Fixes https://github.com/harfbuzz/harfbuzz/pull/1085
Behdad Esfahbod a1814e2b 2018-09-11T14:45:23 Whitespace
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 22acd424 2018-08-31T16:38:04 [serialize] Add a couple small methods
Behdad Esfahbod c77ae408 2018-08-25T22:36:36 Rename hb-*private.hh to hb-*.hh Sorry for the noise, downstream custom builders. Please adjust.