platform/upstream/libHarfBuzzSharp.git
6 years ago[ci] Build glib and freetype and enable msan bot (#1198)
Ebrahim Byagowi [Sat, 29 Sep 2018 20:45:25 +0000 (00:15 +0330)]
[ci] Build glib and freetype and enable msan bot (#1198)

6 years agoMinor on test-multithread, align the actual and expected results
Ebrahim Byagowi [Sat, 29 Sep 2018 06:49:54 +0000 (10:19 +0330)]
Minor on test-multithread, align the actual and expected results

6 years ago[circleci] Add -Wno-reserved-id-macro to clang-everything
Ebrahim Byagowi [Sat, 29 Sep 2018 06:46:14 +0000 (10:16 +0330)]
[circleci] Add -Wno-reserved-id-macro to clang-everything

6 years ago[test-multithread] Disable FreeType funcs
Behdad Esfahbod [Sat, 29 Sep 2018 00:53:07 +0000 (20:53 -0400)]
[test-multithread] Disable FreeType funcs

6 years agoFix fallback kerning to check for current glyph's mask
Behdad Esfahbod [Fri, 28 Sep 2018 15:16:18 +0000 (11:16 -0400)]
Fix fallback kerning to check for current glyph's mask

6 years ago[circleci] Improve clang-everything bot log, more to come
Ebrahim Byagowi [Fri, 28 Sep 2018 23:40:13 +0000 (03:10 +0330)]
[circleci] Improve clang-everything bot log, more to come

#1196

6 years ago[ci] Another try on mingw bot
Ebrahim Byagowi [Fri, 28 Sep 2018 22:41:05 +0000 (02:11 +0330)]
[ci] Another try on mingw bot

6 years ago[ci] Another try on fixing mingw bots
Ebrahim Byagowi [Fri, 28 Sep 2018 22:27:50 +0000 (01:57 +0330)]
[ci] Another try on fixing mingw bots

Per https://github.com/Alexpux/MSYS2-packages/issues/163#issuecomment-73555971

6 years ago[tests] Don't try to get glyph names on failures
Ebrahim Byagowi [Fri, 28 Sep 2018 17:23:48 +0000 (20:53 +0330)]
[tests] Don't try to get glyph names on failures

As it may cause a race unrelated to the issue actually happened

6 years ago[ci] Trying to fix mingw bot
Ebrahim Byagowi [Fri, 28 Sep 2018 17:17:21 +0000 (20:47 +0330)]
[ci] Trying to fix mingw bot

As https://github.com/Alexpux/MSYS2-packages/issues/702

6 years agoFix pthread fail for real
Behdad Esfahbod [Fri, 28 Sep 2018 15:06:49 +0000 (11:06 -0400)]
Fix pthread fail for real

Using a hack...

6 years agoFix bot fails
Behdad Esfahbod [Fri, 28 Sep 2018 14:55:28 +0000 (10:55 -0400)]
Fix bot fails

6 years ago[morx] Remove mark_set from Insertion
Behdad Esfahbod [Fri, 28 Sep 2018 14:14:23 +0000 (10:14 -0400)]
[morx] Remove mark_set from Insertion

text-rendering-tests test MORX-32 shows that for Insertion, an unset mark is treated
as mark set at 0.  This is unlike the Reordering lookup where un unset mark performs
nothing.

Fixes MORX-32.

6 years ago[morx] unsafe-to-break in Insertion
Behdad Esfahbod [Fri, 28 Sep 2018 14:00:07 +0000 (10:00 -0400)]
[morx] unsafe-to-break in Insertion

Makes MORX-29, MORX-30, MORX-31 pass.

6 years ago[test/text-rendering-tests] Update from upstream
Behdad Esfahbod [Fri, 28 Sep 2018 13:51:35 +0000 (09:51 -0400)]
[test/text-rendering-tests] Update from upstream

6 years agoFix ubsan bot
Behdad Esfahbod [Fri, 28 Sep 2018 13:47:45 +0000 (09:47 -0400)]
Fix ubsan bot

6 years agoMore atomic tuneup
Behdad Esfahbod [Fri, 28 Sep 2018 13:13:14 +0000 (09:13 -0400)]
More atomic tuneup

6 years ago[test-multithread] Install ot funcs before filling ref buffer
Behdad Esfahbod [Fri, 28 Sep 2018 12:45:57 +0000 (08:45 -0400)]
[test-multithread] Install ot funcs before filling ref buffer

6 years ago[test-multithread] Take num-threads and num-iters from command-line
Behdad Esfahbod [Fri, 28 Sep 2018 12:43:37 +0000 (08:43 -0400)]
[test-multithread] Take num-threads and num-iters from command-line

6 years agoMinor
Behdad Esfahbod [Fri, 28 Sep 2018 12:33:26 +0000 (08:33 -0400)]
Minor

6 years agotest-multithread, check the results on every iteration (#1194)
Ebrahim Byagowi [Fri, 28 Sep 2018 12:43:01 +0000 (16:13 +0330)]
test-multithread, check the results on every iteration (#1194)

6 years agoMake test-multithread pass the tsan bot test (#1193)
Ebrahim Byagowi [Fri, 28 Sep 2018 12:31:15 +0000 (16:01 +0330)]
Make test-multithread pass the tsan bot test (#1193)

6 years agoMore atomic fixup
Behdad Esfahbod [Thu, 27 Sep 2018 21:23:24 +0000 (17:23 -0400)]
More atomic fixup

6 years agoFixup atomics from recent change
Behdad Esfahbod [Thu, 27 Sep 2018 21:20:26 +0000 (17:20 -0400)]
Fixup atomics from recent change

6 years ago[cache] Use atomic writes in clear()
Behdad Esfahbod [Thu, 27 Sep 2018 20:54:23 +0000 (16:54 -0400)]
[cache] Use atomic writes in clear()

To help TSan.

6 years agoFix infinite loop when walking up the directory hierarchy (#1183)
Volker Krause [Thu, 27 Sep 2018 14:33:49 +0000 (16:33 +0200)]
Fix infinite loop when walking up the directory hierarchy (#1183)

A single find_package(harfbuzz) line in user code resulted in this loop
getting stuck when _harfbuzz_libdir_iter became "/".

6 years agoUse clang for compiling freetype for tsan bot
Ebrahim Byagowi [Thu, 27 Sep 2018 08:23:17 +0000 (11:53 +0330)]
Use clang for compiling freetype for tsan bot

6 years ago[arabic] Do the joiner-flipping only for rlig feature
Behdad Esfahbod [Wed, 26 Sep 2018 22:42:37 +0000 (18:42 -0400)]
[arabic] Do the joiner-flipping only for rlig feature

See comment.

6 years ago[ft] Make TSan happy
Behdad Esfahbod [Wed, 26 Sep 2018 20:40:23 +0000 (16:40 -0400)]
[ft] Make TSan happy

6 years agoAdd more atomic intrinsics
Behdad Esfahbod [Wed, 26 Sep 2018 20:37:18 +0000 (16:37 -0400)]
Add more atomic intrinsics

6 years agoRename test
Behdad Esfahbod [Wed, 26 Sep 2018 20:29:35 +0000 (16:29 -0400)]
Rename test

6 years ago[ci] Compile freetype on tsan and put sanitizer flags on correct places (#1188)
Ebrahim Byagowi [Wed, 26 Sep 2018 20:38:06 +0000 (00:08 +0330)]
[ci] Compile freetype on tsan and put sanitizer flags on correct places (#1188)

6 years agoTest freetype funcs on test-multithread (#1187)
Ebrahim Byagowi [Wed, 26 Sep 2018 20:02:45 +0000 (23:32 +0330)]
Test freetype funcs on test-multithread (#1187)

6 years agoMinor, remove the no longer needed comment on test-multithread
Ebrahim Byagowi [Wed, 26 Sep 2018 19:23:02 +0000 (22:53 +0330)]
Minor, remove the no longer needed comment on test-multithread

6 years agoMake TSan happy with make_immutable()
Behdad Esfahbod [Wed, 26 Sep 2018 19:03:07 +0000 (15:03 -0400)]
Make TSan happy with make_immutable()

6 years agoFix test-multithread and increase num_threads to 30
Behdad Esfahbod [Wed, 26 Sep 2018 19:02:21 +0000 (15:02 -0400)]
Fix test-multithread and increase num_threads to 30

What were you thinking? ;)

6 years agoAdd a multithreaded test (#1184)
Ebrahim Byagowi [Wed, 26 Sep 2018 17:20:51 +0000 (20:50 +0330)]
Add a multithreaded test (#1184)

6 years ago[hb-view] Change subpixel bits from 8 to 6
Behdad Esfahbod [Wed, 26 Sep 2018 16:13:47 +0000 (12:13 -0400)]
[hb-view] Change subpixel bits from 8 to 6

To match FreeType units, such that FreeType gets correct size from us.
This matters more now that we allow setting --ft-load-flags.

6 years agoFix iOS build
Behdad Esfahbod [Tue, 25 Sep 2018 16:47:37 +0000 (12:47 -0400)]
Fix iOS build

Fixes https://github.com/harfbuzz/harfbuzz/pull/1179

6 years ago[circle] Add an obsessive clang bot (#1178)
Ebrahim Byagowi [Tue, 25 Sep 2018 05:54:35 +0000 (09:24 +0330)]
[circle] Add an obsessive clang bot (#1178)

6 years agoDisable msan bot again
Behdad Esfahbod [Mon, 24 Sep 2018 23:43:01 +0000 (19:43 -0400)]
Disable msan bot again

Fixes https://github.com/harfbuzz/harfbuzz/issues/1175

6 years agoMinor
Behdad Esfahbod [Mon, 24 Sep 2018 23:07:23 +0000 (19:07 -0400)]
Minor

6 years agoMore iter inits
Behdad Esfahbod [Mon, 24 Sep 2018 22:30:50 +0000 (18:30 -0400)]
More iter inits

6 years agoMinor
Behdad Esfahbod [Mon, 24 Sep 2018 22:11:59 +0000 (18:11 -0400)]
Minor

6 years agoRemove F_COMBINE
Behdad Esfahbod [Mon, 24 Sep 2018 22:03:34 +0000 (18:03 -0400)]
Remove F_COMBINE

Now I wonder if any bots will be unhappy we calling | in static const initializations...
Or would that cost runtime init?  Our tests don't detect any..

6 years agoSome more
Behdad Esfahbod [Mon, 24 Sep 2018 22:01:53 +0000 (18:01 -0400)]
Some more

6 years agoMinor refactoring
Behdad Esfahbod [Mon, 24 Sep 2018 21:55:03 +0000 (17:55 -0400)]
Minor refactoring

6 years ago[circleci] Update sanitizer bots with newer clang and Ubuntu version (#1176)
Ebrahim Byagowi [Mon, 24 Sep 2018 21:30:32 +0000 (01:00 +0330)]
[circleci] Update sanitizer bots with newer clang and Ubuntu version (#1176)

6 years ago[msan] Enable again to get a build log, and try to play with suppressions
Behdad Esfahbod [Mon, 24 Sep 2018 21:22:39 +0000 (17:22 -0400)]
[msan] Enable again to get a build log, and try to play with suppressions

6 years ago[ubsan] Re-enable now that it passes locally
Behdad Esfahbod [Mon, 24 Sep 2018 17:12:15 +0000 (13:12 -0400)]
[ubsan] Re-enable now that it passes locally

6 years ago[check-static-inits.sh] Allow some if ubsan is in effect
Behdad Esfahbod [Mon, 24 Sep 2018 17:11:34 +0000 (13:11 -0400)]
[check-static-inits.sh] Allow some if ubsan is in effect

6 years ago[check-symbols.sh] Allow weak objects "V"
Behdad Esfahbod [Mon, 24 Sep 2018 17:04:48 +0000 (13:04 -0400)]
[check-symbols.sh] Allow weak objects "V"

ubsan generates these.

6 years agoLink API test programs with C++ linker
Behdad Esfahbod [Mon, 24 Sep 2018 17:01:35 +0000 (13:01 -0400)]
Link API test programs with C++ linker

Needed to make ubsan work.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1174

6 years ago[msan] Add MSAN_OPTIONS=exitcode=42
Behdad Esfahbod [Mon, 24 Sep 2018 16:52:42 +0000 (12:52 -0400)]
[msan] Add MSAN_OPTIONS=exitcode=42

Default exit value is 77, which causes autotools to "skip" test.

6 years ago[circleci] Disable msan and ubsan builds
Behdad Esfahbod [Mon, 24 Sep 2018 16:43:29 +0000 (12:43 -0400)]
[circleci] Disable msan and ubsan builds

https://github.com/harfbuzz/harfbuzz/issues/1174
https://github.com/harfbuzz/harfbuzz/issues/1175

6 years agoIgnore weak symbols in check-symbols.sh
Behdad Esfahbod [Mon, 24 Sep 2018 15:52:22 +0000 (11:52 -0400)]
Ignore weak symbols in check-symbols.sh

Some clang versions leave a std::round(float) weak symbol around...

6 years ago[docs] A few improvements
Behdad Esfahbod [Mon, 24 Sep 2018 14:43:06 +0000 (10:43 -0400)]
[docs] A few improvements

If we wrote just this much every day...

6 years agoReadjust Hebrew composition again
Behdad Esfahbod [Mon, 24 Sep 2018 13:57:52 +0000 (09:57 -0400)]
Readjust Hebrew composition again

6 years agoRevert change that would decompose text if GPOS mark feature is available
Behdad Esfahbod [Mon, 24 Sep 2018 13:56:18 +0000 (09:56 -0400)]
Revert change that would decompose text if GPOS mark feature is available

https://github.com/harfbuzz/harfbuzz/issues/653#issuecomment-423905920

6 years agoFix normalization
Behdad Esfahbod [Mon, 24 Sep 2018 13:54:37 +0000 (09:54 -0400)]
Fix normalization

https://github.com/harfbuzz/harfbuzz/commit/62d1e0852a5549a1b510ad46a4b89f12730bb708#commitcomment-30613091

6 years agoSimplify ZWJ-skipping a bit
Behdad Esfahbod [Mon, 24 Sep 2018 02:33:38 +0000 (22:33 -0400)]
Simplify ZWJ-skipping a bit

Towards disabling ZWJ-skipping in certain GPOS contexts.

Part of https://github.com/flutter/flutter/issues/16886

6 years agoReinit skippy iters when auto_zwj / auto_zwnj change
Behdad Esfahbod [Mon, 24 Sep 2018 02:00:34 +0000 (22:00 -0400)]
Reinit skippy iters when auto_zwj / auto_zwnj change

Ouch.  How did we not hit this bug before...

6 years agoPrefer decomposed form if font has GPOS mark feature
Behdad Esfahbod [Mon, 24 Sep 2018 01:32:18 +0000 (21:32 -0400)]
Prefer decomposed form if font has GPOS mark feature

Fixes https://github.com/harfbuzz/harfbuzz/issues/653

6 years ago[ot-font] Fix leak
Behdad Esfahbod [Sun, 23 Sep 2018 23:12:52 +0000 (19:12 -0400)]
[ot-font] Fix leak

Fixes https://github.com/harfbuzz/harfbuzz/issues/1171

I'm glad we have leak-detector bots now.

6 years agoAdd bots with address- and thread-sanitizer
Ebrahim Byagowi [Sat, 22 Sep 2018 10:52:17 +0000 (14:22 +0330)]
Add bots with address- and thread-sanitizer

6 years agosrc/hb-blob.cc: Fix mmap functionality with UWP.
Matt Oliver [Sun, 23 Sep 2018 08:08:30 +0000 (18:08 +1000)]
src/hb-blob.cc: Fix mmap functionality with UWP.

6 years ago[test] Fix printing subprocess error messages
Khaled Hosny [Sat, 22 Sep 2018 14:41:56 +0000 (16:41 +0200)]
[test] Fix printing subprocess error messages

Decode the string as Python 3 returns bytes string, and also don’t
assume that it ends with a new line.

6 years agoFix test-subset-* leak issues
Ebrahim Byagowi [Sat, 22 Sep 2018 13:54:03 +0000 (17:24 +0330)]
Fix test-subset-* leak issues

See also https://github.com/harfbuzz/harfbuzz/pull/1169

6 years agoFix test-ot-math leak issue
Ebrahim Byagowi [Sat, 22 Sep 2018 13:35:52 +0000 (17:05 +0330)]
Fix test-ot-math leak issue

See also https://github.com/harfbuzz/harfbuzz/pull/1169

6 years agoFix test-set leak issue
Ebrahim Byagowi [Sat, 22 Sep 2018 13:19:23 +0000 (16:49 +0330)]
Fix test-set leak issue

See also https://github.com/harfbuzz/harfbuzz/pull/1169

6 years agoFix test-font leak issue
Ebrahim Byagowi [Sat, 22 Sep 2018 13:15:31 +0000 (16:45 +0330)]
Fix test-font leak issue

See also https://github.com/harfbuzz/harfbuzz/pull/1169

6 years ago[morx] Fix mark_set check
Behdad Esfahbod [Thu, 20 Sep 2018 02:34:09 +0000 (22:34 -0400)]
[morx] Fix mark_set check

6 years ago[aat] Minor
Behdad Esfahbod [Wed, 19 Sep 2018 21:32:21 +0000 (17:32 -0400)]
[aat] Minor

6 years ago[coretext] Minor
Behdad Esfahbod [Wed, 19 Sep 2018 21:10:26 +0000 (17:10 -0400)]
[coretext] Minor

6 years ago[morx] Implement forward/backward processing
Behdad Esfahbod [Wed, 19 Sep 2018 20:46:41 +0000 (16:46 -0400)]
[morx] Implement forward/backward processing

We reverse too many times. Can be optimized. But I doubt many fonts
use reverse lookups, so doesn't matter.

Other than not applying user features, this completes morx table
implementation.

6 years ago[morx] Implement horiz-only/vert-only subtables
Behdad Esfahbod [Wed, 19 Sep 2018 20:24:34 +0000 (16:24 -0400)]
[morx] Implement horiz-only/vert-only subtables

6 years ago[morx] Improve buffer position in Insertion w DontAdvance and wo
Behdad Esfahbod [Wed, 19 Sep 2018 20:02:56 +0000 (16:02 -0400)]
[morx] Improve buffer position in Insertion w DontAdvance and wo

Just speculation. Needs tests to determine which is correct behavior.

6 years ago[morx] Implement InsertionChain
Behdad Esfahbod [Mon, 17 Sep 2018 17:29:34 +0000 (19:29 +0200)]
[morx] Implement InsertionChain

6 years agoDon't enforce a native direction for Old Hungarian
David Corbett [Mon, 17 Sep 2018 15:09:51 +0000 (11:09 -0400)]
Don't enforce a native direction for Old Hungarian

6 years agoFix installation of cmake config when building with cmake (#1161)
Simon Hausmann [Mon, 17 Sep 2018 08:33:34 +0000 (10:33 +0200)]
Fix installation of cmake config when building with cmake (#1161)

When building with the auto tools, the manually mantained
harfbuzz-config.cmake is installed. When building with cmake, we can use
cmake to generate the correct config files for us and install them.

6 years agoRevert forcing use of single-parameter static_assert()
Behdad Esfahbod [Sun, 16 Sep 2018 17:33:48 +0000 (19:33 +0200)]
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.

6 years agoOne more bot fix
Behdad Esfahbod [Sun, 16 Sep 2018 17:25:19 +0000 (19:25 +0200)]
One more bot fix

6 years agoFix build, another try
Behdad Esfahbod [Sun, 16 Sep 2018 17:12:19 +0000 (19:12 +0200)]
Fix build, another try

6 years agoFix bots
Behdad Esfahbod [Sun, 16 Sep 2018 16:11:46 +0000 (18:11 +0200)]
Fix bots

"Unused private member" warning turned error.  ugh.

6 years agoEnforce single-param static_assert() only
Behdad Esfahbod [Sun, 16 Sep 2018 16:09:36 +0000 (18:09 +0200)]
Enforce single-param static_assert() only

So we don't accidentally break it again.

6 years agoRemove unused try
Behdad Esfahbod [Sun, 16 Sep 2018 16:01:32 +0000 (18:01 +0200)]
Remove unused try

6 years agoFix static_assert
Behdad Esfahbod [Sun, 16 Sep 2018 15:57:12 +0000 (17:57 +0200)]
Fix static_assert

6 years agoDisallow null-enabled offsets to unsized structures...
Behdad Esfahbod [Sat, 15 Sep 2018 17:43:33 +0000 (19:43 +0200)]
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.

6 years ago[morx] Respect default feature settings
Behdad Esfahbod [Sat, 15 Sep 2018 16:31:14 +0000 (18:31 +0200)]
[morx] Respect default feature settings

Does NOT apply user-selected features.  But at least now enables
correct subtables.

6 years ago[aat] Change version field
Behdad Esfahbod [Sat, 15 Sep 2018 12:51:50 +0000 (14:51 +0200)]
[aat] Change version field

6 years ago[morx] Add stub for InsertionChain
Behdad Esfahbod [Sat, 15 Sep 2018 12:47:18 +0000 (14:47 +0200)]
[morx] Add stub for InsertionChain

6 years ago[dfont] Disable null-processsing for offsets
Behdad Esfahbod [Fri, 14 Sep 2018 16:59:53 +0000 (18:59 +0200)]
[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.

6 years ago[unicode] Move Fitzpatrick hack from ot-layout into unicode.hh
Behdad Esfahbod [Fri, 14 Sep 2018 12:23:09 +0000 (14:23 +0200)]
[unicode] Move Fitzpatrick hack from ot-layout into unicode.hh

6 years agoMinor
Behdad Esfahbod [Fri, 14 Sep 2018 10:15:53 +0000 (12:15 +0200)]
Minor

6 years agoFix builds
Behdad Esfahbod [Fri, 14 Sep 2018 10:14:42 +0000 (12:14 +0200)]
Fix builds

6 years ago[aat] Add enums for pre-defined state and classes
Behdad Esfahbod [Fri, 14 Sep 2018 09:31:33 +0000 (11:31 +0200)]
[aat] Add enums for pre-defined state and classes

Not sure how I didn't add before...

6 years agoDon't dereference offset before check_struct()
Behdad Esfahbod [Fri, 14 Sep 2018 08:58:00 +0000 (10:58 +0200)]
Don't dereference offset before check_struct()

6 years ago[dfont] Also check dataLen range in sanitize
Behdad Esfahbod [Thu, 13 Sep 2018 18:35:21 +0000 (20:35 +0200)]
[dfont] Also check dataLen range in sanitize

Just to disagree with myself re being done with this code...

6 years ago[dfont] Solve the mystery +2 offset thing!
Behdad Esfahbod [Thu, 13 Sep 2018 18:30:04 +0000 (20:30 +0200)]
[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!

6 years agoRename HeadlessArrayOf::len to lenP1
Behdad Esfahbod [Thu, 13 Sep 2018 18:21:54 +0000 (20:21 +0200)]
Rename HeadlessArrayOf::len to lenP1

So it doesn't accidentally match our templates, etc.