Commit Graph

6474 Commits

Author SHA1 Message Date
Garret Rieger 4f8753464a [subset] Add fuzzer test case that caused a timeout to the corpus. 2018-06-25 18:37:59 -06:00
Ebrahim Byagowi 35ce8f31d3
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!
2018-06-25 22:23:43 +04:30
Ebrahim Byagowi f57804a8a5
Resolve ttx absolute path before use (#1075) 2018-06-25 18:45:49 +04:30
Ebrahim Byagowi 159ddb8729
Treat - just as /dev/stdin and remove one extra file reader (#1065) 2018-06-24 23:09:16 +04:30
Behdad Esfahbod b2a1879187 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.
2018-06-23 10:32:28 -04:00
Ebrahim Byagowi 941f2b8548
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.
2018-06-18 20:35:40 +04:30
Ebrahim Byagowi d0c2889dfc
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.
2018-06-18 19:59:33 +04:30
Ebrahim Byagowi c53697d3f2
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.
2018-06-17 17:04:55 +04:30
Ebrahim Byagowi aa0c5df419
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.
2018-06-17 16:49:34 +04:30
Behdad Esfahbod 3654d9be6b 1.8.1 2018-06-12 19:38:04 -04:00
Behdad Esfahbod f3e58ab8a9 [docs] Enlist misc new symbols 2018-06-12 19:33:08 -04:00
Behdad Esfahbod f6893ef82c 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.
2018-06-12 19:26:15 -04:00
Behdad Esfahbod cc0b04f48f [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.
2018-06-12 18:24:54 -04:00
Behdad Esfahbod ba0ea56efa [substitute-closure] Rename function for clarity 2018-06-12 01:17:00 -04:00
Behdad Esfahbod 7b5ce41638 Whitespace 2018-06-12 01:17:00 -04:00
Behdad Esfahbod c4d0d11c55 [vector] Always 0-fill new items 2018-06-12 01:17:00 -04:00
Behdad Esfahbod a7e1b4a3b2 Fix compiler warning re reordering of initializations 2018-06-12 01:17:00 -04:00
Behdad Esfahbod f56cd9df10 Style 2018-06-12 01:17:00 -04:00
Jonathan Kew a95cde15af [hb-set] Additional testcase for hb-set-intersect. 2018-06-12 01:16:42 -04:00
Jonathan Kew 82484b05ca [hb-set] Don't shrink vectors until after processing their contents.
Fixes #1054.
2018-06-12 01:16:42 -04:00
Ebrahim Byagowi eb585033ca
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
2018-06-11 03:47:43 +04:30
Behdad Esfahbod b8e406f0c7 More fixes for SunStudio 12.6 build
Followup to https://github.com/harfbuzz/harfbuzz/pull/1053
2018-06-10 17:22:38 -04:00
prrace 498e4373dc Fix SunStudio 12.6 build (#1053) 2018-06-10 03:34:28 +04:30
Garret Rieger 46f7e7760f [subset] Use REPLACEME instead of version. 2018-06-08 12:09:34 -06:00
Garret Rieger fc246ec985 [subset] Move variable declaration out of loop. 2018-06-08 12:09:34 -06:00
Garret Rieger 197cb18b22 [subset] Add test cases for gsub closure in subsetting. 2018-06-08 12:09:34 -06:00
Garret Rieger 37eab27be3 [subset] Add fuzzing of gsub closure to hb-subset-fuzzer. 2018-06-08 12:09:34 -06:00
Garret Rieger feb23892a3 [subset] Use gsub closure if ot layout is not being dropped. 2018-06-08 12:09:34 -06:00
Garret Rieger a5673da9be [subset] Add drop_ot_layout setting to subset input. 2018-06-08 12:09:34 -06:00
Garret Rieger 57badadb76 [subset] add a new closure call to hb-ot-layout that can compute the closure over multiple lookups. 2018-06-06 17:50:12 -06:00
Behdad Esfahbod 11f1f4131b [set] Add is_subset
New API:
+hb_set_is_subset()
2018-06-06 16:47:13 -07:00
Garret Rieger 45186b9b8c [subset] Add memoization of GSUB lookup closures. 2018-06-06 16:53:50 -06:00
Behdad Esfahbod 78d92e0f27 Minorish 2018-06-06 15:24:43 -07:00
Behdad Esfahbod 676b19f0d1 Compiler gymnastics
Part of https://github.com/harfbuzz/harfbuzz/issues/630
2018-06-06 15:23:35 -07:00
Behdad Esfahbod 0a5952e8dd 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
2018-06-06 14:56:21 -07:00
David Corbett a2a1484ef9 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.
2018-06-06 11:06:16 -07:00
Behdad Esfahbod 37986aa9b7 1.8.0 2018-06-05 18:04:40 -07:00
Behdad Esfahbod 9d3cd13c30 [ucdn] Update to Unicode 11
https://github.com/grigorig/ucdn/issues/19
2018-06-05 17:59:41 -07:00
Behdad Esfahbod 060e6b4a13 Update to Unicode 11.0.0
UCDN is not updated yet.
2018-06-05 17:31:46 -07:00
Behdad Esfahbod 105a3b5e2d Minor 2018-06-05 15:31:04 -07:00
Behdad Esfahbod 60c516789b [RELEASING] Update 2018-06-05 15:20:23 -07:00
Behdad Esfahbod df01f3e560 1.7.7 2018-06-05 15:18:16 -07:00
Behdad Esfahbod ba3b6d6c65 [khmer] Fix Coeng vs Halant confusion
Test suite results are unchanged (34).
2018-06-05 12:06:50 -07:00
Ebrahim Byagowi 8220ef8a54
Fix hb_face_count build issue
I should've rebased #1002 before the merge, my bad
2018-06-05 22:50:53 +04:30
Ebrahim Byagowi 32da0c6bc4
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.
2018-06-05 18:56:26 +04:30
Behdad Esfahbod 4a115fe7fe [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
2018-06-04 15:40:43 -07:00
Behdad Esfahbod 3e494caae3 [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.
2018-06-04 15:38:05 -07:00
Behdad Esfahbod 58400a2ad8 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.
2018-06-02 20:30:09 -07:00
Behdad Esfahbod f9abbf83b6 Fix fallout from 975bdd5ef5
Ouch!
2018-06-02 15:46:08 -07:00
Behdad Esfahbod f7515769fd [vector] Use Crap pool in push() as well 2018-06-01 17:48:37 -07:00