9409 Commits

Author SHA1 Message Date
Simon Cozens
bb7b634cd0 Simplify JSON unicode serialization
It’s just an array of codepoints; no need to turn them into objects
2020-10-09 22:27:55 -06:00
Simon Cozens
57a528ab2c Convert tabs to spaces 2020-10-09 22:27:55 -06:00
Simon Cozens
aff6a36266 Use auxbuffer for serialize_unicode_text 2020-10-09 22:27:55 -06:00
Simon Cozens
58bcc1cedd Serialize Unicode buffers 2020-10-09 22:27:55 -06:00
David Corbett
c39ab82c90 Fix usage text of gen-use-table.py 2020-10-06 16:51:40 -04:00
Garret Rieger
aace09a3ad [subset] Use glyphset gsub for layout variation indices collection. 2020-10-06 10:26:17 -07:00
Garret Rieger
1d9801e012 [subset] In AnchorMatrix::subset eliminate the use of dynamically allocated vector. 2020-10-05 14:43:29 -07:00
Garret Rieger
093909b2ff [subset] Fix wrong offset base for subsetting LigatureArray.
Offsets from LigatureArray must be relative to the beginning of the LigatureArray table. For the serialization mechanism to use the correct beginning point the LigatureArray must be created using the push()/pop() mechanism. So convert LigatureArray subsetting to use serialize_subset() instead of a manually called serialize and subset.
2020-10-05 13:14:53 -07:00
Garret Rieger
147e93b910 [subset] Fixes to get GPOS 5 subsetting code compiling. 2020-10-01 16:45:57 -07:00
Qunxin Liu
3a0b05faf1 [subset] GPOS 5 MarkToLigature subsetting support 2020-10-01 15:59:16 -07:00
Garret Rieger
718bf5aab3 [subset] only keep features reachable from script in the final subset.
Matches fontTools behaviour.
2020-09-29 13:16:01 -07:00
Garret Rieger
e583505334 [subset] Use plan->glyphset_gsub instead of plan->glyphset for GSUB/GPOS
This matches fontTools behaviour. glyphset_gsub does not contain gids added from closing over composite glyphs in glyf, since these cannot particpate in GSUB/GPOS processing.
2020-09-29 11:16:15 -07:00
David Corbett
a99e8721bf [use] Fix tests with MSVC 2020-09-29 09:54:33 -04:00
Garret Rieger
940e1c6f98 [subset] ChainContextFormat3 - don't subset glyph sequences.
The backtrack, input, and lookahead sequence must be matched in their entirety so these sequences should not be subset. If any of the coverage tables in a sequence subsets to empty then the whole subtable should be dropped since it's not possible for this lookup to be activated.
2020-09-28 17:22:01 -07:00
Garret Rieger
e31c2690f8 [subset] remove unnecessary returns. 2020-09-28 16:51:25 -07:00
Garret Rieger
ad241f9917 [subset] check that sub rules in ChainContextFormat 1 and 2 intersect the glyphs set before recursing during closure lookups. 2020-09-28 15:26:13 -07:00
Garret Rieger
9fad540245 [subset] check that sub rules in ContextFormat 1 and 2 intersect the glyphs set before recursing during closure lookups. 2020-09-28 13:24:25 -07:00
Koji Ishii
7e6070a47f Set *coord to nullptr 2020-09-28 08:36:41 -06:00
Koji Ishii
4e0bddb7fe get_baseline 2020-09-28 08:36:41 -06:00
Khaled Hosny
cc7b3a1abd [Docs] Address review comments 2020-09-26 10:22:39 +02:00
n8willis
41b46a3cb2 Update hb-face.cc 2020-09-26 09:47:27 +02:00
n8willis
726e320ece Update inline doc for hb_face_create: explain index 2020-09-26 09:47:27 +02:00
Nathan Willis
70331ca485 [Docs] Minor
update GTK-Doc comments in hb-ot-layout.
2020-09-26 09:47:13 +02:00
Nathan Willis
eb10ef46aa [Docs] Add GTK-Doc comments for hb-ot-font and hb-ot-shape. 2020-09-26 09:46:15 +02:00
Nathan Willis
3e72febde0 [Docs] Add GTK-Doc comments for hb-face. 2020-09-26 09:46:15 +02:00
Nathan Willis
88cdea60e0 [Docs] Add GTK-Doc comments to hb-shape-plan. 2020-09-26 09:46:10 +02:00
Nathan Willis
5b43eb5a4c [Docs] Add GTK-Dod comments to hb-unicode. 2020-09-26 09:42:22 +02:00
Garret Rieger
a5c0ec7516 [subset] For [Chain]ContextFormat3 make sure the sub table intersects the retained glyphset before recursing to its lookups.
Otherwise the lookup closure will potentially pull in lookups which cannot be accessed via the retained glyph set.
2020-09-25 14:57:20 -07:00
Garret Rieger
dc375559fd [subset] shrink the serialize buffer when pruning empty offsets in ChainContextFormat2.
Currently the code reduces the array length, but does not trim back the space allocated in the serializer for those empty offsets.
2020-09-25 13:08:46 -07:00
Garret Rieger
90eb1a40eb [subset] In ChainContextFormat3 don't skip subsetting if backtrack or lookahead are empty.
It's valid to have a ChainContextFormat3 with either an empty backtrack or lookahead. Only drop the lookup if the input sequence is empty.
2020-09-25 12:36:32 -07:00
Fabrice Fontaine
2604201ae0 src/meson.build: allow introspection when cross-compiling
introspection can be enabled when cross-compiling on certains conditions
(for example it is supported by buildroot) so, as suggested by
Tim-Philipp Müller, disable it by default for cross builds unless the
option was explicitly enabled by the user

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-09-25 18:40:43 +02:00
Khaled Hosny
df00f45e26 Fix annotation in previous commits 2020-09-24 11:57:46 +02:00
Nathan Willis
5a695a79a0 Swap # for () in gtk-doc function mention. 2020-09-24 11:57:46 +02:00
n8willis
379be7b7c8 Update src/hb-ot-var.cc
Co-Authored-By: Khaled Hosny <khaledhosny@eglug.org>
2020-09-24 11:57:46 +02:00
Nathan Willis
938add712a Add GTK-Doc comments for hb-ot-var. 2020-09-24 11:55:09 +02:00
Khaled Hosny
9a1be3fed5 Fix enum documentation syntax 2020-09-22 16:46:03 +02:00
n8willis
3c9244e662 Update src/hb-aat-layout.cc
Co-Authored-By: Khaled Hosny <khaledhosny@eglug.org>
2020-09-22 15:59:42 +02:00
Nathan Willis
d619ba0681 Add gtk-doc documentation to AAT layout functions and enums. 2020-09-22 15:59:14 +02:00
Nathan Willis
514e6baaf0 [gtk-doc] document AAT functions and enums. 2020-09-22 15:59:11 +02:00
Behdad Esfahbod
a1f4d285e1 [buffer] Fix invalid write access in hb_buffer_deserialize_glyphs()
If buffer is immutable, we were trying to set content_type on it.
Ouch!
2020-09-21 16:50:11 -06:00
ebraminio
1f8b1e7f18
[ENOMEM] Return gracefully if stages isn't initialized correctly (#2639)
This happens if calls to 'm.lookups[table_index].push ()' has been
silently failed due to lack of memory.

This change just returns gracefully instead issuing the assert.

Fixes https://crbug.com/oss-fuzz/24494
2020-09-21 11:39:38 +03:30
Behdad Esfahbod
e40c0d82e2 [ENOMEM] Handle immutable buffer in shape_full()
Move the content_type changing to shape_plan_execute() where it belongs.
Skip setting if content type is UNKNOWN, which happens with empty buffers
only, including the immutable buffer.

Alternate fix to https://github.com/harfbuzz/harfbuzz/pull/2606
and https://github.com/harfbuzz/harfbuzz/pull/2625
2020-09-16 12:48:30 -06:00
Garret Rieger
bbbcad0dbb Revert "[ENOMEM] don't perform set process operations if the other set is in an error state."
This reverts commit f3929abafe3b64f15d0dc2d21ad7b493eeb92dfe.
2020-09-16 12:23:38 -06:00
Garret Rieger
f3929abafe [ENOMEM] don't perform set process operations if the other set is in an error state.
Running a process while the other set is in an error state can potentially corrupt this sets map map (for example by overwritting all of the major values with 0).
2020-09-16 10:36:30 -07:00
Simon Cozens
584d3a43b2
Merge pull request #2681 from khaledhosny/myanmar-liga
[myanmar] Don’t disable liga feature
2020-09-16 15:08:50 +01:00
Khaled Hosny
7d64b09765 [myanmar] Don’t disable liga feature
This seems to have been carried over from the Indic shaper, but
Uniscribe enables it by default.

See https://github.com/harfbuzz/harfbuzz/issues/2213#issuecomment-686062915
2020-09-12 21:45:19 +02:00
Garret Rieger
8c3d4de796 [subset] Fix integer underflow in ContextFormat2. 2020-09-11 15:52:46 -07:00
David Corbett
ac3f859a30 Demote unregistered vendor-specific language tags 2020-09-09 17:50:59 -04:00
Khaled Hosny
ee12c078ed
Merge pull request #2668 from rossburton/meson
meson: add hb-version.h to dependencies correctly
2020-09-08 15:37:30 +02:00
Khaled Hosny
695d85ca32
Merge pull request #2674 from rossburton/reprod
src/hb-gobject-enums.cc.tmpl: write out only the filename, not the full path
2020-09-08 15:37:00 +02:00