Cosimo Lupo [Mon, 9 Jul 2018 17:48:20 +0000 (18:48 +0100)]
CMakeLists.txt: pass headers as arguments to gen-def.py; call using PYTHON_EXECUTABLE
Cosimo Lupo [Mon, 9 Jul 2018 17:26:44 +0000 (18:26 +0100)]
src/Makefile.am: pass headers to gen-def.py as arguments, not env vars
Cosimo Lupo [Mon, 9 Jul 2018 17:11:29 +0000 (18:11 +0100)]
gen-def.py: pass headers as arguments so that msys2 can convert posix paths
When one is not using the msys2 python, the header files that are passed in as environment
variable cannot be found.
https://ci.appveyor.com/project/fonttools/ttfautohint-py/build/1.0.65/job/rkremny4jjid9nl2#L803
This is because msys2 shell and make use POSIX paths (e.g. /c/Users/clupo/...)
whereas non-msys2 python.exe uses native Windows paths (e.g. C:\Users\clupo\...).
Msys2 will automatically convert command line arguments (but not environment variables) from
POSIX to Windows paths when calling a native win32 executable, so we pass the header paths
as arguments instead of environment variables.
This way the gen-def.py script can support both mingw python running in an MSYS2 shell, and
native win32 python.
David Corbett [Fri, 6 Jul 2018 19:47:03 +0000 (15:47 -0400)]
Do not enforce a native direction of LTR for Runic
Fixes #481
David Corbett [Sat, 7 Jul 2018 15:08:17 +0000 (11:08 -0400)]
Regenerate the USE table for Grantha and Bhaiksuki (#1090)
Completes #1037 and fixes #1035.
Behdad Esfahbod [Thu, 5 Jul 2018 09:34:13 +0000 (14:04 +0430)]
Disable vectorization
Disable vectorization for now. To correctly use them, we should
use posix_memalign() to allocate them. Otherwise, can cause
misaligned access.
https://bugs.chromium.org/p/chromium/issues/detail?id=860184
Behdad Esfahbod [Thu, 5 Jul 2018 09:33:48 +0000 (14:03 +0430)]
Fix warning
../../src/hb-ot-layout-gsubgpos-private.hh:391:18: warning: missed loop optimization, the loop counter may overflow [-Wunsafe-loop-optimizations]
Behdad Esfahbod [Thu, 5 Jul 2018 08:46:00 +0000 (13:16 +0430)]
Allow disabling vector_size use
Ebrahim Byagowi [Wed, 4 Jul 2018 11:03:39 +0000 (15:33 +0430)]
Use CreateFileW explicitly and pass wchar_t to it (#1087)
Behdad Esfahbod [Tue, 3 Jul 2018 09:59:25 +0000 (14:29 +0430)]
[indic] Adjust left-matra repositioning and Halant,ZWJ sequence
From the new code (first paragraph is from the OT Devanagari spec.):
/* o Reorder matras:
*
* If a pre-base matra character had been reordered before applying basic
* features, the glyph can be moved closer to the main consonant based on
* whether half-forms had been formed. Actual position for the matra is
* defined as “after last standalone halant glyph, after initial matra
* position and before the main consonant”. If ZWJ or ZWNJ follow this
* halant, position is moved after it.
*
* IMPLEMENTATION NOTES:
*
* It looks like the last sentence is wrong. Testing, with Windows 7 Uniscribe
* and Devanagari shows that the behavior is best described as:
*
* "If ZWJ follows this halant, matra is NOT repositioned after this halant.
* If ZWNJ follows this halant, position is moved after it."
*
* Test case, with Adobe Devanagari or Nirmala UI:
*
* U+091F,U+094D,U+200C,U+092F,U+093F
* (Matra moves to the middle, after ZWNJ.)
*
* U+091F,U+094D,U+200D,U+092F,U+093F
* (Matra does NOT move, stays to the left.)
Fixes https://github.com/harfbuzz/harfbuzz/issues/1070
Test case added with Adobe Devanagari.
Behdad Esfahbod [Tue, 3 Jul 2018 08:34:05 +0000 (13:04 +0430)]
Fix unused function '_hb_mapped_file_destroy' if no mmap
Behdad Esfahbod [Tue, 3 Jul 2018 08:13:59 +0000 (12:43 +0430)]
1.8.2
Behdad Esfahbod [Tue, 3 Jul 2018 08:08:21 +0000 (12:38 +0430)]
Disable .dfont code for now
The get_table imple was wrong, as table offsets in a dfont are
relative to the resource. We were treating them as relative to
the big blob itself. To be fixed.
Part of https://github.com/harfbuzz/harfbuzz/pull/1085
Ebrahim Byagowi [Sun, 1 Jul 2018 11:02:43 +0000 (15:32 +0430)]
Fix trak table apply logic
In collaboration with Behdad
Ebrahim Byagowi [Sun, 1 Jul 2018 10:02:00 +0000 (14:32 +0430)]
Support dfont font files (#949)
Ebrahim Byagowi [Sat, 30 Jun 2018 21:24:14 +0000 (01:54 +0430)]
Improve nommap naming and use C style comments on create_from_file (#1084)
Behdad Esfahbod [Sat, 30 Jun 2018 11:29:25 +0000 (15:59 +0430)]
Adjust MarkBasePos heuristic in presence of MultipleSubst
From the issue:
"In this font, the virama,ya first forms a ligature, then decomposes back to
virama,ya. This causes those two to be marked parts of a MultipleSubst
sequence. When attaching the matra, we look for the first of the MultipleSubst
sequence because that's where we attach to (because of eg #740). In this case,
the first glyph in the MultipleSubst sequence is a mark, so we skip it and
attach to the base char before it."
Font in question is Nirmala UI from Windows 10. Test sequence:
U+0926,U+094D,U+092F,U+0941
Fixes https://github.com/harfbuzz/harfbuzz/issues/1020
Behdad Esfahbod [Sat, 30 Jun 2018 07:58:03 +0000 (12:28 +0430)]
[indic] Tweak for old-spec Bengali and halant-ya-halant
Fixes https://github.com/harfbuzz/harfbuzz/issues/1073
punchcutter [Mon, 25 Jun 2018 05:54:57 +0000 (22:54 -0700)]
Rebase and update USE overrides for Bhaiksuki Gap Fillers and Grantha Anusvara
Behdad Esfahbod [Sat, 30 Jun 2018 04:46:54 +0000 (09:16 +0430)]
[khmer] Fix infinite-loop in cluster merging
Indic shaper already had this check. We removed it when forking
Khmer shaper by mistake.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1464623
Ebrahim Byagowi [Thu, 28 Jun 2018 10:02:36 +0000 (14:32 +0430)]
armcc compatibility, don't use EINTR if doesn't exist
Fixes #1081
Ebrahim Byagowi [Thu, 28 Jun 2018 08:52:21 +0000 (13:22 +0430)]
Minor on hb_blob_create_from_file, reuse ferror result
Oops
Ebrahim Byagowi [Wed, 27 Jun 2018 13:44:52 +0000 (18:14 +0430)]
[ci] Don't fail on apt update and revive clang-O3-O0
Ebrahim Byagowi [Wed, 27 Jun 2018 12:24:44 +0000 (16:54 +0430)]
Minor, rename blob to data on blob_from_file
Ebrahim Byagowi [Wed, 27 Jun 2018 09:43:26 +0000 (14:13 +0430)]
Minor touches on hb_blob_create_from_file (#1079)
* Handle EINTR on fallback reader
* Increase fallback reader limitation size limitation to 2 << 28
* Ensure _O_BINARY does exist if MMAP is used on Windows
(maybe superfluous but makes me more confident)
Behdad Esfahbod [Tue, 26 Jun 2018 22:00:58 +0000 (18:00 -0400)]
Make round() fallback portable to systems that do have round()
Makes compiling without HAVE_ROUND on systems that do have it work.
Ebrahim Byagowi [Tue, 26 Jun 2018 06:16:10 +0000 (10:46 +0430)]
Minor on hb_blob_create_from_file
Add one more "unlikely" annotation and use explicit nullptr check for more consistency.
Garret Rieger [Fri, 22 Jun 2018 22:29:34 +0000 (15:29 -0700)]
[subset] Add fuzzer test case that caused a timeout to the corpus.
Ebrahim Byagowi [Mon, 25 Jun 2018 17:53:43 +0000 (22:23 +0430)]
Unify our pipe reader with the fallback reader (#1068)
And assign one bot to use the path always using NOMMAPFILEREADER token.
It's limited to 200mb so no more fun with using /dev/zero on hb-view!
Ebrahim Byagowi [Mon, 25 Jun 2018 14:15:49 +0000 (18:45 +0430)]
Resolve ttx absolute path before use (#1075)
Ebrahim Byagowi [Sun, 24 Jun 2018 18:39:16 +0000 (23:09 +0430)]
Treat - just as /dev/stdin and remove one extra file reader (#1065)
Behdad Esfahbod [Sat, 23 Jun 2018 14:32:28 +0000 (10:32 -0400)]
In Coverage iterator, bail out if table smells
In particular, if CoverageFormat2 has unsorted ranges, bail out.
Otherwise, 64k ranges of each 64k glyphs can DoS closure() method.
We can do the same for CoverageFormat1, but that one does not expose
the quadratic behavior, so, fine.
Ebrahim Byagowi [Mon, 18 Jun 2018 16:05:40 +0000 (20:35 +0430)]
Support pipe and friends on hb_blob_create_from_file (#1061)
With this hb-view/hb-shape support pipes and possibly socket and named pipe
also, anything fails just on mmap.
We can later do the same for Windows also.
This however reveals two issues, the fact most of our bots don't have HAVE_MMAP and using
this instead the other fread/fopen reader can make failure on CI. I should look at them separately
this change however is very low risk I believe.
Ebrahim Byagowi [Mon, 18 Jun 2018 15:29:33 +0000 (19:59 +0430)]
Revert file blob sanitization and index checking (#1062)
As https://github.com/harfbuzz/harfbuzz/pull/1059#issuecomment-
397912812 we
like to still work with blobs that harfbuzz itself can't handle directly that are failing sanitization
currently apparently.
Ebrahim Byagowi [Sun, 17 Jun 2018 12:34:55 +0000 (17:04 +0430)]
Verbose fail when something is wrong with hb-shape/hb-view input font file (#1059)
This checks if the blob isn't empty and uses `hb_face_count`
to see if the font file passes the simple font file sanitization
so can detect if the input is actually a font and checks also
whether input font-index is out of range.
Ebrahim Byagowi [Sun, 17 Jun 2018 12:19:34 +0000 (16:49 +0430)]
Fix reading fonts from stdin (#1060)
We were passing the font path directly to freetype so rendering
was broken when we are getting the font from stdin.
This fixes it by using FT_New_Memory_Face instead.
This fixes:
* build/util/hb-view /dev/stdin text < font.ttf
* build/util/hb-view - text < font.ttf
* cat font.ttf | build/util/hb-view - text
but doesn't work on
* cat font.ttf | build/util/hb-view /dev/stdin text
which I will try to fix separately.
Behdad Esfahbod [Tue, 12 Jun 2018 23:38:04 +0000 (19:38 -0400)]
1.8.1
Behdad Esfahbod [Tue, 12 Jun 2018 23:32:04 +0000 (19:32 -0400)]
[docs] Enlist misc new symbols
Behdad Esfahbod [Tue, 12 Jun 2018 23:20:20 +0000 (19:20 -0400)]
Move hb-version.h generation to Makefile
Fixes https://github.com/harfbuzz/harfbuzz/issues/864
Unfortunately 1.7.7 and 1.8.0 went out with the wrong hb-version.h contents.
Behdad Esfahbod [Tue, 12 Jun 2018 22:24:54 +0000 (18:24 -0400)]
[subset] Remove HB_SUBSET_BUILTIN
Just include hb-static.cc in libharfbuzz-subset.so source list as
well. Those building it built-in will include hb-static.cc once
already. No need for any gymnastics.
Behdad Esfahbod [Tue, 12 Jun 2018 03:24:41 +0000 (23:24 -0400)]
[substitute-closure] Rename function for clarity
Behdad Esfahbod [Tue, 12 Jun 2018 03:23:40 +0000 (23:23 -0400)]
Whitespace
Behdad Esfahbod [Tue, 12 Jun 2018 02:11:45 +0000 (22:11 -0400)]
[vector] Always 0-fill new items
Behdad Esfahbod [Tue, 12 Jun 2018 02:05:08 +0000 (22:05 -0400)]
Fix compiler warning re reordering of initializations
Behdad Esfahbod [Tue, 12 Jun 2018 02:02:38 +0000 (22:02 -0400)]
Style
Jonathan Kew [Tue, 12 Jun 2018 01:09:35 +0000 (18:09 -0700)]
[hb-set] Additional testcase for hb-set-intersect.
Jonathan Kew [Tue, 12 Jun 2018 03:55:14 +0000 (20:55 -0700)]
[hb-set] Don't shrink vectors until after processing their contents.
Fixes #1054.
Ebrahim Byagowi [Sun, 10 Jun 2018 23:17:43 +0000 (03:47 +0430)]
Fetch the updated dwrite_1.h header from a better place
Following to https://ci.appveyor.com/project/harfbuzz/harfbuzz/build/1.0.1693/job/mfkjdhcdykjuqdfc
Behdad Esfahbod [Sun, 10 Jun 2018 21:22:38 +0000 (17:22 -0400)]
More fixes for SunStudio 12.6 build
Followup to https://github.com/harfbuzz/harfbuzz/pull/1053
prrace [Sat, 9 Jun 2018 23:04:28 +0000 (16:04 -0700)]
Fix SunStudio 12.6 build (#1053)
Garret Rieger [Thu, 7 Jun 2018 22:55:45 +0000 (15:55 -0700)]
[subset] Use REPLACEME instead of version.
Garret Rieger [Thu, 7 Jun 2018 22:54:19 +0000 (15:54 -0700)]
[subset] Move variable declaration out of loop.
Garret Rieger [Thu, 7 Jun 2018 22:32:52 +0000 (15:32 -0700)]
[subset] Add test cases for gsub closure in subsetting.
Garret Rieger [Thu, 7 Jun 2018 21:39:03 +0000 (14:39 -0700)]
[subset] Add fuzzing of gsub closure to hb-subset-fuzzer.
Garret Rieger [Thu, 7 Jun 2018 21:32:34 +0000 (14:32 -0700)]
[subset] Use gsub closure if ot layout is not being dropped.
Garret Rieger [Thu, 7 Jun 2018 21:23:03 +0000 (14:23 -0700)]
[subset] Add drop_ot_layout setting to subset input.
Garret Rieger [Wed, 6 Jun 2018 23:02:51 +0000 (16:02 -0700)]
[subset] add a new closure call to hb-ot-layout that can compute the closure over multiple lookups.
Behdad Esfahbod [Wed, 6 Jun 2018 23:46:50 +0000 (16:46 -0700)]
[set] Add is_subset
New API:
+hb_set_is_subset()
Garret Rieger [Wed, 6 Jun 2018 00:14:42 +0000 (17:14 -0700)]
[subset] Add memoization of GSUB lookup closures.
Behdad Esfahbod [Wed, 6 Jun 2018 22:24:43 +0000 (15:24 -0700)]
Minorish
Behdad Esfahbod [Wed, 6 Jun 2018 22:23:35 +0000 (15:23 -0700)]
Compiler gymnastics
Part of https://github.com/harfbuzz/harfbuzz/issues/630
Behdad Esfahbod [Wed, 6 Jun 2018 21:55:30 +0000 (14:55 -0700)]
Move prime_for back into map
This was causing problem on systems without visibility when map was used
from both libharfbuzz and libharfbuzz-subset. Sigh.
https://ci.appveyor.com/project/harfbuzz/harfbuzz/build/1.0.1669/job/dey47nmff0770vp3
David Corbett [Wed, 6 Jun 2018 16:57:28 +0000 (12:57 -0400)]
Convert Consonant_Initial_Postfixed to CONS_FINAL
Consonant_Initial_Postfixed was split off of Consonant_Succeeding_Repha,
so it should correspond to the same USE class, CONS_FINAL.
Behdad Esfahbod [Wed, 6 Jun 2018 01:04:40 +0000 (18:04 -0700)]
1.8.0
Behdad Esfahbod [Wed, 6 Jun 2018 00:59:31 +0000 (17:59 -0700)]
[ucdn] Update to Unicode 11
https://github.com/grigorig/ucdn/issues/19
Behdad Esfahbod [Wed, 6 Jun 2018 00:31:46 +0000 (17:31 -0700)]
Update to Unicode 11.0.0
UCDN is not updated yet.
Behdad Esfahbod [Tue, 5 Jun 2018 22:31:04 +0000 (15:31 -0700)]
Minor
Behdad Esfahbod [Tue, 5 Jun 2018 22:20:23 +0000 (15:20 -0700)]
[RELEASING] Update
Behdad Esfahbod [Tue, 5 Jun 2018 22:17:39 +0000 (15:17 -0700)]
1.7.7
Behdad Esfahbod [Mon, 4 Jun 2018 23:47:45 +0000 (16:47 -0700)]
[khmer] Fix Coeng vs Halant confusion
Test suite results are unchanged (34).
Ebrahim Byagowi [Tue, 5 Jun 2018 18:20:53 +0000 (22:50 +0430)]
Fix hb_face_count build issue
I should've rebased #1002 before the merge, my bad
Ebrahim Byagowi [Tue, 5 Jun 2018 14:26:26 +0000 (18:56 +0430)]
Add hb_face_count, a new API (#1002)
Simply, it returns the number of faces on a font blob.
To be used on hb-sanitizer tool but other clients also
can benefit from it.
Behdad Esfahbod [Mon, 4 Jun 2018 22:40:43 +0000 (15:40 -0700)]
[sinhala] Move reph to after post-consonants
Apparently this changed between Win 7 and Win 10.
Fixes https://github.com/harfbuzz/harfbuzz/issues/967
To be continued in https://github.com/harfbuzz/harfbuzz/issues/1044
Behdad Esfahbod [Mon, 4 Jun 2018 22:38:05 +0000 (15:38 -0700)]
[test] Fix record-test to use gids not glyph-names
as those might not match what FontTools think of the glyphs if font
does NOT have glyph names.
Behdad Esfahbod [Sun, 3 Jun 2018 03:30:09 +0000 (20:30 -0700)]
Remove DISALLOW_* from vector, set, and map
Some of the build bots, still fail on this. I suppose mine pass because
I enable C++11...
Anyway, remove these again.
Behdad Esfahbod [Sat, 2 Jun 2018 22:30:59 +0000 (15:30 -0700)]
Behdad Esfahbod [Sat, 2 Jun 2018 00:48:37 +0000 (17:48 -0700)]
[vector] Use Crap pool in push() as well
Behdad Esfahbod [Sat, 2 Jun 2018 00:37:13 +0000 (17:37 -0700)]
[vector] Keep success status
Behdad Esfahbod [Sat, 2 Jun 2018 00:34:24 +0000 (17:34 -0700)]
[vector] Whitespace
Behdad Esfahbod [Sat, 2 Jun 2018 00:32:07 +0000 (17:32 -0700)]
Another attempt at making every compiler happy...
Sigh.
Behdad Esfahbod [Sat, 2 Jun 2018 00:28:47 +0000 (17:28 -0700)]
[map] Move prime_for to hb-static
Behdad Esfahbod [Sat, 2 Jun 2018 00:25:35 +0000 (17:25 -0700)]
[set] Shrink page-map size again
Behdad Esfahbod [Sat, 2 Jun 2018 00:18:57 +0000 (17:18 -0700)]
Fix hb_vector_size_t
Garret Rieger [Thu, 31 May 2018 23:47:39 +0000 (16:47 -0700)]
[subset] Have the subset fuzzer pull the text string to subset to from the end of the fuzzer provided data.
Behdad Esfahbod [Fri, 1 Jun 2018 23:30:38 +0000 (16:30 -0700)]
Add Codacy badge
Behdad Esfahbod [Fri, 1 Jun 2018 23:07:55 +0000 (16:07 -0700)]
Revert "Remove HB_DISALLOW_COPY_AND_ASSIGN"
This reverts commit
ff92de766bf775bfdd3a01bda94de699180ff86a.
Revert that and remove ASSERT_POD. Let's see which bots are
unhappy with this configuration...
Behdad Esfahbod [Fri, 1 Jun 2018 03:20:17 +0000 (20:20 -0700)]
Use NullPool for _hb_set_nil and _hb_map_nil
Behdad Esfahbod [Fri, 1 Jun 2018 03:15:21 +0000 (20:15 -0700)]
[set] Minor
Behdad Esfahbod [Fri, 1 Jun 2018 03:03:00 +0000 (20:03 -0700)]
Rename in_error to !successful
Towards possibly using Null pool for some nil objects.
Behdad Esfahbod [Fri, 1 Jun 2018 02:52:16 +0000 (19:52 -0700)]
Fix a whitespace inconsistency
Null() and Crap() are only places that there's no space before '('...
Behdad Esfahbod [Fri, 1 Jun 2018 02:31:39 +0000 (19:31 -0700)]
Remove trivial HB_ATOMIC_INT_INIT()
Behdad Esfahbod [Fri, 1 Jun 2018 02:28:04 +0000 (19:28 -0700)]
Use 0 as inert object reference value instead of -1
Towards using Null object for nil objects.
Behdad Esfahbod [Fri, 1 Jun 2018 00:58:40 +0000 (17:58 -0700)]
Add const OffsetTo<> dereference
Unused, but now that we have CrapPool, implement it.
Ebrahim Byagowi [Thu, 31 May 2018 07:57:31 +0000 (12:27 +0430)]
Fix symbol export issue of prime_mod on Alpine bot
Apparently our gcc-6.4.0 on Alpine Linux distribution doesn't like defining static const
inside a method, lets put that on outside the classes.
Behdad Esfahbod [Wed, 30 May 2018 23:26:50 +0000 (16:26 -0700)]
[map] Mark prime_for HB_INTERNAL
Trying to see if it fixes gcc-4.2 bots.
Behdad Esfahbod [Wed, 30 May 2018 23:25:46 +0000 (16:25 -0700)]
Add CrapOrNull
Garret Rieger [Wed, 30 May 2018 19:23:51 +0000 (12:23 -0700)]
[subset] Switch to using hb_map_t inside of hb_subset_plan_t.
Behdad Esfahbod [Wed, 30 May 2018 21:02:49 +0000 (14:02 -0700)]
[map] Fix size calculation
Don't know why I thought I should subtract one there...
Behdad Esfahbod [Wed, 30 May 2018 01:48:45 +0000 (18:48 -0700)]
Remove HB_DISALLOW_COPY_AND_ASSIGN
llvm-gcc-4.2 bot had this problem:
hb-private.hh:812: error: initializer specified for non-virtual method 'void hb_vector_t<Type, StaticSize>::operator=(const hb_vector_t<Type, StaticSize>&) [with Type = hb_user_data_array_t::hb_user_data_item_t, unsigned int StaticSize = 1u]'
Removing the delete didn't work with a constructor. So, remove constructor.
Just disallow assignment. Still better than nothing.
Behdad Esfahbod [Wed, 30 May 2018 01:32:57 +0000 (18:32 -0700)]
[map] Fix resize