src


Log

Author Commit Date CI Message
Behdad Esfahbod a5b8e7db 2021-03-15T12:46:58 [hangul] Improve error handling I did a review; changed some "return"s to "break"s, which should be identical. Removed one check just before "continue" because not necessary. The added error check is the actual fix. Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=31755
Behdad Esfahbod 99767f93 2021-03-15T12:36:59 [hangul] Whitespace
Behdad Esfahbod 3622120f 2021-03-10T12:21:43 [subset] Make ClassDef format2 .intersects() return false if range value 0 We treat Class0 as "doesn't intersect". That's the only meaningful interpretation. If one allos Class0 to mean "intersects", then the intersects() result should be true iff glyphset is non-empty. Related to https://github.com/harfbuzz/harfbuzz/issues/2703
David Corbett e19de65e 2021-03-08T13:12:47 Update hb-ot-tag-table.hh (#2890)
Khaled Hosny 7686ff85 2021-03-04T23:09:32 [ot] Keep substituted Default_Ignorables (#2886) Don’t replace Default_Ignorables with zero-width space if they are substituted or multiplied, not just when ligated. After this change, HarfBuzz output matches that of Uniscribe and CoreText for the new tests. Fixes https://github.com/harfbuzz/harfbuzz/issues/2883
Behdad Esfahbod 5efa04c8 2021-03-02T16:26:41 [Makefile] Rebuild .def files if config changed I was getting check-symbols failure because my previous build was without CoreText, and after reconfiguring with CoreText, the old harfbuzz.defs file was not being regenerated.
Behdad Esfahbod d351bbf0 2021-03-02T16:24:54 [Makefile] Remove unused variable HBNODISTHEADERS Not sure what it was used for before.
Behdad Esfahbod fd489433 2021-03-02T16:21:17 [indic] Fix cluster-merging logic with cluster-level=1 Was producing non-monotonic cluster numbers because our faulty logic was not merging clusters if something from before base and after base had switched positions. Fixes https://github.com/harfbuzz/harfbuzz/issues/2272
Behdad Esfahbod 2902529b 2021-03-02T15:05:22 [subset] Fix HB_TINY build Fixes https://github.com/harfbuzz/harfbuzzjs/issues/34#issuecomment-789247723
Behdad Esfahbod 7cb22ba7 2021-03-01T12:44:06 Include C headers with their C++ names (#2882) Remove unnecessary includes. Fixes build with some known broken SDKs (Nintendo Switch?) https://en.cppreference.com/w/cpp/header Fixes https://github.com/harfbuzz/harfbuzz/pull/2881
Behdad Esfahbod 486da35c 2021-02-23T13:58:14 m Add comments to IntType cast out operator Okay, bots seem to be happy. Merging.
Behdad Esfahbod 83b66bfb 2021-02-23T13:04:25 Another try to fix narrowing error ../src/hb-ot-layout-gsubgpos.hh: In instantiation of ‘void OT::ChainRule::serialize_array(hb_serialize_context_t*, OT::HBUINT16, Iterator) const [with Iterator = hb_map_iter_t<hb_array_t<const OT::IntType<short unsigned int> >, const hb_map_t*&, (hb_function_sortedness_t)0, 0>; typename hb_enable_if<hb_is_iterator_of<Lhs, typename Lhs::item_t>::value>::type* <anonymous> = 0; OT::HBUINT16 = OT::IntType<short unsigned int>]’: ../src/hb-ot-layout-gsubgpos.hh:2341:30: required from here ../src/hb-ot-layout-gsubgpos.hh:2326:15: error: narrowing conversion of ‘(unsigned int)g’ from ‘unsigned int’ to ‘short unsigned int’ inside { } [-Werror=narrowing] c->copy (HBUINT16 {g}); ~~~~~~~~^~~~~~~~~~~~~~ https://github.com/harfbuzz/harfbuzz/pull/2875
Behdad Esfahbod 6c4bb608 2021-02-22T22:45:32 Fix narrowing errors with recent changes
Behdad Esfahbod d6bd00a4 2021-02-22T22:42:50 Revert back IntType out cast to signed/unsigned Previous commit didn't fix the bots. Putting it back now that I understand why I initially did the "Wide" casts. But only doing it for out-cast this time. This causes "narrowing" warnings whenever we are converting signed/unsigned to smaller HBUINT16 etc. But those are valuable warnings. We should address those separately instead of ignoring. Maybe we should start using uint16_t more liberally in the internal subsetter function signatures then.
Behdad Esfahbod 09836013 2021-02-22T22:33:17 Add back wider cast to IntType My local clang12 is fine, but many bots are not: ../src/hb-ot-cff1-table.hh: In instantiation of ‘bool CFF::Charset1_2<TYPE>::sanitize(hb_sanitize_context_t*, unsigned int) const [with TYPE = OT::IntType<unsigned char>]’: ../src/hb-ot-cff1-table.hh:554:13: required from here ../src/hb-ot-cff1-table.hh:377:60: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (unlikely (!ranges[i].sanitize (c) || (num_glyphs < ranges[i].nLeft + 1))) ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ Enabling the extra cast operator mentioned in previous commit to see if that fixes this case. Again, I'd be happy to say "use 1u instead of 1" if this was universally erred on. But since some compilers happily compile this while others err, it would be a huge headache. Let's see... https://github.com/harfbuzz/harfbuzz/pull/2875
Behdad Esfahbod 567cedcc 2021-02-22T22:09:15 Narrow down cast operators on IntType Say for USHORT, we were implementing casts from and to unsigned. With this change, we cast from and to uint16_t only. This allows compiler more opportunities to catch possible narrowing issues in the code. It needed a couple of fixes in the codebase though, because previously, if a USHORT was participating in arithmetic with signed numbers, eg. "u + 1", the result would have been unsigned. With this change, it would be signed. The correct fix is to update the code to read "u + 1u". That said, I think about conditionally adding back the cast out to signed/unsigned, to facilitate better type deduction. But I couldn't think of a real situation where that would help with anything. So I didn't add. Here's what it was: template <typename Type2 = hb_conditional<hb_is_signed (Type), signed, unsigned>, hb_enable_if (sizeof (Type) < sizeof (Type2))> operator hb_type_identity_t<Type2> () const { return v; } https://github.com/harfbuzz/harfbuzz/pull/2875
Behdad Esfahbod f4f35a4d 2021-02-22T22:28:32 [constexpr] Use initializer instead of assignment
Behdad Esfahbod cc16b26e 2021-02-22T17:55:47 [constexpr] IntType See https://github.com/harfbuzz/harfbuzz/pull/2875
Behdad Esfahbod 8b2f9adf 2021-02-22T17:42:24 m Simplify Tag operator char*
Behdad Esfahbod 021a1725 2021-02-22T17:40:22 Merge pull request #2874 from harfbuzz/constexpr2 Some more cleanup towards using constexpr to simplify our internal datastrcutures. https://github.com/harfbuzz/harfbuzz/pull/2874
Behdad Esfahbod b368a073 2021-02-22T17:23:53 [atomic] Remove IBM/AIX implementation The C++11 implementation shall be enough for everyone.
Behdad Esfahbod 52f91269 2021-02-22T17:22:09 [atomic] Remove Windows implementation Since we require C++11 now, there's no point to do a macro version check. Which means we don't hit the MSVC issue defining __cplusplus wrongly.
Behdad Esfahbod a666fe64 2020-06-29T10:43:49 [atomic] Comment
Behdad Esfahbod 3528a21e 2020-06-29T10:40:21 [atomic] Remove Apple implementation Continuation of https://github.com/harfbuzz/harfbuzz/pull/676
Behdad Esfahbod 140797d4 2020-06-29T03:51:09 [constexpr] hb_atomic_int_t
Behdad Esfahbod 2ec802b4 2020-06-29T03:48:38 [object] Simplify reference_count_t
Behdad Esfahbod 12a283d5 2021-02-22T12:50:41 m[ft] No need to use atomic ops for cached_x_scale We have added a mutex since, so no need for atomicity.
Behdad Esfahbod a3c35aee 2020-06-29T02:07:20 m Move HB_SCRIPT_MYANMAR_ZAWGYI
Behdad Esfahbod c55bf551 2020-06-29T02:04:16 Remove HB_CONST_FUNC and HB_PURE_FUNC They are not necessary for inline functions.
Behdad Esfahbod cba9893a 2020-06-29T01:55:57 m[algs] Move roundf() here
Behdad Esfahbod f0947717 2020-06-29T01:53:21 m[machinery] Move HB_VAR_ARRAY here
Behdad Esfahbod 69464e9d 2021-02-20T15:42:44 [algs] Another try at fixing BEInt constexpr ../src/hb-algs.hh:120:3: error: body of constexpr function ‘constexpr BEInt<Type, 2>::operator Type() const [with Type = short unsigned int]’ not a return-statement
Behdad Esfahbod ff7bf881 2021-02-20T15:39:29 m[algs] Fix BEInt -Wnarrowing errors
Behdad Esfahbod a89d9f25 2021-02-20T15:35:28 m Err on -Wnarrowing instead of -Wc++11-narrowing On clang, -Wnarrowing is synonym for -Wc++11-narrowing. On gcc it isn't. So, use the widely-available one
Behdad Esfahbod e208f804 2021-02-20T15:31:27 Make constexpr BEInt<Type, 2>::operator Type() C++11-compatible Multiple return values not permitted until C++14
Behdad Esfahbod c2fc2aa4 2020-06-29T01:49:28 [atomic] Remove Solaris intrinsics
Behdad Esfahbod 7099a6dc 2020-06-29T01:47:37 [atomic] Remove old Intel primitives implementation
Behdad Esfahbod 711c241f 2020-06-29T01:40:30 m[mutex] Remove busyloop mutex implemenation Don't know why I ever added this. :)
Behdad Esfahbod 47f01c07 2020-06-29T01:25:35 m[algs] Move BEInt here
Behdad Esfahbod e5b7bc42 2020-06-29T01:24:02 m Add default value to BEInt<> Size template parameter
Behdad Esfahbod 2caae4a5 2020-06-29T01:18:28 m Move class traits
Behdad Esfahbod c2dbd6cc 2020-06-29T01:15:36 Remove static_assert of sizeof basic sized int types
Behdad Esfahbod e1706ffe 2020-06-29T00:59:06 m [algs] Move flags here
Behdad Esfahbod 017f6b0d 2020-06-29T00:44:41 m Move static_assert_expr<>
Behdad Esfahbod 61f8d0e5 2020-06-29T00:38:56 m Rename ASSERT_STATIC_EXPR_ZERO to static_assert_expr
Behdad Esfahbod 59cfffb1 2020-06-29T00:34:07 m Change ASSERT_STATIC_EXPR_ZERO template arg type to bool
Behdad Esfahbod 1981d83d 2020-06-29T00:28:31 [constexpr] HB_MARK_AS_FLAG_T
Behdad Esfahbod a4a99de0 2020-06-29T00:22:02 [constexpr] bswap
Behdad Esfahbod f8ebe1da 2020-06-29T00:20:45 [constexpr] BEInt
Behdad Esfahbod 445efe8d 2020-06-28T20:59:01 m[vector] Recover vector from error in .reset()
Behdad Esfahbod 21433fa5 2020-06-28T20:46:02 m[buffer] In hb_buffer_append() don't change until allocation success
Behdad Esfahbod 0f61a621 2020-06-28T20:40:25 m[vowels] Simplify If we didn't "process" anything, swap_buffers() becomes a no-op.
Behdad Esfahbod 3b91e0b5 2020-06-28T20:33:54 m[buffer] Rename internal variable
Behdad Esfahbod 9fcba109 2020-06-28T20:30:39 [buffer] Make swap_buffers() copy rest
Behdad Esfahbod 2fbd34f8 2020-06-28T22:41:09 m[set/map] Add operator bool() Probably should use in places..
Behdad Esfahbod bf75a0a0 2021-02-19T18:18:38 m[dispatch] Use inline class member initialization Let's see how bots like this...
Behdad Esfahbod 82928d9c 2020-06-28T22:03:57 m[blob] Move immutable check to C API boundary Similarly to 08ed9e3f779253e3b5f01c38d44d0e5db2d5e7aa
Behdad Esfahbod 4020c6b2 2020-06-28T21:59:46 m[blob] An empty blob can always be made writable
Behdad Esfahbod 2d39031f 2020-06-28T20:48:48 [buffer/set/map] Move immutable check only to C API boundary The immutable objects are a concept only enforced by the C API. So move checks only to that region. This does assume that the rest of the code is careful not getting into these internal methods on immutable objects, which something we do, but have no way of enforcing (currently). .
Behdad Esfahbod 6d83d440 2020-06-28T21:02:51 m[set] Recover set from error in .reset()
Behdad Esfahbod 86993c09 2021-02-19T17:09:33 Ignore -Wrange-loop-analysis Fixes https://github.com/harfbuzz/harfbuzz/issues/2834
Behdad Esfahbod 6d941944 2021-02-19T17:08:10 Use auto in range-for-loop more
justvanrossum 79e4f436 2021-02-17T10:21:58 Apply rounding correctly when calculating glyph extents for CFF and CFF2; adjust expected test results
justvanrossum d01ebeae 2021-02-17T10:13:54 calculate extents based on scaled then rounded values; undo two of the earlier test result adjustments
justvanrossum 1d8a8950 2021-02-16T20:55:16 do not round added deltas; fixes #2866
Behdad Esfahbod 103ed7da 2021-02-19T16:48:30 [subset] Use dagger Better fix for https://github.com/harfbuzz/harfbuzz/pull/2858
Behdad Esfahbod d8ea552d 2021-02-18T12:07:46 [aat] Improve unsafe-to-break logic Reduces false-positives. See comments for new logic. Fixes https://github.com/harfbuzz/harfbuzz/issues/2860 Adjusts run-tests.sh to allow unhashed absolute filenames.
Behdad Esfahbod cf203936 2021-02-18T12:03:26 [aat] Unbreak builds Some compilers don't like this: ../src/hb-aat-layout-common.hh:732:9: error: declaration of 'using StateTable = struct AAT::StateTable<Types, EntryData>' changes meaning of 'StateTable' [-fpermissive] 732 | using StateTable = StateTable<Types, EntryData>;
Behdad Esfahbod b6fdaa69 2021-02-18T11:16:37 [minor:aat] Use injected class name
Behdad Esfahbod e27420bb 2021-02-18T11:15:25 [minor:aat] Simplify template reference
Behdad Esfahbod 7b8a8adb 2021-02-18T09:47:24 [aat] Fix unsafe-to-break marking when end-of-text action kicks in The state we are dealing with here is the previous state; so it should cause unsafe_to_break before current glyph. I'm surprised this wasn't caught by any tests. Guess we don't have any fonts with fancy end-of-text forms.
Behdad Esfahbod aa80c7c8 2021-02-18T09:31:46 [aat] Add buffer->successful check before buffer->next_glyph()
Behdad Esfahbod bcd10bf2 2021-02-17T13:58:56 [normalize] Add buffer success check before ->next_glyph() Speculative fix for: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27843
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.
Behdad Esfahbod 6a9f576f 2021-02-17T11:31:32 [coretext] Silence CoreText deprecation warning As suggested by Ned, just ignoring it. warning: 'CTGetCoreTextVersion' is deprecated: first deprecated in macOS 11.0 - Use -[NSProcessInfo operatingSystemVersion] [-Wdeprecated-declarations]
Behdad Esfahbod 8e53c7c1 2021-02-17T11:12:56 [coretext] Fix more CGFloat double-promotion warnings The warning is: warning: implicit conversion increases floating-point precision: 'CGFloat' (aka 'float') to 'double' [-Wdouble-promotion]
Garret Rieger 5ca353a2 2021-02-12T15:16:59 [subset] fix heap buffer overflow found by fuzzer.
David Corbett 751ed68f 2021-02-14T12:47:34 [indic] Fix shaping of U+0B55 ORIYA SIGN OVERLINE Fixes https://github.com/harfbuzz/harfbuzz/issues/2849
Behdad Esfahbod 7a60f4e3 2021-02-12T14:14:17 [subset] Remove debug burden Fixes https://github.com/harfbuzz/harfbuzz/issues/2360
Garret Rieger 08a4997f 2020-10-06T13:02:12 [subset] Add subset support for Extension lookups (GPOS 9, GSUB 7).
Behdad Esfahbod bbbea3db 2021-02-11T12:23:33 [minor] Rewrite set operation in OS/2 subsetting This patch could be nicer: https://github.com/harfbuzz/harfbuzz/pull/2572/files Just tiny touchup now.
Behdad Esfahbod cdb9197b 2021-02-11T11:32:49 [khmer] Remove more unused code Prodded by https://github.com/harfbuzz/harfbuzz/pull/2583 These are leftovers from when we forked Khmer shaper from the Indic shaper.
Behdad Esfahbod dfa9d7ac 2021-02-11T11:08:52 [minor] Use serializer->propagate_error() to simplify code
Behdad Esfahbod 5faae826 2021-02-11T10:58:02 [post] Remove unneeded error check
Behdad Esfahbod d7e2a51d 2021-02-11T10:55:03 [minor] Add unlikely() when checking for error
Behdad Esfahbod c7d232ce 2021-02-10T18:13:38 Merge pull request #2701 from googlefonts/Mark-To-Ligature_grieger [subset] GPOS 5 MarkToLigature subsetting support
Khaled Hosny 7b9e23f2 2021-02-10T23:37:43 [introspection] Fix g-ir-scanner syntax errors Fixes https://github.com/harfbuzz/harfbuzz/issues/2851
Behdad Esfahbod 1da75afb 2021-02-10T00:03:30 [minor] Add unlikely()
Behdad Esfahbod 6a3fd94f 2021-02-09T20:49:04 Merge pull request #2699 from googlefonts/gpos_8 [subset] Add a more complex layout subsetting test case and fix the issues it exposed.
Behdad Esfahbod 6e1afac6 2021-02-09T18:48:46 [minor] Rename internal variable To address review comment: https://github.com/harfbuzz/harfbuzz/pull/2699#discussion_r573370781
Behdad Esfahbod 836814a5 2021-02-05T13:41:19 [array] Swap order of args to hb_equal() Prioritizes Key::cmp() over table's cmp.
Behdad Esfahbod 98374ceb 2021-02-05T13:40:10 Conditionalize IntType::cmp() so it never fails to compile Useful with lfind() since that calls hb_equal() which SFINAEs which cmp() to use.
Behdad Esfahbod ed04174a 2021-02-05T13:36:46 Whitespace
Garret Rieger 8f47dd57 2020-11-04T11:05:22 [subset] don't set lookup visited in closure_lookups_context_t::recurse. - Lookup::closure_lookups also checks if the lookups visited and sets the lookup to visited. If we set visited in 'recurse' then Lookup::closure_lookups will fail to recurse into the children of the lookup. - Also when copying ChainRule's skip LookupRecord's that point to lookups which aren't retained. This matches FontTool's behaviour.
josephshen d9e0244c 2021-02-02T16:04:44 remove duplicate file names
Behdad Esfahbod 769c2b19 2021-01-29T11:40:59 [indic/khmer/myanmar/use] Minor shuffling of found_syllable() macros
Behdad Esfahbod 59721c2f 2021-01-29T11:34:59 [use] Move data table into same compilation unit
Behdad Esfahbod d9b167da 2021-01-28T20:40:42 [use] Remove hb-ot-shape-complex-use.hh Inline into ragel machine.
Behdad Esfahbod 3bb2653a 2021-01-28T20:36:51 [use] Reuse category numbers exported from ragel machine Part of https://github.com/harfbuzz/harfbuzz/pull/2726
Behdad Esfahbod c417e0d2 2021-01-28T20:27:59 [indic/khmer/myanmar/use] Move enum category around Such that the generated -machine.hh headers are independent.