platform/upstream/libHarfBuzzSharp.git
6 years ago[map] Minor
Behdad Esfahbod [Tue, 29 May 2018 23:45:20 +0000 (16:45 -0700)]
[map] Minor

6 years agoRevert "[map] Return bool from set()"
Behdad Esfahbod [Tue, 29 May 2018 23:45:06 +0000 (16:45 -0700)]
Revert "[map] Return bool from set()"

This reverts commit face7cf55d4895ffca314c8448c0a749a26cc182.

6 years agoRevert "[map] Make hb_map_set() return bool"
Behdad Esfahbod [Tue, 29 May 2018 23:44:55 +0000 (16:44 -0700)]
Revert "[map] Make hb_map_set() return bool"

This reverts commit 7bf1980146cfc081b06264ac367b23ae9397adf1.

6 years ago[map] Make hb_map_set() return bool
Behdad Esfahbod [Tue, 29 May 2018 23:42:44 +0000 (16:42 -0700)]
[map] Make hb_map_set() return bool

6 years ago[map] Return bool from set()
Behdad Esfahbod [Tue, 29 May 2018 23:39:03 +0000 (16:39 -0700)]
[map] Return bool from set()

6 years ago[map] Implement operator[] for get()ting
Behdad Esfahbod [Tue, 29 May 2018 23:37:44 +0000 (16:37 -0700)]
[map] Implement operator[] for get()ting

6 years ago[map] First try at implementing an integer-to-integer hashmap
Behdad Esfahbod [Tue, 29 May 2018 23:28:48 +0000 (16:28 -0700)]
[map] First try at implementing an integer-to-integer hashmap

Fully untested.

6 years ago[blob] Use MAP_NORESERVE if available (#1039)
Ebrahim Byagowi [Sat, 26 May 2018 19:20:10 +0000 (23:50 +0430)]
[blob] Use MAP_NORESERVE if available (#1039)

MAP_NORESERVE is not available on macOS for example so set the flag
to zero if not defined on the headers.

6 years ago[set] Remove stale comment
Behdad Esfahbod [Fri, 25 May 2018 23:34:08 +0000 (16:34 -0700)]
[set] Remove stale comment

6 years agoAdd HB_DISALLOW_COPY_AND_ASSIGN
Behdad Esfahbod [Fri, 25 May 2018 23:21:27 +0000 (16:21 -0700)]
Add HB_DISALLOW_COPY_AND_ASSIGN

6 years agoMove pool definitions to hb-static.cc
Behdad Esfahbod [Thu, 24 May 2018 22:58:26 +0000 (15:58 -0700)]
Move pool definitions to hb-static.cc

6 years agoFix Uniscribe build
Behdad Esfahbod [Thu, 24 May 2018 21:09:04 +0000 (14:09 -0700)]
Fix Uniscribe build

If a pointer type was passed to Null(), reinterpret_cast<> was
complaining about qualifiers being removed. Turns out I need the const on
the other side of "Type" to fix that.  Also remove unused const from
NullPool type.

6 years agoUnderflow protection in hb_vector_t
Behdad Esfahbod [Thu, 24 May 2018 20:38:46 +0000 (13:38 -0700)]
Underflow protection in hb_vector_t

6 years agoMark CrapPool thread_local
Behdad Esfahbod [Thu, 24 May 2018 18:46:57 +0000 (11:46 -0700)]
Mark CrapPool thread_local

Not sure if I like to keep it. For now, aim for correctness.

6 years agoAdd CrapPool
Behdad Esfahbod [Thu, 24 May 2018 18:33:15 +0000 (11:33 -0700)]
Add CrapPool

Common Regoin for Access Protection.  Like the NullPool, but writable.

6 years agoMove code around
Behdad Esfahbod [Thu, 24 May 2018 03:12:23 +0000 (20:12 -0700)]
Move code around

6 years agoAdd hb_vector_t::push(const Type &v)
Behdad Esfahbod [Wed, 23 May 2018 23:15:28 +0000 (16:15 -0700)]
Add hb_vector_t::push(const Type &v)

Makes for cleaner code.

6 years ago[ci] Revive the SunCC bot
Ebrahim Byagowi [Wed, 23 May 2018 09:07:57 +0000 (13:37 +0430)]
[ci] Revive the SunCC bot

* Adds libnsl to the bot as it is now needed apparently
* Disables hb-icu, apparently the newer ICU itself is not compatible with SunCC

6 years agoActually enable vectorized operations
Behdad Esfahbod [Wed, 23 May 2018 05:00:05 +0000 (22:00 -0700)]
Actually enable vectorized operations

Fixup for previous commit. Was accidentally turned off.

6 years agoAnother try at smart vectorization
Behdad Esfahbod [Wed, 23 May 2018 04:36:07 +0000 (21:36 -0700)]
Another try at smart vectorization

Make clang happy. Also, don't use anonymous union.

6 years agoTry enabling vectorization smartly
Behdad Esfahbod [Wed, 23 May 2018 04:06:22 +0000 (21:06 -0700)]
Try enabling vectorization smartly

We'll see if this sticks to the bots.

6 years ago[set] Always check population before checking for equality
Behdad Esfahbod [Wed, 23 May 2018 03:57:19 +0000 (20:57 -0700)]
[set] Always check population before checking for equality

6 years ago[test/text-rendering-tests] Update from upstream
Behdad Esfahbod [Wed, 23 May 2018 01:28:13 +0000 (18:28 -0700)]
[test/text-rendering-tests] Update from upstream

6 years agoMinor, make CreateFile compatible with the disabled writable flag
Ebrahim Byagowi [Fri, 11 May 2018 18:14:44 +0000 (22:44 +0430)]
Minor, make CreateFile compatible with the disabled writable flag

"writable" is not in use and probably we can go in the reverse direction
and remove the flags that are useful for enabled writable, this is just
for the sake of completeness however.

6 years agoRemove unnecessary headers and definitions of hb-blob (#1028)
Ebrahim Byagowi [Fri, 11 May 2018 10:06:41 +0000 (14:36 +0430)]
Remove unnecessary headers and definitions of hb-blob (#1028)

It removes io.h and other polyfills which we no longer need as 7e76d74

6 years agoMake hb_blob_create_from_file more portable (#1027)
Ebrahim Byagowi [Fri, 11 May 2018 09:10:33 +0000 (13:40 +0430)]
Make hb_blob_create_from_file more portable (#1027)

This makes it compatible with ARMCC which I had access in
a collaboration with @imgtec, thanks!

Basically hb_blob_create_from_file features three code paths,
mmap, Win32 and fallback.

We had fallback implementation even before this but it was relied
to "open" which is not available on some environments. This change
improved the situtation by using only fopen and friends for
fallback path.

Interestingly we could use "open" on Windows but in fact it was
emulated by MSVCRT so I've completely split that from Unix path
now that we have a distinct path for fallback path also.

6 years agoFix warning
Behdad Esfahbod [Wed, 9 May 2018 22:28:30 +0000 (15:28 -0700)]
Fix warning

6 years agoReinstante DEFINE_NULL_DATA
Behdad Esfahbod [Wed, 9 May 2018 22:27:17 +0000 (15:27 -0700)]
Reinstante DEFINE_NULL_DATA

Seems like I messed up; buffer overrun got reported.

6 years agoUse arrayZ on hb-coretext and hb-uniscribe and fix macOS/Win bots (#1024)
Ebrahim Byagowi [Wed, 9 May 2018 18:54:17 +0000 (23:24 +0430)]
Use arrayZ on hb-coretext and hb-uniscribe and fix macOS/Win bots (#1024)

Following to 63f57f4

6 years agoMark more unsized array's as arrayZ
Behdad Esfahbod [Tue, 8 May 2018 23:56:11 +0000 (16:56 -0700)]
Mark more unsized array's as arrayZ

6 years agoUse UnsizedArrayOf<> in one place where [VAR] was used
Behdad Esfahbod [Tue, 8 May 2018 23:42:45 +0000 (16:42 -0700)]
Use UnsizedArrayOf<> in one place where [VAR] was used

Trying to see how many can converted meaningfully.

6 years agoMerge pull request #1018 from googlefonts/cmap4
Behdad Esfahbod [Tue, 8 May 2018 22:21:09 +0000 (15:21 -0700)]
Merge pull request #1018 from googlefonts/cmap4

[subset] Add cmap format 4 subsetting.

6 years agoDon't keep instance in hb_table_lazy_loader_t
Behdad Esfahbod [Tue, 8 May 2018 10:00:21 +0000 (03:00 -0700)]
Don't keep instance in hb_table_lazy_loader_t

6 years agoRename
Behdad Esfahbod [Tue, 8 May 2018 09:55:20 +0000 (02:55 -0700)]
Rename

6 years agoMinor
Behdad Esfahbod [Tue, 8 May 2018 09:53:03 +0000 (02:53 -0700)]
Minor

6 years agoAlways lock blob in sanitize. Remove blob->lock_as() in favor of blob->lock()
Behdad Esfahbod [Tue, 8 May 2018 09:47:42 +0000 (02:47 -0700)]
Always lock blob in sanitize. Remove blob->lock_as() in favor of blob->lock()

6 years agoMove Sanitizer::lock_instance<>() to blob->lock_as<>().
Behdad Esfahbod [Tue, 8 May 2018 09:45:08 +0000 (02:45 -0700)]
Move Sanitizer::lock_instance<>() to blob->lock_as<>().

6 years agoMove null pool to hb-private
Behdad Esfahbod [Tue, 8 May 2018 09:23:36 +0000 (02:23 -0700)]
Move null pool to hb-private

6 years agoRename hb_string_t to hb_bytes_t
Behdad Esfahbod [Tue, 8 May 2018 08:57:27 +0000 (01:57 -0700)]
Rename hb_string_t to hb_bytes_t

6 years agoMinor
Behdad Esfahbod [Tue, 8 May 2018 08:50:30 +0000 (01:50 -0700)]
Minor

6 years agoAllocate user-data-array on the heap
Behdad Esfahbod [Tue, 8 May 2018 08:47:05 +0000 (01:47 -0700)]
Allocate user-data-array on the heap

This saves each object allocation 72 bytes.  Now object overhead is just
16 bytes (on x86) instead of 88 bytes. Neat.

6 years agoOops
Behdad Esfahbod [Tue, 8 May 2018 08:28:19 +0000 (01:28 -0700)]
Oops

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

6 years agoSupport scripts that are written both LTR and RTL
Behdad Esfahbod [Mon, 7 May 2018 20:58:32 +0000 (13:58 -0700)]
Support scripts that are written both LTR and RTL

Right now only Old Italic is marked as such.

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

6 years ago[ot] Apply langsys's required feature even if no other feature exists
Behdad Esfahbod [Mon, 7 May 2018 21:04:01 +0000 (14:04 -0700)]
[ot] Apply langsys's required feature even if no other feature exists

6 years agoMove some blob functions to methods
Behdad Esfahbod [Fri, 4 May 2018 02:14:54 +0000 (22:14 -0400)]
Move some blob functions to methods

6 years agoAdd hb-blob-private.hh
Behdad Esfahbod [Fri, 4 May 2018 01:10:57 +0000 (21:10 -0400)]
Add hb-blob-private.hh

Towards making blob more memory-allocation-friendly

6 years ago[ot-layout] Remove unused members
Behdad Esfahbod [Fri, 4 May 2018 01:03:27 +0000 (21:03 -0400)]
[ot-layout] Remove unused members

We should hang those off somewhere else. For now, the unused ones can go.

6 years agoSet inline hidden flag only on shared library building
Ebrahim Byagowi [Mon, 7 May 2018 20:35:15 +0000 (01:05 +0430)]
Set inline hidden flag only on shared library building

To avoid need of CMP0063 which is not available on older CMake versions

6 years ago[subset] entrySelectorZ -> entrySelector.
Garret Rieger [Fri, 4 May 2018 18:23:32 +0000 (11:23 -0700)]
[subset] entrySelectorZ -> entrySelector.

6 years ago[subset] add missing template parameter.
Garret Rieger [Thu, 3 May 2018 20:14:28 +0000 (13:14 -0700)]
[subset] add missing template parameter.

6 years ago[subset] Switch to a non-log using implementation of caculating searchRangeZ, entrySe...
Garret Rieger [Thu, 3 May 2018 20:00:19 +0000 (13:00 -0700)]
[subset] Switch to a non-log using implementation of caculating searchRangeZ, entrySelectorZ, and rangeShiftZ in cmap4.

6 years ago[subset] Updated expected files for japanese subset integration tests to include...
Garret Rieger [Thu, 3 May 2018 18:22:51 +0000 (11:22 -0700)]
[subset] Updated expected files for japanese subset integration tests to include cmap4.

6 years ago[subset] Update expected files for subset integration tests to include cmap4.
Garret Rieger [Thu, 3 May 2018 18:18:02 +0000 (11:18 -0700)]
[subset] Update expected files for subset integration tests to include cmap4.

6 years ago[subset] Get cmap tests passing again.
Garret Rieger [Thu, 3 May 2018 17:59:00 +0000 (10:59 -0700)]
[subset] Get cmap tests passing again.

6 years ago[subset] Write out a format 4, plat 0 encoding record to match fontTools.
Garret Rieger [Thu, 3 May 2018 17:53:20 +0000 (10:53 -0700)]
[subset] Write out a format 4, plat 0 encoding record to match fontTools.

6 years ago[subset] A few bug fixes for cmap format 4 subsetting.
Garret Rieger [Thu, 3 May 2018 01:50:56 +0000 (18:50 -0700)]
[subset] A few bug fixes for cmap format 4 subsetting.

6 years ago[subset] Complete implementation of cmap4 subsetting.
Garret Rieger [Thu, 3 May 2018 00:46:30 +0000 (17:46 -0700)]
[subset] Complete implementation of cmap4 subsetting.

6 years ago[subset] WIP implementation of serialize for cmap format 4.
Garret Rieger [Thu, 3 May 2018 00:11:18 +0000 (17:11 -0700)]
[subset] WIP implementation of serialize for cmap format 4.

6 years ago[subset] Add an implement for cmap format 4 create_sub_table_plan.
Garret Rieger [Wed, 2 May 2018 23:37:38 +0000 (16:37 -0700)]
[subset] Add an implement for cmap format 4 create_sub_table_plan.

6 years ago[subset] WIP cmap format 4 subsetting.
Garret Rieger [Wed, 2 May 2018 23:12:04 +0000 (16:12 -0700)]
[subset] WIP cmap format 4 subsetting.

6 years ago[subset] Refactor cmap subsetting to make it possible to add support for more sub...
Garret Rieger [Wed, 2 May 2018 22:42:43 +0000 (15:42 -0700)]
[subset] Refactor cmap subsetting to make it possible to add support for more sub tables.

6 years ago[subset] Add const to the hb_subset_plan_t input to a couple functions in hb-subset...
Garret Rieger [Wed, 2 May 2018 22:42:08 +0000 (15:42 -0700)]
[subset] Add const to the hb_subset_plan_t input to a couple functions in hb-subset-plan.

6 years agoRename some X-terminated members to Z-terminated
Behdad Esfahbod [Wed, 2 May 2018 18:59:14 +0000 (14:59 -0400)]
Rename some X-terminated members to Z-terminated

X-terminated means don't access this, it's not located correctly.
Z-terminated means this is a C array with no bound checking.

6 years ago[set] Fix init/fini of set on the stack to call object init/fini
Behdad Esfahbod [Wed, 2 May 2018 16:56:21 +0000 (12:56 -0400)]
[set] Fix init/fini of set on the stack to call object init/fini

Part of https://github.com/harfbuzz/harfbuzz/issues/1017

6 years agoRemove hb_auto_array_t
Behdad Esfahbod [Tue, 1 May 2018 23:09:00 +0000 (19:09 -0400)]
Remove hb_auto_array_t

Part of https://github.com/harfbuzz/harfbuzz/issues/1017

6 years agos/hb_prealloced_array_t/hb_vector_t/g
Behdad Esfahbod [Tue, 1 May 2018 23:07:04 +0000 (19:07 -0400)]
s/hb_prealloced_array_t/hb_vector_t/g

Part of https://github.com/harfbuzz/harfbuzz/issues/1017

6 years agoAdd hb_auto_t
Behdad Esfahbod [Tue, 1 May 2018 23:05:58 +0000 (19:05 -0400)]
Add hb_auto_t

Part of https://github.com/harfbuzz/harfbuzz/issues/1017

6 years agos/finish/fini
Behdad Esfahbod [Tue, 1 May 2018 23:01:25 +0000 (19:01 -0400)]
s/finish/fini

For consistency.

6 years agoAdd hb_object_fini()
Behdad Esfahbod [Tue, 1 May 2018 22:39:25 +0000 (18:39 -0400)]
Add hb_object_fini()

6 years ago[set] Cache population
Behdad Esfahbod [Tue, 1 May 2018 22:27:41 +0000 (18:27 -0400)]
[set] Cache population

Part of https://github.com/harfbuzz/harfbuzz/issues/1017

6 years ago[subset] Do not compare ttx progress output in the tests
violet-sippial [Sat, 28 Apr 2018 18:29:13 +0000 (20:29 +0200)]
[subset] Do not compare ttx progress output in the tests

Suppress progress messages of ttx. This avoids comparing this output to the reference file which lets the test fail.

6 years ago[dwrite] Minor, enable the original code assertions
Ebrahim Byagowi [Sat, 28 Apr 2018 09:28:55 +0000 (13:58 +0430)]
[dwrite] Minor, enable the original code assertions

6 years agoDon't decompose Bengali Rra and Rha
Ebrahim Byagowi [Fri, 13 Apr 2018 08:13:29 +0000 (12:43 +0430)]
Don't decompose Bengali Rra and Rha

Fixes #779 and follow up to b01d9b3d90e892341ee4463f2eda4600850b97d8

6 years agoMinor, improve file reading failing condition comment
Ebrahim Byagowi [Wed, 25 Apr 2018 12:14:04 +0000 (16:44 +0430)]
Minor, improve file reading failing condition comment

https://bugzilla.gnome.org/show_bug.cgi?id=659212 for more context

6 years agoMinor, re-add unused mark to some of ragel defined state machines (#1005)
Ebrahim Byagowi [Tue, 24 Apr 2018 04:34:15 +0000 (09:04 +0430)]
Minor, re-add unused mark to some of ragel defined state machines (#1005)

6 years agoMinor, re-add unused mark for two TRACE_ macros
Ebrahim Byagowi [Tue, 24 Apr 2018 03:41:13 +0000 (08:11 +0430)]
Minor, re-add unused mark for two TRACE_ macros

To revive Travis CI bot

6 years agoResolve some of clang's double-promotion warnings
Ebrahim Byagowi [Mon, 23 Apr 2018 15:06:53 +0000 (19:36 +0430)]
Resolve some of clang's double-promotion warnings

6 years agoResolve clang's used-but-marked-unused warnings
Ebrahim Byagowi [Mon, 23 Apr 2018 14:33:57 +0000 (19:03 +0430)]
Resolve clang's used-but-marked-unused warnings

6 years agoResolve clang's conditional-uninitialize warnings
Ebrahim Byagowi [Mon, 23 Apr 2018 14:09:40 +0000 (18:39 +0430)]
Resolve clang's conditional-uninitialize warnings

6 years agoResolve some of clang's zero-as-null-pointer-constant warnings
Ebrahim Byagowi [Mon, 23 Apr 2018 14:07:35 +0000 (18:37 +0430)]
Resolve some of clang's zero-as-null-pointer-constant warnings

6 years agoMinor, fix calloc call order
Ebrahim Byagowi [Sun, 22 Apr 2018 06:28:37 +0000 (10:58 +0430)]
Minor, fix calloc call order

6 years ago[aat/kerx] Minor (#1003)
Ebrahim Byagowi [Fri, 20 Apr 2018 16:42:58 +0000 (21:12 +0430)]
[aat/kerx] Minor (#1003)

6 years agoAdd hb_blob_create_from_file, a new API (#926)
Ebrahim Byagowi [Fri, 20 Apr 2018 05:59:06 +0000 (10:29 +0430)]
Add hb_blob_create_from_file, a new API (#926)

6 years ago[subset] Check instruction offsets in glyph to ensure they are in bounds.
Garret Rieger [Thu, 19 Apr 2018 22:30:35 +0000 (15:30 -0700)]
[subset] Check instruction offsets in glyph to ensure they are in bounds.

6 years ago[subset] In subset fuzzer run through drop hints and keep hints pathways.
Garret Rieger [Thu, 19 Apr 2018 20:39:57 +0000 (13:39 -0700)]
[subset] In subset fuzzer run through drop hints and keep hints pathways.

6 years ago[util] Check all specified shapers are known (#993)
Khaled Hosny [Thu, 19 Apr 2018 20:41:37 +0000 (23:41 +0300)]
[util] Check all specified shapers are known (#993)

A bit brute force and requires all shapers to be known, not just one.

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

6 years ago[subset] Add integration tests for cmap breakge.
Garret Rieger [Thu, 19 Apr 2018 00:37:39 +0000 (17:37 -0700)]
[subset] Add integration tests for cmap breakge.

6 years ago[subset] Add a test for previous cmap breakage.
Garret Rieger [Thu, 19 Apr 2018 00:32:43 +0000 (17:32 -0700)]
[subset] Add a test for previous cmap breakage.

6 years ago[subset] Fix broken cmap creation.
Garret Rieger [Thu, 19 Apr 2018 00:13:37 +0000 (17:13 -0700)]
[subset] Fix broken cmap creation.
It was ignoring the restriction that gids must be consecutive to be placed into a single group.

6 years agoMinor, annotate the added tables with likely/unlikely (#997)
Ebrahim Byagowi [Wed, 18 Apr 2018 07:39:37 +0000 (12:09 +0430)]
Minor, annotate the added tables with likely/unlikely (#997)

6 years ago[subset] Remove printf's from fuzzing targets.
Garret Rieger [Wed, 18 Apr 2018 01:11:32 +0000 (18:11 -0700)]
[subset] Remove printf's from fuzzing targets.

6 years agoDo sanitization before the use on 'main' mini-program (#994)
Ebrahim Byagowi [Tue, 17 Apr 2018 19:31:20 +0000 (00:01 +0430)]
Do sanitization before the use on 'main' mini-program (#994)

6 years ago[subset] add a fuzzer target for subset_get_all_codepoints method. (#987)
Garret Rieger [Tue, 17 Apr 2018 14:21:22 +0000 (08:21 -0600)]
[subset] add a fuzzer target for subset_get_all_codepoints method. (#987)

6 years ago[colr] Check layer record access
Behdad Esfahbod [Tue, 17 Apr 2018 13:32:02 +0000 (15:32 +0200)]
[colr] Check layer record access

6 years ago[subset] Add implementation of cmap format 12 codepoint listing. (#988)
Garret Rieger [Tue, 17 Apr 2018 13:00:23 +0000 (07:00 -0600)]
[subset] Add implementation of cmap format 12 codepoint listing. (#988)

6 years agoAdd pre-opentype font pages detection code (#986)
Ebrahim Byagowi [Tue, 17 Apr 2018 05:06:52 +0000 (09:36 +0430)]
Add pre-opentype font pages detection code (#986)

As Khaled's finding on #981 this is the way Uniscribe detects those fonts. This is its detection part.

6 years agoMake some of implicit header uses explicit (#989)
Ebrahim Byagowi [Tue, 17 Apr 2018 04:43:35 +0000 (09:13 +0430)]
Make some of implicit header uses explicit (#989)

Splitted from #950 and #986 IIRC Chromium had a policy about this encouraging it,
not sure about automated way to detect and add them but for now lets have the needed
ones of them.

6 years agoAdd round to F2DOT14 inner store setter (#990)
Ebrahim Byagowi [Tue, 17 Apr 2018 04:43:03 +0000 (09:13 +0430)]
Add round to F2DOT14 inner store setter (#990)

It uses floor implicitly without it but explicit use of round will be more correct.

6 years ago[subset] Don't assume the last segment in cmap 4 can be skipped, actually check it.
Garret Rieger [Mon, 16 Apr 2018 22:09:27 +0000 (15:09 -0700)]
[subset] Don't assume the last segment in cmap 4 can be skipped, actually check it.

6 years ago[subset] sketch out support for a call that lists all codepoints present in a font...
Garret Rieger [Tue, 10 Apr 2018 22:40:24 +0000 (15:40 -0700)]
[subset] sketch out support for a call that lists all codepoints present in a font. Implement support for it in format 4 cmap sub table.