Behdad Esfahbod [Thu, 5 Nov 2015 00:25:57 +0000 (16:25 -0800)]
Generalize flags types
Behdad Esfahbod [Wed, 4 Nov 2015 22:48:46 +0000 (14:48 -0800)]
Normalize various spaces to space if font doesn't support
This resurrects the space fallback feature, after I disabled
the compatibility decomposition. Now I can release HarfBuzz
again without breaking Pango!
It also remembers which space character it was, such that later
on we can approximate the width of this particular space
character. That part is not implemented yet.
We normalize all GC=Zs chars except for U+1680 OGHA SPACE MARK,
which is better left alone.
Behdad Esfahbod [Wed, 4 Nov 2015 23:30:48 +0000 (15:30 -0800)]
[test] Support recording multiple lines of text in record-test.sh
Behdad Esfahbod [Wed, 4 Nov 2015 22:46:52 +0000 (14:46 -0800)]
Protect against possible invalid-memory access after OOM
Behdad Esfahbod [Wed, 4 Nov 2015 22:46:10 +0000 (14:46 -0800)]
Fix typo!
Ouch! Fortunately that function was unused.
Behdad Esfahbod [Wed, 4 Nov 2015 22:18:39 +0000 (14:18 -0800)]
Add Unicode space category
Unused so far.
Behdad Esfahbod [Wed, 4 Nov 2015 21:26:17 +0000 (13:26 -0800)]
Make top-byte of unicode_props available to be used differently per-GC
Behdad Esfahbod [Wed, 4 Nov 2015 21:21:25 +0000 (13:21 -0800)]
Towards using top-byte of unicode-props for more things
Behdad Esfahbod [Wed, 4 Nov 2015 21:17:33 +0000 (13:17 -0800)]
Add _hb_glyph_info_is_unicode_mark()
Unused right now.
Behdad Esfahbod [Tue, 3 Nov 2015 20:58:12 +0000 (12:58 -0800)]
Tighten ccc-setting a bit and document it
Behdad Esfahbod [Tue, 3 Nov 2015 20:28:34 +0000 (12:28 -0800)]
Fix test expectation
Behdad Esfahbod [Tue, 3 Nov 2015 20:15:12 +0000 (12:15 -0800)]
[ot-font] Fix hmtx table length checking, *again*
Exactly the same problem that I fixed in
63ef0b41dc48d6112d1918c1b1de9de8ea90adb5
I rewrote the table checking yesterday in
67f8821fb25d9bd55719f5e29a582ae1af4b02b3
and introduced the exact same issue again. :(
Good thing we have ongoing fuzzing going now. Was discovered
immediately by libFuzzer. Thanks kcc!
https://github.com/behdad/harfbuzz/issues/139#issuecomment-
153449473
Fixes https://github.com/behdad/harfbuzz/issues/156
Behdad Esfahbod [Tue, 3 Nov 2015 19:34:47 +0000 (11:34 -0800)]
[util] Fix option-parsing leaks
Behdad Esfahbod [Tue, 3 Nov 2015 19:26:34 +0000 (11:26 -0800)]
[util] In --debug mode, duplicate font data
This has the effect that the font data will end up in a memory
section malloc()ed exactly to its size. This gives us better
valgrind detection of out-of-bounds access.
Previously, the font data was placed in a mmap()ed section or
GString-allocated area, which didn't have proper protections
at the end when running under valgrind.
Behdad Esfahbod [Tue, 3 Nov 2015 01:58:12 +0000 (17:58 -0800)]
[perf] Micro-optimize
Behdad Esfahbod [Tue, 3 Nov 2015 01:52:45 +0000 (17:52 -0800)]
Remove irrelevant comment
I tried moving the is_default_ignorable() function to an INTERNAL
function. That made the binary size grow by 5k AND things got a
tad bit slower!
Behdad Esfahbod [Tue, 3 Nov 2015 01:44:05 +0000 (17:44 -0800)]
Minor
Behdad Esfahbod [Tue, 3 Nov 2015 01:36:51 +0000 (17:36 -0800)]
Combine unicode_props0/1 into a uint16
Slightly faster. In prep for more changes.
Behdad Esfahbod [Tue, 3 Nov 2015 01:27:48 +0000 (17:27 -0800)]
[perf] Only call combining_class() for marks
Saves some time. Also preparing for reusing the ccc byte for other stuff.
Behdad Esfahbod [Mon, 2 Nov 2015 23:43:08 +0000 (15:43 -0800)]
Make max context-length and max nesting level configurable
...at compile time.
Behdad Esfahbod [Mon, 2 Nov 2015 23:37:29 +0000 (15:37 -0800)]
[ot] Make bad-hmtx handling match FreeType
Also route fuzzing-related tests through hb-ot-font, to reduce dependency
on FreeType behavior for badly-broken fonts. Fixes failing test with
FreeType master.
Behdad Esfahbod [Mon, 26 Oct 2015 21:05:05 +0000 (14:05 -0700)]
Use templates for making sure expression is constant
Behdad Esfahbod [Wed, 21 Oct 2015 20:51:40 +0000 (18:51 -0200)]
Update comments for removal of compat decompositions
Behdad Esfahbod [Wed, 21 Oct 2015 19:20:55 +0000 (17:20 -0200)]
Disable compatibility decomposition usage during normalization
Fixes https://github.com/behdad/harfbuzz/issues/152
Behdad Esfahbod [Wed, 21 Oct 2015 13:23:12 +0000 (11:23 -0200)]
Fix two more -Wshadow warnings
https://bugzilla.mozilla.org/show_bug.cgi?id=1215894
Behdad Esfahbod [Wed, 21 Oct 2015 13:20:55 +0000 (11:20 -0200)]
Fix one more -Wshadow warning
https://bugzilla.mozilla.org/show_bug.cgi?id=1215894
Behdad Esfahbod [Wed, 21 Oct 2015 13:16:49 +0000 (11:16 -0200)]
Fix a few more -Wshadow-local warnings
https://bugzilla.mozilla.org/show_bug.cgi?id=1215894
Behdad Esfahbod [Wed, 21 Oct 2015 13:13:21 +0000 (11:13 -0200)]
Fix one -Wshadow-compatible-local warning
From https://bugzilla.mozilla.org/show_bug.cgi?id=1215894
Behdad Esfahbod [Wed, 21 Oct 2015 13:10:10 +0000 (11:10 -0200)]
Avoid unnecessary cast to 64-bit
Fixes https://github.com/behdad/harfbuzz/issues/146
Or I think it should.
Behdad Esfahbod [Wed, 21 Oct 2015 13:04:28 +0000 (11:04 -0200)]
Add HB_FALLTHROUGH
Borrowed from https://bugzilla.mozilla.org/show_bug.cgi?id=1215411
Behdad Esfahbod [Tue, 20 Oct 2015 18:39:41 +0000 (16:39 -0200)]
Fix typo
Behdad Esfahbod [Tue, 20 Oct 2015 17:21:18 +0000 (15:21 -0200)]
Add BUILD.md to dist
Behdad Esfahbod [Tue, 20 Oct 2015 17:19:41 +0000 (15:19 -0200)]
Merge pull request #148 from ebraminio/inst
Add BUILD.md based on harfbuzz.org docs
Behdad Esfahbod [Mon, 19 Oct 2015 18:59:43 +0000 (16:59 -0200)]
Merge pull request #147 from ebraminio/dockerci
[ci] change to docker infrastructure
Ebrahim Byagowi [Mon, 19 Oct 2015 18:11:01 +0000 (21:41 +0330)]
[ci] change to docker infrastructure
Ebrahim Byagowi [Mon, 19 Oct 2015 18:32:12 +0000 (22:02 +0330)]
Add BUILD.md based on harfbuzz.org docs
Behdad Esfahbod [Thu, 15 Oct 2015 23:25:29 +0000 (20:25 -0300)]
1.0.6
Behdad Esfahbod [Thu, 15 Oct 2015 23:20:22 +0000 (20:20 -0300)]
[ft] Revert change-of-behavior of hb_ft_font_create() introduced in 1.0.5
The default FreeType load flags where changed from FT_LOAD_NO_HINTING
to FT_LOAD_DEFAULT in
2a9627c5641cd000e2adff0e42a0dc687b53ec70.
This is crashing HarfBuzz-enabled FreeType as I suppose it causes
infinite recursion between HB and FT autohinter...
Revert the behavior change.
Fixes https://github.com/behdad/harfbuzz/issues/143
Behdad Esfahbod [Thu, 15 Oct 2015 15:55:57 +0000 (12:55 -0300)]
Add tests for a couple of fixed issues found by libFuzzer
From:
https://github.com/behdad/harfbuzz/issues/139#issuecomment-
147616887
https://github.com/behdad/harfbuzz/issues/139#issuecomment-
148289957
Behdad Esfahbod [Thu, 15 Oct 2015 15:47:22 +0000 (12:47 -0300)]
[ot-font] Fix hmtx wrong table length check
Discovered by libFuzzer. Ouch!
https://github.com/behdad/harfbuzz/issues/139#issuecomment-
148289957
Behdad Esfahbod [Wed, 14 Oct 2015 02:33:28 +0000 (23:33 -0300)]
Reduce max nesting level from 8 to 6
We probably should implement better system to catch cyclic lookups.
But for now, this speeds up worst case behavior with broken fonts
considerably without compromising legitimate usecases.
https://github.com/behdad/harfbuzz/issues/139#issuecomment-
147788447
Behdad Esfahbod [Tue, 13 Oct 2015 13:55:33 +0000 (10:55 -0300)]
1.0.5
Behdad Esfahbod [Tue, 13 Oct 2015 13:32:56 +0000 (10:32 -0300)]
[ot-font] Fix leak
https://github.com/behdad/harfbuzz/issues/139#issuecomment-
147616887
Behdad Esfahbod [Tue, 13 Oct 2015 04:33:59 +0000 (00:33 -0400)]
Add test for previous commit
Behdad Esfahbod [Tue, 13 Oct 2015 04:30:50 +0000 (00:30 -0400)]
Fix another memory access issue discovered by libFuzzer
Fixes https://github.com/behdad/harfbuzz/issues/139#issuecomment-
146984679
Behdad Esfahbod [Mon, 12 Oct 2015 21:39:52 +0000 (17:39 -0400)]
[fuzz] Add fuzzing script from kcc@
https://github.com/behdad/harfbuzz/issues/139
Behdad Esfahbod [Mon, 12 Oct 2015 21:21:52 +0000 (17:21 -0400)]
Extern "C" custom-allocator declerations
Behdad Esfahbod [Mon, 12 Oct 2015 01:41:04 +0000 (21:41 -0400)]
Behdad Esfahbod [Mon, 12 Oct 2015 00:59:29 +0000 (20:59 -0400)]
Typo
Behdad Esfahbod [Fri, 9 Oct 2015 18:23:15 +0000 (14:23 -0400)]
Fix another sanitize bug
Also discovered by "libFuzzer".
Behdad Esfahbod [Fri, 9 Oct 2015 16:34:02 +0000 (12:34 -0400)]
Add test for previous fix
Behdad Esfahbod [Fri, 9 Oct 2015 16:25:55 +0000 (12:25 -0400)]
Fix return value of sanitize when subformat is not readable
This is a fix on top of the previous issue fixed in
c917965b9e6fe2b21ed6c51559673288fa3af4b7.
This was caught by "libFuzzer" testing.
Behdad Esfahbod [Fri, 9 Oct 2015 16:20:58 +0000 (12:20 -0400)]
Add hb_dispatch_context_t
Behdad Esfahbod [Thu, 8 Oct 2015 16:51:02 +0000 (12:51 -0400)]
Add hb_font_set_parent()
No reason to not have it. Makes life easier later.
We (hb-ft, hb-ot-font, etc) can use this API to inject new
parent into a font...
Behdad Esfahbod [Thu, 8 Oct 2015 16:47:15 +0000 (12:47 -0400)]
[ft] Add version for new API
Behdad Esfahbod [Wed, 7 Oct 2015 21:33:20 +0000 (17:33 -0400)]
[ft] API: Add hb_font_[sg]et_load_flags() API
This changes the default load_flags of fonts created using
hb_ft_font_create() from NO_HINTING to DEFAULT. Hope that doesn't
break too much client code.
Code calling hb_ft_font_set_funcs() is unaffected.
Behdad Esfahbod [Wed, 7 Oct 2015 21:33:02 +0000 (17:33 -0400)]
Minor
Behdad Esfahbod [Sat, 3 Oct 2015 12:20:55 +0000 (13:20 +0100)]
Allow compiling with custom allocators
User can define hb_malloc_impl, etc, to name of custom allocator functions
that have the same signature as malloc.
Behdad Esfahbod [Fri, 2 Oct 2015 13:38:20 +0000 (14:38 +0100)]
Default font scale to face upem
Makes for a better default and avoids nasty inheritance issues.
See mailing list thread "Default hb_font_t scale".
Behdad Esfahbod [Fri, 2 Oct 2015 13:21:29 +0000 (14:21 +0100)]
Make hb_font_create_sub_font() NOT make parent immutable
We don't rely on that. However, whenever hb_font_make_immutable()
is called, it makes its parenting chain immutable.
Behdad Esfahbod [Fri, 2 Oct 2015 07:21:12 +0000 (08:21 +0100)]
Fix hb-ot-shape-normalize with empty buffer
Part of https://github.com/behdad/harfbuzz/issues/136
Behdad Esfahbod [Fri, 2 Oct 2015 07:02:29 +0000 (08:02 +0100)]
Replace a couple of malloc()s with calloc()
Behdad Esfahbod [Fri, 2 Oct 2015 06:25:52 +0000 (07:25 +0100)]
Fix segfault with empty buffer in hb_shape_plan_execute()
Move the empty-buffer check from hb_shape_full() to hb_shape_plan_execute().
Reported by Simon Cozens.
Behdad Esfahbod [Wed, 30 Sep 2015 21:51:16 +0000 (22:51 +0100)]
1.0.4
Behdad Esfahbod [Tue, 29 Sep 2015 13:57:02 +0000 (14:57 +0100)]
Define return_trace()
Not functional change (expected!).
Behdad Esfahbod [Tue, 29 Sep 2015 13:45:35 +0000 (14:45 +0100)]
Add missing returns
Fixes possible invalid read of two bytes.
Reported by Behzad Najjarpour Jabbari, Secunia Research.
Behdad Esfahbod [Tue, 29 Sep 2015 13:34:56 +0000 (14:34 +0100)]
Micro-optimize hb_language_from_string()
As measured / improved by Benson Limketkai.
Sascha Brawer [Sun, 28 Jun 2015 01:29:47 +0000 (03:29 +0200)]
Handle language tags that indicate phonetic IPA transcription
The BCP-47 registry defines a variant subtag "fonipa" that can be used
in combination with arbitrary other language tags. For example,
"rm-CH-fonipa-sursilv" indicates the Sursilvan dialect of Romansh
as used in Switzerland, transcribed used the International Phonetic
Alphabet.
http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
Behdad Esfahbod [Thu, 3 Sep 2015 11:23:22 +0000 (15:53 +0430)]
Fix Since tags
Fixes https://github.com/behdad/harfbuzz/issues/103
Behdad Esfahbod [Thu, 3 Sep 2015 10:25:59 +0000 (14:55 +0430)]
Fix Since: version tags on font and face APIs
A while back we marked every API as version:1.0. We should fix them all
to reflect real version they were introduced. This is a start.
Patch from Nikolay Sivov.
Behdad Esfahbod [Tue, 1 Sep 2015 16:03:50 +0000 (17:03 +0100)]
1.0.3
Behdad Esfahbod [Tue, 1 Sep 2015 15:26:35 +0000 (16:26 +0100)]
[indic] Add comments to merge_clusters calls
Behdad Esfahbod [Tue, 1 Sep 2015 15:24:54 +0000 (16:24 +0100)]
[thai] Respect cluster-level > 0
Behdad Esfahbod [Tue, 1 Sep 2015 15:24:34 +0000 (16:24 +0100)]
[use] Merge /before/ reordering
Behdad Esfahbod [Tue, 1 Sep 2015 15:24:13 +0000 (16:24 +0100)]
[hangul] Merge /before/ reordering
Behdad Esfahbod [Tue, 1 Sep 2015 15:23:40 +0000 (16:23 +0100)]
[OT] Merge /before/ reordering
Behdad Esfahbod [Tue, 1 Sep 2015 15:15:25 +0000 (16:15 +0100)]
[myanmar] Use buffer->sort() to sort cluster
This can possibly produce more granular clusters.
Behdad Esfahbod [Tue, 1 Sep 2015 15:13:32 +0000 (16:13 +0100)]
[OT] Merge clusters when reordering marks for normalization
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=541608
and cluster test.
Behdad Esfahbod [Tue, 1 Sep 2015 15:12:44 +0000 (16:12 +0100)]
[tests] Add Hebrew test for normalization under cluster-level=1
Currently fails.
https://bugzilla.gnome.org/show_bug.cgi?id=541608
Behdad Esfahbod [Tue, 1 Sep 2015 15:11:27 +0000 (16:11 +0100)]
Minor
Behdad Esfahbod [Tue, 1 Sep 2015 14:07:52 +0000 (15:07 +0100)]
Use insertion-sort instead of bubble-sort
Needed for upcoming merge-clusters fix.
Behdad Esfahbod [Tue, 1 Sep 2015 13:45:46 +0000 (14:45 +0100)]
Minor
Behdad Esfahbod [Mon, 31 Aug 2015 18:41:01 +0000 (19:41 +0100)]
Update git.mk from upstream
Behdad Esfahbod [Mon, 31 Aug 2015 18:18:10 +0000 (19:18 +0100)]
[docs] Move docs/reference/ contents into docs/
Behdad Esfahbod [Mon, 31 Aug 2015 18:16:41 +0000 (19:16 +0100)]
[docs] Fix out-of-tree build
Behdad Esfahbod [Mon, 31 Aug 2015 09:46:01 +0000 (10:46 +0100)]
Merge pull request #131 from simoncozens/docs
Use gtk-doc to build user's manual as well as reference
Simon Cozens [Mon, 31 Aug 2015 09:40:17 +0000 (10:40 +0100)]
Combine user / reference information into gtk-doc generated manual.
Simon Cozens [Mon, 31 Aug 2015 09:39:10 +0000 (10:39 +0100)]
Correct tag hierarchy, to allow for table-of-contents entries.
Simon Cozens [Mon, 31 Aug 2015 09:31:09 +0000 (10:31 +0100)]
Missing tag (oops).
Behdad Esfahbod [Mon, 31 Aug 2015 09:12:05 +0000 (10:12 +0100)]
[docs] Fix typo
Behdad Esfahbod [Mon, 31 Aug 2015 08:53:16 +0000 (09:53 +0100)]
Merge pull request #129 from simoncozens/docs
First two chapters. More to follow.
Behdad Esfahbod [Sun, 30 Aug 2015 16:33:04 +0000 (17:33 +0100)]
[test] Fix test-object
See previous commit.
Behdad Esfahbod [Sun, 30 Aug 2015 16:29:21 +0000 (17:29 +0100)]
Poison freed objects such that double-free is detected
Previously we were setting refcount of freed objects to the inert value, which
was harmful because it caused further destroy()s of the freed object to NOT
call free() and hence hide the bug. Indeed, after
eb0bf3ae6688b7 test-object
was double-free'ing objects and this was never caught on Linux. It only was
caught as crashing on Mac.
Now we poison refcount upon freeing and check that it's valid whenever reading
it. Makes test-object fail now.
Simon Cozens [Sat, 29 Aug 2015 07:21:18 +0000 (08:21 +0100)]
Current state and skeleton outline
Behdad Esfahbod [Tue, 25 Aug 2015 19:24:59 +0000 (20:24 +0100)]
[GPOS] Fix cursive connection with mix of RTL and non-RTL lookups
See thread "Issue with cursive attachment" started by Khaled.
Turned out fixing this wasn't as bad as I had assumed. I like the
new code better; we now have a theoretical model of cursive
connections that is easier to reason about.
Behdad Esfahbod [Tue, 25 Aug 2015 19:28:39 +0000 (20:28 +0100)]
[test] Add test for cursive-positioning with mixed directions
Fails now. Fix coming. See thread "Issue with cursive attachment"
started by Khaled. Test fonts were made by modifying test font
from Khaled to add more anchors.
Simon Cozens [Tue, 25 Aug 2015 18:57:15 +0000 (19:57 +0100)]
First two chapters. More to follow.
Behdad Esfahbod [Tue, 25 Aug 2015 17:55:34 +0000 (18:55 +0100)]
[GPOS] Rewrite cursive attachment slightly differently
In anticipation for upcoming fix for bug reported by
Khaled in thread "Issue with cursive attachment".
Behdad Esfahbod [Mon, 24 Aug 2015 12:49:55 +0000 (13:49 +0100)]
Add API/cmdline to show glyph extents when serializing buffer
New API: HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS
hb-shape now accepts --show-extents.
Patch from Simon Cozens.
Behdad Esfahbod [Mon, 24 Aug 2015 12:45:12 +0000 (13:45 +0100)]
[ot-font] Fix short-offset calculation