Commit Graph

11560 Commits

Author SHA1 Message Date
Behdad Esfahbod 6d94194497 Use auto in range-for-loop more 2021-02-19 17:10:06 -07:00
justvanrossum 1551f3d518 fixing more expected test results 2021-02-19 16:53:21 -07:00
justvanrossum 79e4f436e7 Apply rounding correctly when calculating glyph extents for CFF and CFF2; adjust expected test results 2021-02-19 16:53:21 -07:00
justvanrossum d01ebeae21 calculate extents based on scaled then rounded values; undo two of the earlier test result adjustments 2021-02-19 16:53:21 -07:00
justvanrossum 1d02e9c63b two more adjusted expected extents results (still not convinced this is the right thing, though) 2021-02-19 16:53:21 -07:00
justvanrossum cd0babe6a6 adjust expected test result 2021-02-19 16:53:21 -07:00
justvanrossum 1d8a89504b do not round added deltas; fixes #2866 2021-02-19 16:53:21 -07:00
Behdad Esfahbod 103ed7da83 [subset] Use dagger
Better fix for https://github.com/harfbuzz/harfbuzz/pull/2858
2021-02-19 16:48:30 -07:00
Behdad Esfahbod d8ea552d10 [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.
2021-02-19 16:23:22 -07:00
Behdad Esfahbod cf203936d7 [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>;
2021-02-18 12:03:26 -07:00
Behdad Esfahbod b6fdaa6948 [minor:aat] Use injected class name 2021-02-18 11:16:37 -07:00
Behdad Esfahbod e27420bb18 [minor:aat] Simplify template reference 2021-02-18 11:15:46 -07:00
Behdad Esfahbod 7b8a8adb7d [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.
2021-02-18 09:47:24 -07:00
Behdad Esfahbod aa80c7c8b4 [aat] Add buffer->successful check before buffer->next_glyph() 2021-02-18 09:31:46 -07:00
Behdad Esfahbod bcd10bf274 [normalize] Add buffer success check before ->next_glyph()
Speculative fix for:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27843
2021-02-17 13:58:56 -07:00
Behdad Esfahbod 505b3fc6cf [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.
2021-02-17 11:34:47 -07:00
Behdad Esfahbod 6a9f576fd4 [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]
2021-02-17 11:31:32 -07:00
Behdad Esfahbod 8e53c7c125 [coretext] Fix more CGFloat double-promotion warnings
The warning is:
warning: implicit conversion increases floating-point precision: 'CGFloat' (aka 'float') to
      'double' [-Wdouble-promotion]
2021-02-17 11:12:56 -07:00
Behdad Esfahbod cd08c2528c Fix typo 2021-02-16 18:51:43 -07:00
Khaled Hosny 9c8032cb4b [meson] Don’t build FontConfig subproject from master
Pin it to a known working tag instead.
2021-02-16 22:20:26 +02:00
Garret Rieger 5ca353a2d0 [subset] fix heap buffer overflow found by fuzzer. 2021-02-16 12:43:02 -07:00
Behdad Esfahbod ae860db893
Merge pull request #2859 from harfbuzz/override-0b55
[indic] Fix shaping of U+0B55 ORIYA SIGN OVERLINE
2021-02-16 12:39:47 -07:00
David Corbett 751ed68fee [indic] Fix shaping of U+0B55 ORIYA SIGN OVERLINE
Fixes https://github.com/harfbuzz/harfbuzz/issues/2849
2021-02-14 12:47:34 -05:00
Behdad Esfahbod 7a60f4e3a4 [subset] Remove debug burden
Fixes https://github.com/harfbuzz/harfbuzz/issues/2360
2021-02-12 14:14:17 -07:00
Garret Rieger 00d9276343 Add gpos9 expected files to Makefile.am 2021-02-11 13:41:31 -07:00
Garret Rieger 08a4997fde [subset] Add subset support for Extension lookups (GPOS 9, GSUB 7). 2021-02-11 13:41:31 -07:00
Behdad Esfahbod bbbea3dbd8 [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.
2021-02-11 12:23:33 -07:00
Behdad Esfahbod cdb9197b41 [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.
2021-02-11 11:33:47 -07:00
Behdad Esfahbod dfa9d7acdc [minor] Use serializer->propagate_error() to simplify code 2021-02-11 11:19:51 -07:00
Behdad Esfahbod 5faae8260a [post] Remove unneeded error check 2021-02-11 10:58:02 -07:00
Behdad Esfahbod d7e2a51de2 [minor] Add unlikely() when checking for error 2021-02-11 10:55:03 -07:00
Behdad Esfahbod eb069f3948 [tests] Update expected output of recently-merged gpos5
The merged PR was from before landing this:

commit 7a72b20aa2
Author: Garret Rieger <grieger@google.com>
Date:   Thu Sep 24 15:58:48 2020 -0700

    [subset] Subset GDEF during layout subsetting tests.
2021-02-10 19:13:51 -07:00
Behdad Esfahbod c7d232ce4e
Merge pull request #2701 from googlefonts/Mark-To-Ligature_grieger
[subset] GPOS 5 MarkToLigature subsetting support
2021-02-10 18:13:38 -07:00
Behdad Esfahbod 68d576224f
Merge pull request #2853 from harfbuzz/fix-g-ir-scanner
[introspection] Fix g-ir-scanner syntax errors
2021-02-10 14:56:29 -07:00
Khaled Hosny 7b9e23f28b [introspection] Fix g-ir-scanner syntax errors
Fixes https://github.com/harfbuzz/harfbuzz/issues/2851
2021-02-10 23:37:43 +02:00
Khaled Hosny 094406b67b [ci] Disable failing Arch Linux job
Some g-ir-scanner failure that does not seem to be related to us. The
job does not seem to be testing anything interesting anyway.
2021-02-10 23:22:02 +02:00
Khaled Hosny 554aaa0c5d [build] Fix make distcheck
A regression from 7b77ce0507.
It was caught by the CI build in the PR, but apparently we are now used
to CI failures that they are effectively ignored.

Also, yay for multiple build systems.
2021-02-10 23:22:02 +02:00
Behdad Esfahbod 1da75afbe8 [minor] Add unlikely() 2021-02-10 00:03:41 -07:00
Behdad Esfahbod 6e1afac64b [minor] Rename internal variable
To address review comment:
https://github.com/harfbuzz/harfbuzz/pull/2699#discussion_r573370781
2021-02-09 18:48:46 -07:00
Behdad Esfahbod 836814a571 [array] Swap order of args to hb_equal()
Prioritizes Key::cmp() over table's cmp.
2021-02-09 18:48:05 -07:00
Behdad Esfahbod 98374cebe1 Conditionalize IntType::cmp() so it never fails to compile
Useful with lfind() since that calls hb_equal() which SFINAEs which
cmp() to use.
2021-02-09 18:48:05 -07:00
Behdad Esfahbod ed04174a64 Whitespace 2021-02-09 18:48:05 -07:00
Behdad Esfahbod 6a3fd94f3b
Merge pull request #2699 from googlefonts/gpos_8
[subset] Add a more complex layout subsetting test case and fix the issues it exposed.
2021-02-09 20:49:04 -05:00
Garret Rieger 8f47dd5779 [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.
2021-02-09 20:34:52 -05:00
Behdad Esfahbod feeff5928b [docs] Add destroy() call to sample 2021-02-09 14:59:40 -07:00
Khaled Hosny 319e5b3200 [manual] Fix font functions section
Fixes https://github.com/harfbuzz/harfbuzz/issues/2731
2021-02-09 23:22:22 +02:00
Khaled Hosny 3583fce86d [manual] Give all chapters & sections pretty links 2021-02-09 23:22:22 +02:00
Khaled Hosny 84d4d9fc4d [manual] We don’t use ucdn library anymore 2021-02-09 23:22:22 +02:00
Khaled Hosny 68d2e1b221 [meson] Disable benchmark feature by default
It downloads a dependency from the internet, and in the same time not
used anywhere (one needs to explicitly call ninja benchmark), not even
on the CI (not sure if it that would make much sense since it does not
seem to ever fail).
2021-02-09 22:10:20 +02:00
Khaled Hosny b6f47af555 [meson] Report more options in the summary 2021-02-09 22:10:20 +02:00