Khaled Hosny
9af0edd951
[docs] Document return value of hb_blob_get_data()
2020-12-24 21:41:14 +02:00
Khaled Hosny
f88e845fc7
[docs] Minor fixes
2020-12-24 21:34:14 +02:00
Nathan Willis
82092d4005
[docs] Update gtk-doc comments in hb-font
2020-12-24 21:34:14 +02:00
Nathan Willis
e8de26e1ef
[docs] Add gtkdoc comments to hb-buffer
2020-12-24 21:34:14 +02:00
Nathan Willis
d13b7eaaf1
[docs] Add gtkdoc comments to hb-blob
2020-12-24 21:34:14 +02:00
Nathan Willis
4cdb12a3fa
[docs] Add gtkdoc comments to hb-common
2020-12-24 21:34:14 +02:00
Nathan Willis
922c32eb2d
[docs] Add gtkdoc comments to hb-map
2020-12-24 21:30:03 +02:00
Nathan Willis
71af2c6d9b
[docs] Add gtkdoc comments to hb-set
2020-12-24 21:29:56 +02:00
Nathan Willis
ec98730ff6
[docs] regularize whitespace in function params
2020-12-24 21:29:47 +02:00
Khaled Hosny
fdf3e448fd
[docs] Improve hb-unicode docs a bit
...
Down to only one warning.
2020-12-24 00:52:02 +02:00
Khaled Hosny
0fd6144a5f
[docs] Fix warnings about unknown annotations
...
Use square brackets so that gtk-doc does not consider these to be
annotations.
2020-12-24 00:20:24 +02:00
Khaled Hosny
71a3b54f3c
2.7.3
2020-12-23 15:33:15 +02:00
Behdad Esfahbod
8560c3e355
Merge pull request #2774 from harfbuzz/misc-doc
...
Doc fixes
2020-12-23 00:25:10 -08:00
Ryan
769a21aab6
meson: avoid regenerating hb-version.h unnecessarily
...
The file is a dependency for the library as a whole, so previously editing the Meson build files at all would force a full rebuild. This will only rebuild it if the version has changed.
2020-12-23 00:22:06 -08:00
Khaled Hosny
c2e2c40bac
[docs] Fix gtk-doc comment syntax
...
The documentation was not picked otherwise.
2020-12-23 00:58:49 +02:00
Khaled Hosny
0826940821
[docs] Add messing sections
...
Docs for these sections were not generated at all.
2020-12-23 00:58:49 +02:00
Khaled Hosny
b8b13018ed
[docs] Make gtk-doc find these typedef’s
2020-12-23 00:58:43 +02:00
Khaled Hosny
8c3a530fd7
[docs] Some formatting fixes
2020-12-22 23:52:46 +02:00
Behdad Esfahbod
25c0a792e3
Remove unused+wrong UnsizedArrayOf<> operators
...
Said compiler is wrong to err since they are unused. But yeah, they
didn't make sense and were copy/paste leftover.
Fixes https://github.com/harfbuzz/harfbuzz/issues/2763
2020-12-10 14:29:47 -07:00
Khaled Hosny
07e304b2a4
Merge pull request #2755 from Myaamori/master
...
meson: use meson.current_source_dir() instead of @CURRENT_SOURCE_DIR@
2020-12-01 22:32:19 +02:00
Behdad Esfahbod
7c241651ac
[algs] Don't forward rvalue twice
...
Part of https://github.com/harfbuzz/harfbuzz/issues/2293
2020-11-30 16:38:53 -07:00
Behdad Esfahbod
53806e5b83
Tiny improvement on previous commit
...
Functionally the same.
2020-11-25 11:51:37 -07:00
Dominik Röttsches
a5f6f869e8
Drop layout table if layout lookup accelerator allocation failed
...
If the table is kept, when the table is present but only the accelerator
allocation failed, then we run into nullptr dereferences downstream in
hb_ot_map_t::apply when trying to access proxy.accels[i].
To fix this, instead of only setting lookup_count of accelerator_t
itself, drop the whole table to avoid hb-ot-map construction assuming
that the lookups will work correctly despite accelerator allocation
having failed.
Fixes:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24490
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24490
2020-11-25 10:18:04 -08:00
Myaamori
5f32fdff11
meson: use meson.current_source_dir() instead of @CURRENT_SOURCE_DIR@
...
@CURRENT_SOURCE_DIR@ is not listed as a valid string substitution
for custom targets in the Meson reference, and in practice
it does not get substituted when using the vs2019 backend.
2020-11-24 01:29:24 +00:00
David Corbett
b2e7bb2a7c
Don’t map BCP 47 to coincidentally similar OT tag
2020-11-22 19:35:47 -08:00
David Corbett
e1df2c5277
Map ISO 639 code qul to language system tag 'QUH '
2020-11-22 11:52:23 -07:00
Khaled Hosny
f579c66108
Mark variable unused
...
Hopefully fixes build with newer ragel.
https://github.com/adrian-thurston/ragel/issues/56
Fixes https://github.com/harfbuzz/harfbuzz/issues/2752
2020-11-21 08:41:06 -07:00
David Corbett
f83496a910
[use] Remove workaround for reserved code points
...
See <https://github.com/microsoft/font-tools/issues/12 >.
2020-11-20 15:37:37 -07:00
David Corbett
17da41bd06
Update language system tag registry to OT 1.8.4
2020-11-18 11:13:35 -08:00
Simon Cozens
fd8f4ffcc6
Trace reorder, not normalize
2020-11-17 09:05:40 +00:00
Simon Cozens
2e0193d741
Add more cast spaces
2020-11-17 09:05:40 +00:00
Simon Cozens
4bb6d54e3b
Missing cast
2020-11-17 09:05:40 +00:00
Simon Cozens
8e1bedc50b
Keep phase names
2020-11-17 09:05:40 +00:00
Simon Cozens
428c111f13
Fix spacing around casts
2020-11-17 09:05:40 +00:00
Simon Cozens
f19018da41
Smaller issues from review
2020-11-17 09:05:40 +00:00
Simon Cozens
8b3b835a0a
Trace normalization and preprocessing stages
2020-11-17 09:05:40 +00:00
Simon Cozens
b50099bff2
Trace reordering in pause functions
2020-11-17 09:05:40 +00:00
Fabrice Fontaine
0c3dcfae19
Merge remote-tracking branch 'upstream/master'
2020-11-17 07:31:07 +01:00
David Corbett
3bd43bd023
Map more ISO 15924 variants to `hb_script_t`s
2020-11-16 22:18:15 -08:00
David Corbett
27170e058d
Fix names for language tag in gen-tag-table.py
...
A BCP 47 language tag with both a script subtag and a region subtag
would be printed as a human-readable name in hb-ot-tag-table.hh as if it
only had its language subtag.
2020-11-16 10:59:07 -08:00
David Corbett
49ebb9ebdd
[use] Remove redundant O entries from the table
2020-10-17 22:07:34 +02:00
David Corbett
79fd5ce22e
[use] Merge IND and Rsv classes into O
2020-10-17 22:07:34 +02:00
Behdad Esfahbod
cde2cf84c0
[use] Minor clean-up of unused categories
2020-10-17 11:22:19 -04:00
David Corbett
0792690b73
[use] Skip WJ and ZWJ when clustering
2020-10-16 22:39:46 -07:00
Laurenz
3fcf466b7b
[hb-shape-fallback] Use signed int for correction
2020-10-16 17:57:38 -07:00
Behdad Esfahbod
77e704d1db
[buffer] Add assert_unicode()/assert_glyphs() and use internally
2020-10-15 02:02:04 -06:00
Behdad Esfahbod
5ef0613909
[buffer] Add ensure_glyphs()/ensure_unicode()
...
Use in deserialize. To be used more.
2020-10-15 01:54:28 -06:00
Behdad Esfahbod
3232e6f2a9
[buffer] Add hb_buffer_has_positions()
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2716
2020-10-15 00:20:17 -06:00
David Corbett
dec52006d9
Map BCP 47 tags to all macrolanguages
...
The general rule is that if a BCP 47 macrolanguage maps to an OpenType
language system tag, all its individual languages map to it too.
Previously, a tag like "prs" (Dari) would not map to the language system
tag ('FAR ') of its macrolanguage ("fa") because "prs" already has its
own language system tag ('DRI '). That exception has been removed: now
"prs" maps to 'DRI ' and falls back to 'FAR '.
2020-10-11 11:38:40 -07:00
David Corbett
1d53268dfe
Fix two-way mapping of "man" and 'MNK '
2020-10-11 11:38:40 -07:00
David Corbett
ab38cf6746
Map hy-arevmda to 'HYE ' instead of HYE0
2020-10-11 11:38:40 -07:00
David Corbett
916c5a9007
Consistently emit BCP 47 subtag scope suffixes
2020-10-11 11:38:40 -07:00
Behdad Esfahbod
1c05f6789b
[buffer] Increase work limits
...
Our previous limits of 64 per input character was already hit
by David Corbett's under-development Duployan font.
Increase work limits by factor of 16, and number of glyphs by factor of 2.
Fixes https://github.com/harfbuzz/harfbuzz/issues/2707
2020-10-11 12:28:25 -06:00
Behdad Esfahbod
b37edebfcb
[buffer/deserialize] Do not clear() buffer upon content type mismatch
...
We return false. I don't see reason to clear buffer.
2020-10-09 22:27:56 -06:00
Behdad Esfahbod
c396e1600f
[buffer/deserialize] Accept arbitrary glyph names
...
Accepts escapes. Added TODO items for matching escaping in serialize().
2020-10-09 22:27:56 -06:00
Behdad Esfahbod
4a4eebcf86
[buffer/serialize] Minor renames in Ragel machines
...
As per my previous review on:
https://github.com/harfbuzz/harfbuzz/pull/2687
2020-10-09 22:27:56 -06:00
Behdad Esfahbod
78fb6a11af
Whitespace
2020-10-09 22:27:55 -06:00
Behdad Esfahbod
140552cec9
[buffer/serialize] Only serialize empty buffers of CONTENT_TYPE_INVALID
2020-10-09 22:27:55 -06:00
Behdad Esfahbod
8f5d8b155c
[buffer] Buffer start <= end <= len requirement in (de-)serialize
2020-10-09 22:27:55 -06:00
Behdad Esfahbod
3b64122a7f
[buffer] Fix immutable case with end_ptr==nullptr
2020-10-09 22:27:55 -06:00
Simon Cozens
7c0bc0bb92
Serialize invalid buffer to !! (text) or [] (json)
...
There is no generic deserialize - you have to choose glyphs or unicode - so there is no way to deserialize this buffer.
2020-10-09 22:27:55 -06:00
Simon Cozens
5bb88c4f45
Oops debug print
2020-10-09 22:27:55 -06:00
Simon Cozens
f56eb402f0
Immutable buffer fix
2020-10-09 22:27:55 -06:00
Simon Cozens
150f391438
Prohibit mixed glyphs/unicode buffers in deserialization
2020-10-09 22:27:55 -06:00
Simon Cozens
6b1726b6ef
Typos
2020-10-09 22:27:55 -06:00
Simon Cozens
3d3c87e7e7
Put the flags back in and serialize clusters.
...
Note that now JSON glyph buffers and Unicode buffers look very similar, except for the g/u property difference.
2020-10-09 22:27:55 -06:00
Simon Cozens
c03a2001b2
Deserialization routines for Unicode buffers
2020-10-09 22:27:55 -06:00
Simon Cozens
c0716bb5dc
Move delimiter addition into hb-buffer-serialize
2020-10-09 22:27:55 -06:00
Simon Cozens
36ede56962
Fix docs
...
Note the delimiters stuff isn’t true yet, will be working on that
2020-10-09 22:27:55 -06:00
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 f3929abafe
.
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
David Corbett
91fe20f0f5
Disambiguate OT tags when primary tag is not first
2020-09-08 09:20:00 -04:00
Alexander Kanavin
e876886d1e
src/hb-gobject-enums.cc.tmpl: write out only the filename, not the full path
...
This is beneficial for reproducible builds, as build paths can vary
between builds.
2020-09-08 11:00:32 +01:00
Ross Burton
5aff83104e
[build] generate hb-version.h once at configure time with Meson
...
Currently with Meson hb-version.h is generated during the build without
any explicit dependencies which can result in build failures due races
over the file.
Change this to be generated at configure time, so that the file is always
generated once before the build itself.
Closes #2667
2020-09-08 09:42:27 +01:00
Ross Burton
bc1c93fbe0
[build] No need to pass source directory to gen-hb-version
...
The input file is by definition in the source directory, so dirname()
that instead of needing the directory to be passed.
Needed because a follow-up commit will change when this is called, and the
source directory isn't trivially available at that point.
2020-09-08 09:40:56 +01:00
David Corbett
faf09f5466
[USE] Support hieroglyph clusters
2020-09-02 19:50:49 -04:00
David Corbett
06f49fc8ae
[USE] Update to the 2020-08-13 USE specification
...
This also uses the data files from
<78b2134fdc/USE
>.
2020-09-02 19:50:49 -04:00
David Corbett
6a38adeb57
[use] Skip most default ignorables when clustering
2020-09-02 15:51:15 -07:00
David Corbett
645f4e7cdd
Unhide CGJ before ccc=0 characters
...
If a CGJ precedes a starter, then it cannot have blocked any reordering,
so it can safely be skipped.
2020-09-02 15:51:15 -07:00
Garret Rieger
9825e3dd2e
[ENOMEM] fix access to unitialized memory.
...
If the serialize() call fails to write the object then we can't safely read varstore_prime fields. Fixes https://oss-fuzz.com/testcase-detail/5137462782066688 .
2020-09-02 11:01:07 -07:00
Khaled Hosny
fe6381d9f1
[build] Minor
2020-09-01 03:44:01 +02:00
ebraminio
a4f3a752dd
[build] hb-directwrite needs a C++ linker
2020-09-01 03:21:12 +02:00
Khaled Hosny
9c98b2b9a9
2.7.2
2020-08-29 00:39:42 +02:00
David Corbett
a495a54236
Ignore T & U when determining the joining scripts
2020-08-28 14:33:25 -04:00
David Corbett
420a74f772
[USE] Fix assertion failure for joining scripts
2020-08-28 14:11:48 -04:00
ebraminio
1e48225ca3
[ENOMEM] Check whether serialize context isn't in error
2020-08-13 23:22:14 +04:30
Ebrahim Byagowi
05ef75c553
2.7.1
2020-08-13 20:54:53 +04:30
Ebrahim Byagowi
253a8f7a51
[meson] Another approach to skip tests incompatible with MSVC
2020-08-13 18:28:42 +04:30
Ebrahim Byagowi
411b426c69
[meson] minor
2020-08-13 18:28:42 +04:30
Ebrahim Byagowi
6e32145dc9
[meson] Make compatbile with 0.47.0
2020-08-13 18:28:42 +04:30
Ebrahim Byagowi
58209c86a0
[meson] Make compatbile with 0.49.0
...
Contains a just put together summary feature polyfill and workaround
to broken ternary operator.
2020-08-13 18:28:42 +04:30
Garret Rieger
1e4fe10b98
[ENOMEM] check for error in visited map during closure features.
2020-08-13 01:43:11 +04:30
Garret Rieger
9562239f05
[ENOMEM] check for error in lookup visited set.
2020-08-13 01:43:11 +04:30
Tom Schoonjans
eea9b59fc5
[meson] fix generating introspection
...
Only libharfbuzz_gobject is introspectable, not libharfbuzz. Therefore,
it makes no sense to target the latter for introspection: it should
instead be listed as a dependency.
2020-08-12 16:07:30 +04:30
David Corbett
7bffb5d7ba
Generate `has_arabic_joining`
2020-08-12 11:34:49 +04:30
Garret Rieger
6f754852c1
[ENOMEM] skip asserts in to_bias if serializer is in an error state.
2020-08-12 11:25:30 +04:30
Ebrahim Byagowi
ef2e380342
Revert "Remove cmake-config support of HarfBuzz"
...
This reverts commit 75efa89343
.
2020-08-12 01:00:33 +04:30
Ebrahim Byagowi
0ca3557048
Turn -Wunused-but-set-variable to warning
...
As #2555 turned out some glib headers are imposing that so let's turn it to warning
2020-08-12 00:38:00 +04:30
Ebrahim Byagowi
5193357832
Revert "Remove autotools build support"
...
This reverts commit 01ac32aab2
.
2020-08-11 23:51:59 +04:30
Ebrahim Byagowi
9748ae7299
Revert "Reordering fails when GDEF table is absent #2140 "
...
This reverts commit f4cd99f28e
.
As requested in https://github.com/harfbuzz/harfbuzz/issues/2516#issuecomment-670969185
2020-08-11 22:51:48 +04:30
ebraminio
d03eecb4d6
[glyf] minor
...
style improvement
2020-08-11 16:40:40 +04:30
ebraminio
732a9164d9
[gvar] minor
2020-08-11 16:37:55 +04:30
ebraminio
0c1561894a
[glyf] minor
2020-08-10 08:52:01 +04:30
Ebrahim Byagowi
f06d7331e8
[glyf] minor
2020-08-10 08:43:54 +04:30
Ebrahim Byagowi
db96c7f67a
[glyf] protect CompositeGlyph fields
...
Introduce methods instead
2020-08-10 08:43:54 +04:30
ebraminio
e5fe363aa5
[glyf] Minor, don't pass accelerator_t to points_aggregator_t
...
No need to pass it to aggregator itself
2020-08-10 07:39:36 +04:30
ebraminio
2b9927f7e1
[glyf] minor
...
No need to pass glyph_for_gid as a lambda now that we are passing the accelerator itself
2020-08-10 06:26:21 +04:30
Behdad Esfahbod
fce64a407d
Minor
2020-08-08 14:05:03 -06:00
Ebrahim Byagowi
ffe06c8f04
[glyf] Guard all the public APIs against null pool runs
...
Fixes https://crbug.com/oss-fuzz/24575 and https://crbug.com/oss-fuzz/24737
2020-08-08 13:43:49 +04:30
Ebrahim Byagowi
01ac32aab2
Remove autotools build support
2020-08-07 23:28:12 +04:30
Ebrahim Byagowi
1f519c2567
[glyf] Optimize retrieval of hmtx/vmtx/gvar
...
This should make glyf/gvar faster as makes it to invoke less table wrapper atomic operations and things.
$ meson build -Dexperimental_api=true --buildtype=release && ninja -Cbuild && build/perf/perf "--benchmark_filter=glyf.*- ot -"
Before:
extents/glyf - ot - SourceSerifVariable 46091 ns 46036 ns 16173
extents/glyf/vf - ot - SourceSerifVariable 4160142 ns 4154913 ns 174
extents/glyf - ot - Comfortaa 25754 ns 25726 ns 27030
extents/glyf/vf - ot - Comfortaa 2627804 ns 2624596 ns 265
extents/glyf - ot - Roboto 33556 ns 33540 ns 18513
draw/glyf - ot - SourceSerifVariable 2716848 ns 2715438 ns 256
draw/glyf/vf - ot - SourceSerifVariable 4602379 ns 4598907 ns 151
draw/glyf - ot - Comfortaa 1659364 ns 1658142 ns 417
draw/glyf/vf - ot - Comfortaa 2845100 ns 2842549 ns 246
draw/glyf - ot - Roboto 1571509 ns 1570060 ns 442
After:
extents/glyf - ot - SourceSerifVariable 34738 ns 34713 ns 21332
extents/glyf/vf - ot - SourceSerifVariable 3700510 ns 3698104 ns 187
extents/glyf - ot - Comfortaa 21604 ns 21595 ns 31907
extents/glyf/vf - ot - Comfortaa 2324787 ns 2323440 ns 296
extents/glyf - ot - Roboto 31259 ns 31246 ns 21814
draw/glyf - ot - SourceSerifVariable 2689230 ns 2687589 ns 260
draw/glyf/vf - ot - SourceSerifVariable 4625135 ns 4622036 ns 131
draw/glyf - ot - Comfortaa 1690336 ns 1689454 ns 402
draw/glyf/vf - ot - Comfortaa 2898748 ns 2897074 ns 241
draw/glyf - ot - Roboto 1570911 ns 1570138 ns 440
2020-08-07 01:21:19 +04:30
Ebrahim Byagowi
0907c10214
[gvar] minor
2020-08-07 00:15:32 +04:30
Ebrahim Byagowi
679fac87df
Skip hb_shape if buffer object is immutable
2020-08-06 23:47:35 +04:30
Ebrahim Byagowi
55c41f219f
[glyf] Clamp advance value result
...
Fixes a sanitizer complain https://circleci.com/gh/harfbuzz/harfbuzz/150247 revealed by 02d1ec1
2020-08-06 23:37:43 +04:30
Ebrahim Byagowi
02d1ec1658
[gvar] Don't fail on imprefect gvar
...
No need to fail even if gvar doesn't have that much glyphs
2020-08-06 22:18:35 +04:30
Ebrahim Byagowi
ec17b62457
[var] Apply variations on empty glyphs
...
It was ignoring empty glyphs for no good reason, this fixes it.
Fixes #2618
2020-08-06 20:16:11 +04:30
Ebrahim Byagowi
5cab55ca90
[gvar] minor
2020-08-06 18:54:58 +04:30
Ebrahim Byagowi
75efa89343
Remove cmake-config support of HarfBuzz
...
Reverts d38f37b2
as discussed in #2316
2020-08-03 16:45:17 +04:30
Ebrahim Byagowi
11bb8aa83e
[meson] limit check-libstdc++ check to 0.55
...
library(..., link_language: 'c') is introduced in 0.55 but we were relying on this anyway
assuming b_asneeded being true on meson.
#2614
2020-08-02 00:47:21 +04:30
Ebrahim Byagowi
9d3fbe0588
[meson] Add darwin versions to library()
...
We now have,
$ otool -L src/libharfbuzz.dylib
src/libharfbuzz.dylib:
@rpath/libharfbuzz.0.dylib (compatibility version 0.0.0, current version 0.0.0)
And with the change should we get
$ otool -L src/libharfbuzz.dylib
src/libharfbuzz.dylib:
@rpath/libharfbuzz.0.dylib (compatibility version 20700.0.0, current version 20700.0.0)
2020-08-02 00:34:29 +04:30
Garret Rieger
18ab8029d5
[ENOMEM] check vector status in cmap subsetting.
2020-08-02 00:30:17 +04:30
Garret Rieger
06dbb6acbb
[ENOMEM] in GSUB ChainContext subsetting check maps for allocation errors.
2020-08-01 09:21:22 +04:30
Garret Rieger
fb1477795c
[ENOMEM] Check result of vector resize in CBDT subsetting.
2020-08-01 09:20:52 +04:30
Ebrahim Byagowi
efd716de3f
[cff] Check for scalars array resize result
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24504
2020-07-31 09:27:27 +04:30
Garret Rieger
040ed094ef
[ENOMEM] popragate packed/packed_map errors to the serializer.
...
Will disable further modifications based on a bad state.
2020-07-31 08:39:26 +04:30
Garret Rieger
7f358a55f4
[ENOMEM] unchecked resize in CFF2.
2020-07-31 02:04:06 +04:30
Garret Rieger
32f052b033
[ENOMEM] Fix several instances of not checking resize in CFF.
2020-07-31 02:04:06 +04:30
Garret Rieger
4cbc7d61bc
[ENOMEM] check for unset current in serializer->length().
2020-07-31 02:04:06 +04:30
Garret Rieger
15644ee60e
[ENOMEM] fix memory leak if allocation fails during pop_pack().
2020-07-30 04:15:35 +04:30
Garret Rieger
42237adffc
[ENOMEM] make serializer modification operations no-ops if it's in an error state.
2020-07-30 03:59:49 +04:30
Ebrahim Byagowi
d1f1301490
[icu] Remove support for versions older than 49
...
It just doesn't make sense anymore, c9e5da8ded (r41018112)
2020-07-30 02:01:43 +04:30
Ebrahim Byagowi
0b74aaece7
[icu] Remove useless HB_UNUSED tags
...
As c9e5da8ded (r41018040)
2020-07-30 01:47:30 +04:30
Ebrahim Byagowi
c9e5da8ded
[icu] Remove support of ICU versions before 42
...
ICU 42 is released in 2012, see also 44a3136ae6 (commitcomment-41016353)
2020-07-30 01:03:07 +04:30
Garret Rieger
4ba8e3c6fd
[ENOMEM] Fix failure to check calloc return.
...
Fixes https://oss-fuzz.com/testcase-detail/6246465148813312 .
2020-07-30 00:08:08 +04:30
Garret Rieger
d307c24abf
[ENOMEM] check resize() return.
...
Fixes https://oss-fuzz.com/testcase-detail/5641892164009984 .
2020-07-30 00:08:08 +04:30
Ebrahim Byagowi
58a5961ca1
minor spacing tweak
2020-07-29 08:44:23 +04:30
Ebrahim Byagowi
07c43b8cf6
minor spacing tweak
2020-07-29 08:42:52 +04:30
Ebrahim Byagowi
5a7cc7fd8b
minor spacing tweak
2020-07-29 08:33:38 +04:30
Ebrahim Byagowi
48ad745996
[ENOMEM] Fix buffer's content check logic
...
So now rest of shape fuzzer also can be enabled.
Fixes #2571
2020-07-29 08:09:10 +04:30
Ebrahim Byagowi
c33e8006fd
[fuzz] Implement failing allocator
2020-07-29 07:35:34 +04:30
Ebrahim Byagowi
44a3136ae6
[glib] Default to glib's script type handling
...
2.29.14 is almost released a decade ago, no need to support archaic glib versions.
2020-07-29 07:05:31 +04:30
Garret Rieger
dae32b4f12
[subset] bail out of subsetting if plan allocation fails.
2020-07-29 06:37:25 +04:30
Ebrahim Byagowi
a01c7a380b
2.7.0
2020-07-25 12:40:57 +04:30
Evgeniy Reizner
b32f2e8b49
Remove unused code from the Khmer shaper.
2020-07-24 20:38:05 +04:30
Ebrahim Byagowi
46ec6db965
minor
2020-07-22 17:30:48 +04:30
insilications
83c44f69d3
[tests] fix PGO build testing
...
Adds 'mangle_path' to IGNORED_SYMBOLS
2020-07-21 03:05:28 +04:30
Ebrahim Byagowi
d0e2addd43
minor
2020-07-18 22:16:02 +04:30
Ebrahim Byagowi
7e3edfa454
minor
2020-07-18 19:03:36 +04:30
Qunxin Liu
8e5bc535d1
[subset] call collect_mapping only when --gids option is used.
...
collect_mapping is time consuming as it iterates all codepoints in all
cmap subtables, only trigger it when necessary
2020-07-16 11:25:53 -07:00
Ebrahim Byagowi
7c433ffde2
Add HB_CUSTOM_MALLOC definition
...
So one can use just HB_CUSTOM_MALLOC instead need for define each of hb_*alloc_impl
2020-07-15 09:38:12 +04:30
Ebrahim Byagowi
60959b08e5
[meson] execute find_program('gen-ragel-artifacts.py') only once
...
should rename the script also
2020-07-14 20:28:06 +04:30
Ebrahim Byagowi
5c8e1bd237
[meson] Don't allow introspection on static library
2020-07-14 18:02:40 +04:30
Ebrahim Byagowi
9566904cb3
[morx] minor, mark with unlikely
...
at least just to show this is the unusual path
2020-07-14 15:17:17 +04:30
Ebrahim Byagowi
11d583a9ea
[aat] Consume glyph insertion from buffer's max_ops ( #2223 )
...
Glyph insertion is an expensive operation and we like to have it limited
based on buffer's input size which is handled by buffer's max_ops.
clusterfuzz-testcase-minimized-harfbuzz_fuzzer-5754958982021120:
Before the change: 0.67s user 0.00s system 99% cpu 0.674 total
After the change: 0.02s user 0.00s system 98% cpu 0.024 total
Which takes much longer on valgrind and tsan bots.
2020-07-13 18:53:06 -07:00
Ebrahim Byagowi
6937092a66
[py] apply lgtm.com python suggestions
2020-07-13 23:37:52 +04:30
Ebrahim Byagowi
2a182128b9
[py] minor, comment buffer_add_utf8 call
...
mainly to apply lgtm suggestion, looks better also however,
some minor spacing is also applied.
2020-07-13 20:41:13 +04:30
Ebrahim Byagowi
cdf18e8338
[py] minor, remove unnecessary pass
...
discovered by lgtm
2020-07-13 20:07:51 +04:30
Ebrahim Byagowi
45d9e8d76c
[py] minor, remove unused import
2020-07-13 19:25:53 +04:30
Behdad Esfahbod
1dfa33854f
[arabic] Remove stale comment
2020-07-12 09:24:03 -07:00
Behdad Esfahbod
6a45df0a54
Fix -Wambiguous-reversed-operator warning
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2554
2020-07-08 18:17:40 -05:00
jfkthame
1e6027e29c
[aat] Correct array indexing when looking up actions in KerxSubTableFormat4 ( #2539 )
...
* [aat] Correct array indexing when looking up actions in KerxSubTableFormat4.
- For action_type 0 and 1, there are 2 values per action record; for action_type 2, there are 4. So we need to account for these factors when indexing into the ankrData array.
Fixes https://github.com/harfbuzz/harfbuzz/issues/2531 .
2020-07-05 22:44:10 +01:00
Ebrahim Byagowi
122a2897e4
[aat] Remove lcar support
...
Very low use, only two distinct font files, Apple Chancery.ttf and Hoefler Text.ttc
have it so it really doesn't worth the size addition and so, but one may argue that
whole ligature caret is low use but guess we better to encourage GDEF one anyway.
2020-07-06 00:05:36 +04:30
Ebrahim Byagowi
a3b9b94b63
[style] Remove fdsc support ( #2541 )
...
It isn't exposed yet and low use between Apple fonts,
32 fdsc table vs 767 OS/2 tables, even Apple doesn't
support it anymore per Ned.
2020-07-06 00:05:21 +04:30
Ebrahim Byagowi
a6fb8ce98a
Minor, fix -Wrange-loop-analysis warnings
...
Fixing these complains raised by newer versions of clang,
./hb-ot-layout-common.hh:1720:53: error: loop variable 'gid_klass_pair' is always a copy because the range of type 'hb_map_iter_t<hb_sorted_array_t<OT::HBGlyphID>, (lambda at ./hb-ot-layout-common.hh:1672:29), hb_function_sortedness_t::RETAINS_SORTING, nullptr>' does not return a reference [-Werror,-Wrange-loop-analysis]
for (const hb_pair_t<hb_codepoint_t, unsigned>& gid_klass_pair : + it)
And
./hb-ot-color-colr-table.hh:177:44: error: loop variable '_' is always a copy because the range of type 'hb_map_iter_t<hb_filter_iter_t<hb_map_iter_t<hb_range_iter_t<unsigned int, unsigned int>, (lambda at ./hb-ot-color-colr-table.hh:209:31), hb_function_sortedness_t::RETAINS_SORTING, nullptr>, (anonymous struct at ./hb-algs.hh:331:1) &, (anonymous struct at ./hb-algs.hh:51:1) &, nullptr>, (anonymous struct at ./hb-algs.hh:338:1) &, hb_function_sortedness_t::RETAINS_SORTING, nullptr>' does not return a reference [-Werror,-Wrange-loop-analysis]
for (const hb_item_type<BaseIterator>& _ : + base_it.iter ())
2020-07-05 11:18:04 +04:30
Jan Alexander Steffens (heftig)
4444482297
meson: Pin harfbuzz in .pc files to the built version
...
This ensures that we link -subset, -icu and -gobject with a matching
version of the main library.
2020-07-04 23:16:09 +04:30
Jan Alexander Steffens (heftig)
3adcf398a0
meson: Make Requires in .pc files match autotools
...
Libreoffice tries to use only harfbuzz-icu.pc and assumes this includes
-lharfbuzz.
2020-07-04 23:16:09 +04:30
Ebrahim Byagowi
6a2b0ba78a
[py] minor, replace exit with sys.exit
2020-07-04 16:16:15 +04:30
Ebrahim Byagowi
a07672d353
[py] minor, replace os.environ.get with os.getenv
2020-07-04 16:16:15 +04:30
Ebrahim Byagowi
359dbc97ae
[meson] Use the recommended way to generate harfbuzz.cc
...
As https://github.com/harfbuzz/harfbuzz/pull/2532
2020-07-04 13:55:48 +04:30
Ebrahim Byagowi
a7e82e4ffd
[meson] use the recommended way to generate hb-version.h
...
As https://github.com/harfbuzz/harfbuzz/pull/2532
2020-07-04 13:55:48 +04:30
Ebrahim Byagowi
404ecc252c
[meson] use basename in check scripts now that meson passes dir also
2020-07-04 13:55:48 +04:30
Ebrahim Byagowi
785a9a8f8a
[meson] use the recommended way to generate ragel headers
...
As described in https://github.com/mesonbuild/meson/issues/7156#issuecomment-629622827
2020-07-04 13:55:48 +04:30
Ebrahim Byagowi
5c07c291c7
[make] use sed the way autotools used to generate hb-version.h
...
Left from 1853f84 and now exactly is like 4fc6189a32
2020-07-04 04:33:46 +04:30
Ebrahim Byagowi
63322513e4
[make] Revert the way harfbuzz.cc and hb-version.h are generated
...
Partially reverts 4fc6189
2020-07-04 03:34:58 +04:30
Ebrahim Byagowi
1853f84abc
[py] overwrite harfbuzz.cc only when there is a needed change
2020-07-03 15:51:13 +04:30
Ebrahim Byagowi
82c6ddb986
[py] remove not needed imports
2020-07-03 15:51:13 +04:30
Ebrahim Byagowi
42d039cc99
[meson] minor
2020-07-03 04:49:12 +04:30
Ebrahim Byagowi
f2a80ab2c2
[meson] use null_dep idiom
2020-07-03 04:49:12 +04:30
Ebrahim Byagowi
d543923294
[fvar] minor
2020-07-02 01:30:24 +04:30
Hugo Beauzée-Luyssen
40ec187dec
win32: Cleanup PARTITION handling
...
Use the WINAPI_PARTITION macro to filter desktop/app flavors.
We use a negated desktop check because the default (for mingw-w64 at
least) is to allow all API by combining desktop + app partitions.
This causes build failures if we were to filter using
WINAPI_PARTITION(WINAPI_FAMILY_APP) because it would always be true, but
those API also require Windows 8 or later, while we only require Vista
Fixes warnings like
../src/hb-blob.cc:572:47: warning: 'WINAPI_FAMILY_PC_APP' is not defined, evaluates to 0 [-Wundef]
#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP)
^
../src/hb-blob.cc:572:86: warning: 'WINAPI_FAMILY_PHONE_APP' is not defined, evaluates to 0 [-Wundef]
#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP)
2020-07-01 13:05:14 +04:30
Ebrahim Byagowi
ea8e784146
[fvar] Improve naming
2020-07-01 01:33:02 +04:30
Ebrahim Byagowi
5de07b8acd
[fvar] Move normalize logic where it is actually filled
2020-07-01 01:33:02 +04:30
Ebrahim Byagowi
0f8dda2cf2
[fvar] Move shared axis filling values into a new method
2020-07-01 01:33:02 +04:30
Ebrahim Byagowi
98c42b3bc7
[fvar] Make AxisRecord fields protected
2020-07-01 01:33:02 +04:30
Behdad Esfahbod
7ee3194f98
[meta] Remove wrong comment
2020-06-28 15:41:44 -07:00
Behdad Esfahbod
26b9670d99
[ft] Better handle allocation failures
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2513
2020-06-28 14:52:15 -07:00
Behdad Esfahbod
26111a11ad
[dagger] Minor cleanup using hb_enumerate
2020-06-28 13:26:38 -07:00
Ebrahim Byagowi
08d57d9eca
Add hb_array_t::lfind
2020-06-28 13:13:25 +04:30
Behdad Esfahbod
a783840789
Always round up
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2496
2020-06-28 13:10:37 +04:30
Sebastian Rasmussen
2267da4ee0
[ft] Do not deference ft_font if it is nullptr ( #2502 )
2020-06-27 20:18:16 -07:00
Sebastian Rasmussen
a373e16131
[ot-shape] Free shape plan maps upon error creating data ( #2497 )
2020-06-27 20:09:45 -07:00
Sebastian Rasmussen
dbf9896e7a
[ft] Handle nullptr when destroying freetype font ( #2494 )
2020-06-27 19:57:34 -07:00
Ebrahim Byagowi
76ba619daa
Fix autotools's harfbuzz.cc build
...
How this works? gen-harfbuzzcc.py operates at its own source path (see its 7th line)
and that is reliable when used both on meson and autotools.
Just like 19ecabed
, weirdly this didn't come up sooner, guess it has something
to do with timestamps. Fortunately whole harfbuzz.cc just doesn't matter for
packagers but we can tag a release only for this if needed.
2020-06-25 01:37:52 +04:30
Sebastian Rasmussen
12a9d57292
[face] Destroy blob if face closure can not be created ( #2490 )
...
This fixes issue #2489 .
2020-06-23 12:25:43 -07:00
Ebrahim Byagowi
53b0a183c7
Remove concept of stable/unstable from build tools
...
We never practiced the concept of stable and unstable releases, let's
remove the code and always use the stable scheme.
2020-06-23 14:46:47 +04:30
Ebrahim Byagowi
e4203c1469
2.6.8
2020-06-22 12:51:22 +04:30
Ebrahim Byagowi
e541fb474c
minor, replace single hb_apply daggers with foreach
2020-06-21 10:31:39 +04:30
Ebrahim Byagowi
8bca9a420e
[fvar] minor
2020-06-21 09:18:12 +04:30
Ebrahim Byagowi
82ec9ef2e9
[fvar] minor simplification
2020-06-21 08:49:26 +04:30
Ebrahim Byagowi
4e37c48e37
[fvar] Remove get_axis_info and get_axis_deprecated
2020-06-21 08:49:26 +04:30
Ebrahim Byagowi
61c240f399
[fvar] Push _axis_info fill logic deeper
2020-06-21 08:49:26 +04:30
Ebrahim Byagowi
47a0fbec31
[meson] Mark longer tests with slow
...
So one can skip them easily by `meson test -Cbuild --no-suite slow`
2020-06-21 08:47:10 +04:30
Ebrahim Byagowi
b2d0dba5ef
[cpal] Port to dagger
2020-06-20 22:06:19 +04:30
Ebrahim Byagowi
25cf687443
Use dagger in OffsetTable::get_table_tags ( #2477 )
2020-06-19 14:06:50 -07:00
Ebrahim Byagowi
dce4353f86
Merge pull request #2476 from ebraminio/cv-get-chars
...
[layout] Use dagger in hb_ot_layout_feature_get_characters
2020-06-20 01:24:41 +04:30
Ebrahim Byagowi
89a2c46e61
[math] Use dagger ( #2478 )
...
* [math] Use dagger
* [ot-math] Address Behdad's review
2020-06-19 13:01:46 -07:00
Ebrahim Byagowi
d38eb49f46
Move the iteration logic to FeatureParamsCharacterVariants
...
Hopefully I can make members protected also.
2020-06-19 23:46:49 +04:30
Ebrahim Byagowi
9b3d4f457e
Use dagger in hb_ot_layout_feature_get_characters
...
The way it used to work was a bit nonidiomatic but the replacment
is idiomatic way of iterating used elsewhere.
The new code just doesn't check nullability of "characters", which isn't
what we do anywhere else.
2020-06-19 23:46:44 +04:30
Ebrahim Byagowi
63422c4cbc
[ot-layout] simplify
2020-06-19 23:26:18 +04:30
Ebrahim Byagowi
407bba3e0d
minor
...
move FeatureParamsCharacterVariants::sanitize method right above members
2020-06-19 23:12:56 +04:30
Ebrahim Byagowi
f1488152bd
[doc] Remove the not needed comment
...
All the other similar iterating API are like this and don't have such
comment, written at the time I wasn't familiar enough with the way such
API are shaped.
2020-06-19 23:07:30 +04:30
Behdad Esfahbod
1535440b48
[dispatch] Fix debug builds
2020-06-19 08:32:57 -07:00
Ebrahim Byagowi
bb9a40da65
[lcar] Use dagger
2020-06-19 19:22:47 +04:30
Behdad Esfahbod
6fbb59aba6
Use daggers in a few get_array functions
...
As I review https://github.com/harfbuzz/harfbuzz/pull/2471
2020-06-19 00:05:52 -07:00
Ebrahim Byagowi
a512ca8eae
Merge pull request #2473 from harfbuzz/gsub-alternate
...
fixes #673
2020-06-19 10:46:12 +04:30
Behdad Esfahbod
70d6696cc6
[dispatch] Don't require debug_depth for untraced objects
2020-06-18 17:09:39 -07:00
Behdad Esfahbod
5bc4cedde6
Rename
2020-06-18 17:04:35 -07:00
Behdad Esfahbod
dc492d7c8a
[dispatch] Comment
2020-06-18 17:03:05 -07:00
Behdad Esfahbod
25aec0265c
[dispatch] Default return type to hb_empty_t
2020-06-18 16:58:01 -07:00
Behdad Esfahbod
8d0a90ac1b
[dispatch] Default debug level to 0
2020-06-18 16:53:54 -07:00
Behdad Esfahbod
d7d8604ec8
Remove excessive trace routes
2020-06-18 16:51:24 -07:00
Behdad Esfahbod
e47a2ab8f8
Remove unused dispatcher names
2020-06-18 16:48:07 -07:00
Behdad Esfahbod
b2a1acccd9
Simplify get_glyph_alternates() dispatcher
...
Trying to make it **very simple** to add a specialized dispatcher for
one API to be routed to just a few objects (one in this case).
2020-06-18 16:41:31 -07:00
Behdad Esfahbod
ffe8d3f39d
Use dispatch for get_glyph_alternates_t
...
First time we do this in a way that if target object doesn't have the matching
function we basically "ignore". Risky but I feel like is the right decision
for this case.
I'm going to put back the template varargs and use those, which would make
the dispatcher be just that: "dispatcher", and wouldn't need to carry the
call context. That would be a refreshing change I think.
2020-06-18 16:31:39 -07:00
Behdad Esfahbod
bedf417121
Push get_glyph_alternates() work all the way down
2020-06-18 15:49:01 -07:00
Behdad Esfahbod
5bede33885
Whitespace
2020-06-18 15:25:19 -07:00
Behdad Esfahbod
e13aaaaa45
Move API to right place in header
2020-06-18 15:22:54 -07:00
Behdad Esfahbod
26514ad70e
Fix API comment
2020-06-18 15:22:07 -07:00
Ebrahim Byagowi
1bac85828c
[layout] Rename _get_alternates to _get_glyph_alternates
2020-06-18 22:56:07 +04:30
Behdad Esfahbod
9ef9ac3749
[gpos] Break cycle-of-2 when cursive attaching
...
Fix thinko this time around.
Fixes https://github.com/harfbuzz/harfbuzz/issues/2469
2020-06-17 22:59:10 -07:00
Ebrahim Byagowi
d3c169792b
[layout] move alternate buffer iteration logic to AlternateSet
2020-06-18 09:23:13 +04:30
Ebrahim Byagowi
1348a2c865
[layout] hb_ot_layout_lookup_get_alternates, a new API
...
An API to retrieve one-to-one alternates from a given GSUB lookup index.
2020-06-18 09:11:07 +04:30
Behdad Esfahbod
3fe7195713
Revert "[gpos] Break cycle-of-2 when cursive attaching"
...
This reverts commit 7090707de6
.
2020-06-17 17:51:08 -07:00
Behdad Esfahbod
7090707de6
[gpos] Break cycle-of-2 when cursive attaching
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2469
2020-06-17 17:41:48 -07:00
Behdad Esfahbod
e5de3918f7
[indic] Add comment
...
https://github.com/harfbuzz/harfbuzz/issues/2298#issuecomment-615318654
2020-06-17 16:54:23 -07:00
Behdad Esfahbod
41ef75f64a
[gsub] Don't substitute in ReverseChainSingleSubstFormat1 if missing substitute
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2467
2020-06-17 16:29:09 -07:00
Behdad Esfahbod
e7c79e16b8
Merge pull request #2287 from simoncozens/instrumentation
...
Add messages for GPOS/GSUB (take 2)
2020-06-17 15:32:40 -07:00
Simon Cozens
fe926970bc
Reformat messages again
...
Messages can be:
start/end table XXXX
start/end lookup NNNN
start/end subtable NNNN (for kerx/kern)
start/end chainsubtable NNNN (for morx)
2020-06-16 09:12:44 +01:00
Ebrahim Byagowi
cccdaf45df
[docs] minor
...
revealed now that we turned gobject/gir build to 'auto'
2020-06-12 11:15:37 +04:30
Ebrahim Byagowi
4e7cb7e2c4
minor, fix lists sorting
2020-06-12 01:38:16 +04:30
Qunxin Liu
973c47f6c9
[subset] Move 2 experimental public api methods to be private methods in GSUB/GPOS.
...
2 methods are: hb_ot_layout_closure_lookups and hb_ot_layout_closure_features
2020-06-12 01:20:30 +04:30
Nirbheek Chauhan
b88f1096ad
meson: Export symbols for a DLL when not building statically
...
`default_library` might be 'both', in which case we will fail to link
when building with MSVC.
2020-06-09 20:22:28 +04:30
Khaled Hosny
5c8900efe4
[coretext] Properly check for macOS 10.10
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2452
2020-06-08 03:20:54 +02:00
Ebrahim Byagowi
0151da23d6
[meson] Remove with_libstdcxx build option
...
This was done in #770 but no indication of anyone is using it,
let's remove it from our meson port and we can just don't care about
it in autotools port after the migration to meson.
2020-06-06 03:43:29 +04:30
Behdad Esfahbod
56719474c2
s/blacklist/blocklist/g
2020-06-05 12:57:23 -07:00
Christoph Reiter
03bd6ead44
[meson] Only pass required dependencies to everything
...
Instead of passing dependencies as required we used one giant shared
dependency list containing all dependencies for every library/executable.
While this kinda works, the specified deps are also used for generating
the pkg-config files and this leads to lots of Requires.private and Libs.private
entries which aren't really needed.
This removes the "deps" array and replaces it with a few smaller ones and
makes sure the public libraries only get passed the dependencies actually
needed.
Fixes #2441
2020-06-04 23:28:57 +04:30
Ebrahim Byagowi
759df46575
[style] Hide behind HB_EXPERIMENTAL_API compile flag
2020-06-04 20:33:39 +04:30
Ebrahim Byagowi
d54de56870
[style] Adopt with meson
2020-06-04 20:33:39 +04:30
Ebrahim Byagowi
de0ec5f4fe
[style] give ptem value when asked for opsz
...
ptem, used for AAT's tracking/`trak` table is equivalent to opsz of variable fonts.
For variable AAT fonts, such as SFNS, ideally variable axis of the hb_font_t
should be set and equivalent to ptem, https://crbug.com/1005969#c37
2020-06-04 20:33:39 +04:30
Ebrahim Byagowi
22037499b4
[style] New experimental API, hb_style_get_value
...
Searches variation axes of a hb_font_t object for a specific axis first,
if not set, then tries to get default style values from different
tables of the font.
2020-06-04 20:33:39 +04:30
Ebrahim Byagowi
d67553d12f
[meson] fix with_libstdcxx effect
...
oops
2020-06-04 12:31:57 +04:30
Ebrahim Byagowi
029ecf326e
[meson] Fix gen-hb-version.py run
...
It gets complicated apparently when executed in the dist process, let's use raw
names now that we are operating in the script folder anyway.
2020-06-04 03:35:28 +04:30
Ebrahim Byagowi
870304df76
[meson] Remove amalgam build option
...
Fixes #2444
2020-06-04 03:26:19 +04:30
Ebrahim Byagowi
b8320340ce
[meson] fix gen script input
...
matters more when harfbuzz is a subproject
2020-06-03 23:40:57 +04:30
Ebrahim Byagowi
50d3f531ee
Use output names in update-unicode-tables.make
2020-06-03 17:59:41 +04:30
Ebrahim Byagowi
fb46a32ed0
2.6.7
2020-06-03 12:56:07 +04:30
Ebrahim Byagowi
2309186468
Move unicode tables update script to its own make file
...
Also downloads things needed for unicode tables generators
2020-06-02 21:52:57 +04:30
Ebrahim Byagowi
19ecabed37
minor, fix hb-version.h generation for out-of-tree builds
2020-06-02 20:01:03 +04:30
Ebrahim Byagowi
9737170b6f
minor fixes on src gen scripts
2020-06-02 19:18:35 +04:30
Ebrahim Byagowi
a9d13463b5
[meson] Categorize tests using `suite: [...]`
...
So one can run a category of interested tests like
meson test -Cbuild --suite aots --suite src --print-errorlogs
Intead issuing particular tests which also is possible like
meson test -Cbuild test-shape --print-errorlogs
2020-05-30 16:58:46 +04:30
Ebrahim Byagowi
7250adee26
[tests] Port check scripts to python
2020-05-30 13:55:47 +04:30
Qunxin Liu
3c5bdd9bb8
[subset] GDEF AttachList subsetting support
2020-05-28 16:22:13 -07:00
Ebrahim Byagowi
368ca30641
minor on python scripts
...
* remove not needed imports
* remove semicolons
2020-05-29 00:48:32 +04:30
Ebrahim Byagowi
ad87155fd0
minor, use py3's open(encoding=)
2020-05-29 00:11:19 +04:30
Ebrahim Byagowi
7554f618ec
minor, use sys.exit print shorthand
2020-05-28 23:34:37 +04:30
Ebrahim Byagowi
08f1d95a50
minor, move scripts manuals to __doc__
2020-05-28 15:13:12 +04:30
Qunxin Liu
593e58c842
[subset] ChainContext subsetting fix: add lookup index remapping
2020-05-27 16:58:15 -07:00
Ebrahim Byagowi
e3af529e51
[meson] update generated headers only when the result is different
...
This way it won't ruin incremental builds.
We need a better way to declare source altering tasks
https://github.com/mesonbuild/meson/issues/7156
yet this is good enough despite being not idiomatic.
It is however not that smooth yet as the change may is detected on the
next meson run. One of course can issue ./gen-ragel-artifacts.py
manually for better experience before running meson.
2020-05-23 22:35:43 +04:30
Ebrahim Byagowi
1fbb788326
[gdef] minor, use dagger in ligature carets fetch
2020-05-23 12:38:07 +04:30
Qunxin Liu
d7c012a08e
[subset] GDEF Variation Store: step 2
...
do subset based on variation indices collected in step 1
2020-05-21 12:43:24 -07:00
Qunxin Liu
8200e48ffc
[subset] GDEF Variation Store: step 1
...
closure device variation indexes, create old->new variation idx mapping
and store them in subset-plan
2020-05-21 12:43:24 -07:00
Ebrahim Byagowi
d2e3a048d1
[meson] Fix fix_get_types.py shabang, minor format
2020-05-21 21:48:01 +04:30
Ebrahim Byagowi
887aa0214f
[meson] Use find_program for locating python script
...
Apparently that is the simplest and supported way of finding python scripts.
2020-05-21 20:03:11 +04:30
Ebrahim Byagowi
d9177a594b
[meson] Use a c linker for on Windows also
...
Using a C linker was limited to non-Windows as 20a840c7
, let's
revisit this while transition to meson.
Packagers easily override that via the option and use a C++ linker
if needed.
2020-05-21 19:37:57 +04:30
Ebrahim Byagowi
cc53fd158c
[meson] Normalize options names
...
As https://github.com/harfbuzz/harfbuzz/pull/2412#discussion_r426275027
2020-05-21 19:33:18 +04:30
Ebrahim Byagowi
a9e8328ae2
[meson] Add build configuration summary just like autotools
2020-05-21 19:29:32 +04:30
Ebrahim Byagowi
f7562672f9
[meson] Use / instead join_paths
...
We need some of the very recent features of meson, let's use the new features also
2020-05-21 18:52:31 +04:30
Ebrahim Byagowi
f9b31ddaaa
[build] State encoding explicitly for hb-version.h.in
...
As https://circleci.com/gh/harfbuzz/harfbuzz/140481
Traceback (most recent call last):
File "./gen-hb-version.py", line 14, in <module>
output_file.write (input_file.read ()
File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 16: ordinal not in range(128)
2020-05-21 08:39:22 +04:30
Ebrahim Byagowi
a79d0e405b
[subset] minor, use a better type in iteration
...
In file included from hb-ot-face.cc:34:
In file included from ./hb-ot-kern-table.hh:30:
In file included from ./hb-aat-layout-kerx-table.hh:31:
In file included from ./hb-kern.hh:32:
In file included from ./hb-ot-layout-gpos-table.hh:32:
./hb-ot-layout-gsubgpos.hh:1878:63: error: loop variable '_' binds to a temporary value produced by a range of type 'decltype((hb_forward<hb_filter_iter_factory_t<hb_map_t &, const (anonymous struct at ./hb-algs.hh:331:1) &>>(rhs)(hb_forward<hb_zip_iter_t<hb_iota_iter_t<unsigned int, unsigned int>, hb_array_t<const OT::OffsetTo<OT::RuleSet, OT::IntType<unsigned short, 2>, true>>>>(lhs))))' (aka 'hb_filter_iter_t<hb_zip_iter_t<hb_iota_iter_t<unsigned int, unsigned int>, hb_array_t<const OT::OffsetTo<OT::RuleSet, OT::IntType<unsigned short, 2>, true>>>, hb_map_t &, const (anonymous struct at ./hb-algs.hh:331:1) &>') [-Werror,-Wrange-loop-bind-reference]
for (const hb_pair_t<unsigned, const OffsetTo<RuleSet>&>& _ : + hb_enumerate (ruleSet)
^
./hb-ot-layout-gsubgpos.hh:1878:10: note: use non-reference type 'hb_pair_t<unsigned int, const OffsetTo<OT::RuleSet> &>'
for (const hb_pair_t<unsigned, const OffsetTo<RuleSet>&>& _ : + hb_enumerate (ruleSet)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-05-21 07:32:58 +04:30
Ebrahim Byagowi
c68ab4b52b
Fix _get_ligature_caret's oob read issue
...
AAT::Lookup has no other way to detect whether it is returned from
a real and sanitized font data or from a null pool, this checks if
the table has been recognized valid by sanitizer by checking
table's major version which is zero if returned from a null pool and
non-zero if is from a sanitized font data, it is expected the other
calls of the table (unlikely to have more calls however) also do a
similar version check before calling the lookups used on the table.
2020-05-21 06:56:09 +04:30
Qunxin Liu
8b5d3ebd96
[subset] GSUB5/GPOS7 Contextual Subst/Pos Subtbale Subsetting support
2020-05-20 15:12:54 -07:00
Pip Cet
461cd5a158
minor: fix hb_ot_layout_get_ligature_carets
2020-05-20 10:01:24 +00:00
Ebrahim Byagowi
4fc6189a32
[meson] Generate harfbuzz.cc, hb-version.h and ragel artifacts
2020-05-18 13:54:42 +04:30
Christoph Reiter
b19f927f96
meson: error out if introspection is enabled but gobject isn't
...
In case a user passed -Dintrospection=enabled the build would just ignore
it by default because gobject defaults to disabled and the introspection build
gets skipped.
Instead, if introspection is explicitly enabled but gobject is for some reason
missing error out.
Fixes #2404
2020-05-17 11:10:08 +04:30
David Corbett
b207eab842
Round-trip OpenType tags through BCP 47
2020-05-15 15:00:15 -07:00
Qunxin Liu
10d6605bbe
[subset] don't use << operator in collect_mapping
2020-05-15 11:04:59 -07:00
Behdad Esfahbod
c15146448b
Merge pull request #2264 from harfbuzz/unicode-13
...
Update to Unicode 13.0.0
2020-05-14 19:12:41 -07:00
David Corbett
7a961692e9
Update IANA Language Subtag Registry to 2020-05-12
2020-05-14 10:34:42 -04:00
Qunxin Liu
b2a965df5e
[subset] Add support for "--gids" option
...
cmap subsetting now retains entries associated with any glyph ids explicitly requested
2020-05-11 15:28:58 -07:00
Qunxin Liu
44d88cff95
[subset] fix intersects () for Context/ChainContext tables
...
return true only when all values in array are intersected with input
2020-05-11 15:25:17 -07:00
Ebrahim Byagowi
42025680cb
2.6.6
2020-05-12 00:17:44 +04:30
Khaled Hosny
b169a52c1e
[blob] Fix build when HAVE_MMAP is not defined
2020-05-11 17:21:41 +04:30
Ebrahim Byagowi
a2ce96881b
[cff] remove the not used member
2020-05-11 17:15:37 +04:30
Ebrahim Byagowi
2cc78a58c3
[number] minor
2020-05-11 15:56:54 +04:30
Ebrahim Byagowi
bb095e1bdd
[meson] make -subset target dependent to deps to get libm dependency
2020-05-10 22:00:05 +04:30
Ebrahim Byagowi
dca8ba6b6d
[number] Make hb_parse_double simpler now that we don't have to mimic strtod
2020-05-10 21:49:00 +04:30
Ebrahim Byagowi
44fe1c8ff1
Remove xlocale use now that isn't available in most distros
...
Our CI bots don't detect it in Alpine, ArchLinux, Ubuntu and Fedora
so let's get rid of it use the fallback we are using anyway for a
long time.
2020-05-10 14:51:35 +04:30
Ebrahim Byagowi
eea99d7b72
[meson] Let name_prefix of exported libraries the default
...
meson complains about this and it is the default per #2256
Fixes #2256
2020-05-10 14:46:19 +04:30
Ebrahim Byagowi
2ac4222022
[meson] specify preferred linker to avoid stdc++ linking
2020-05-10 14:35:20 +04:30
Ebrahim Byagowi
15083c24ee
[meson] Reenable make check-symbols compatible with gcov
2020-05-10 14:35:20 +04:30
Ebrahim Byagowi
385d64eef1
Add a not discardable bool type, hb_success_t
2020-05-07 10:26:45 +04:30
jfkthame
1026b3d0b6
[subset] Check vector resize() call for failure ( #2389 )
...
Other .resize() calls are checked, presumably this one should be as well.
2020-05-06 13:32:24 -07:00
jfkthame
100d40c827
[aat] Fix implementation of AAT kerning for Geeza Pro. ( #2388 )
...
* [aat] Fix implementation of AAT kerning for Geeza Pro.
Despite what the comment in the code used to say, it appears that Geeza Pro
does rely on accumulating kerning values from successive subtables. With
this change, the results now match Core Text rendering (and avoid the clear
visual breakage reported in #2358 ).
Testcase: U+0644,U+064E,U+0645,U+064E,U+0651,U+0627
Fixes #2358 .
* [aat] Update test expectations, add new testcase.
2020-05-05 17:48:24 -07:00
Ebrahim Byagowi
9fc774ab00
minor spacing
2020-04-30 23:14:54 +04:30
Khaled Hosny
09b9d63e56
[blob] Try to support resource fork fonts on macOS
...
If the size of opened file is zero, try opening resource fork by
appending "/..namedfork/rsrc" to the file name. This is guarded with
__APPLE__ ifdef and uses _PATH_RSRCFORKSPEC macro from sys/paths.h.
Defining HB_NO_RESOURCE_FORK will disable this fallback.
Fixes https://github.com/harfbuzz/harfbuzz/issues/2383
2020-04-30 22:22:10 +04:30
David Corbett
fd748fac41
Update to Unicode 13.0.0
2020-04-29 17:17:03 -04:00
Behdad Esfahbod
28633b1979
[vowel-constraints] Simplify generated code
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2385
2020-04-29 17:16:24 -04:00
David Corbett
665483c979
Recognize Elymaic as a right-to-left script
2020-04-29 16:47:44 -04:00
René Meusel
d6ddb232fc
FIX: -Wextra-semi-stmt in Clang9
2020-04-29 02:35:05 +04:30
Ebrahim Byagowi
a22e6de0e9
[blob] close file reader handle
...
fortunately it isn't in that use as having mmap reader as the default
2020-04-28 19:25:37 +04:30
Ebrahim Byagowi
6890554256
[ci/meson] temporarily disable check-symbols
...
will enable again
2020-04-28 14:56:47 +04:30
Qunxin Liu
e53c44e326
[subset] temporarily revert previous cmap commit
...
Required in https://github.com/harfbuzz/harfbuzz/issues/2356
2020-04-25 12:21:22 +04:30
Ebrahim Byagowi
08428a15c3
minor, spacing
2020-04-24 23:45:17 +04:30
Behdad Esfahbod
89ad3c6cc5
Rename add_class to collect_class
2020-04-24 08:16:03 -07:00
Behdad Esfahbod
5cf53c06e6
Rename add_coverage to collect_coverage
2020-04-24 08:16:03 -07:00
Behdad Esfahbod
689f3f57fa
[set] Add << overload for range-sink
2020-04-24 08:16:03 -07:00
Behdad Esfahbod
a7df5a7bda
[hashmap] Minor
2020-04-24 08:16:03 -07:00
Behdad Esfahbod
a11db0b9d4
Merge branch 'master' into usermanual-integration
2020-04-23 15:32:43 -07:00
Ebrahim Byagowi
19346524c6
minor, add an option to skip private APIs use in main.cc
2020-04-23 14:22:51 +04:30
Hugo Beauzée-Luyssen
6881939f77
src: meson: Reindent after last changes
2020-04-23 13:27:12 +04:30
Hugo Beauzée-Luyssen
e18858c685
src: Don't build tests when they are disabled
2020-04-23 13:27:12 +04:30
Ebrahim Byagowi
0c65a232fa
minor, add unlikely around lookup_limit_exceeded checks
...
addresses https://github.com/harfbuzz/harfbuzz/pull/2294#issuecomment-618022488
2020-04-23 11:23:54 +04:30
Evgeniy Reizner
3e686d2459
[kern] Refactoring.
2020-04-22 18:04:52 -07:00
Behdad Esfahbod
f4cd99f28e
Reordering fails when GDEF table is absent #2140
...
Preserve glyph class if there's no GDEF and no guess.
Fixes https://github.com/harfbuzz/harfbuzz/issues/2140
2020-04-22 14:45:57 -07:00
Khaled Hosny
c7afb6d7b8
[docs] Fix broken link
2020-04-22 15:19:37 +02:00
Behdad Esfahbod
bd8aa1b043
Minor
2020-04-21 22:19:46 -07:00
ckitagawa
b22f61d86a
Fix bug
2020-04-21 16:51:55 -07:00
Ebrahim Byagowi
1cd14b40e7
minor, update ragel generated hb-number-parser.hh
2020-04-21 14:42:20 +04:30
Ebrahim Byagowi
6d5e8e5ee4
minor
...
following to c37100e7d
2020-04-21 14:38:09 +04:30
Ebrahim Byagowi
750bb73e32
[meson] Add an experimental-api option
2020-04-21 01:26:08 +04:30
Behdad Esfahbod
262eced2ad
[subset] FeatureVariations subsetting is wrong
...
Never drop FeatureVariationRecord for now.
Fixes https://github.com/harfbuzz/harfbuzz/issues/2334
2020-04-21 01:23:07 +04:30
Ebrahim Byagowi
2be859d289
minor, replace nullptr checks with implicit ones
2020-04-21 00:30:34 +04:30
Ebrahim Byagowi
2dda6dd744
minor, tweak spacing
...
turn 8 spaces to tab, add space before Null/Crap
2020-04-20 16:18:29 +04:30
Ebrahim Byagowi
0133cb55e2
Minor, use hb_sorted_array::bsearch where possible
2020-04-19 23:18:36 +04:30
Christoph Reiter
fb3acdbcb6
meson: only install gobject/icu headers if the features are enabled
2020-04-19 18:49:43 +04:30
Christoph Reiter
ad5dcda0b5
meson: install hb-icu.h header
2020-04-19 18:49:43 +04:30
Behdad Esfahbod
2cc85281c2
[serializer] Make snapshot()/revert() revert current object links
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2325
2020-04-18 17:31:32 -07:00
Behdad Esfahbod
6f6e78a26e
Fix float-to-double warnings
...
./hb-ot-glyf-table.hh:978:37: warning: implicit conversion increases floating-point precision: 'float' to 'double' [-Wdouble-promotion]
2020-04-18 16:12:18 -07:00
Behdad Esfahbod
c37100e7d9
Clean up math.h and float.h includes
2020-04-18 16:02:55 -07:00
Ebrahim Byagowi
c6b3f73b09
[meson] Make harfbuzz-icu separate module optout-able
2020-04-19 02:06:01 +04:30
Christoph Reiter
8ae06c9489
meson: build a separate library for harfbuzz-icu
...
This adds a seperate library like with autotools.
This also fixes the ico feature option which was just set to required:false
when disabled instead of really disabling it.
Disabling is still broken with msvc because it then tries to find the library
another way, but that's broken for all other deps as well so I left it as is.
For tests only test-unicode.c is using icu specific functions so split it out
into its own category which depends on harfbuzz-icu.
Fixes #2338
2020-04-18 23:34:31 +04:30
Christoph Reiter
c1228990b9
autotools: Add fix_get_types.py to EXTRA_DIST
...
So it ends up in the release tarball and can be used in the meson build.
Fixes #2337
2020-04-18 18:03:58 +04:30
Christoph Reiter
dced2fbee9
meson: complete introspection build config
...
Pass the same config to gobject-introspection as with cmake/autotools.
This makes sure the c-include and package name is included in the gir
and also fixes the build because of the missing HB_AAT_H* defines.
Fixes #2336
2020-04-18 17:24:53 +04:30
ariza
22f7c61acf
implement SID to glyph ID mapping with predefined Charset
...
Also fixes oss-fuzz 21769
2020-04-18 15:42:30 +04:30
Ebrahim Byagowi
f9bc373381
2.6.5
2020-04-17 23:49:56 +04:30
Ebrahim Byagowi
a8455292f4
[layout] minor on doc
2020-04-17 22:50:48 +04:30
Ebrahim Byagowi
29c903223b
Move hb_ot_layout_closure_{features,lookups} behind EXPERIMENTAL flag
2020-04-17 22:25:45 +04:30
Ebrahim Byagowi
9b7fb5c23f
Move hb_font_get_var_coords_design behind HB_EXPERIMENTAL_API
2020-04-17 20:29:04 +04:30
Behdad Esfahbod
41c671e701
[build] Adjust check-symbols for -flto
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2328
2020-04-17 08:37:25 -07:00
Ebrahim Byagowi
8f6d0f8401
[os2] minor, fix font_page_t enum naming
...
As https://github.com/harfbuzz/harfbuzz/pull/986#pullrequestreview-395052800
2020-04-17 11:30:27 +04:30
Ebrahim Byagowi
818f109bde
Use float in avar calculation instead ints and checking their overflows
2020-04-17 00:53:39 +04:30
Ebrahim Byagowi
9ffa50fe5d
Add an appropriate fallback to hb_int_mul_overflows
2020-04-17 00:38:38 +04:30
Jonathan Kew
573b6bf826
Handle non-exclusive features when mapping OpenType tags to AAT feature type/selector pairs.
...
Fixes #2290 .
2020-04-16 01:33:01 +04:30
n8willis
b57b904242
Add detail to hb_ft_font_create inline comments
...
Providing lengthier explanation for how the destroy function works on the hb_font_t but that destroying the FT_Face (and not destroying it too early) remains the client's responsibility.
2020-04-15 18:46:31 +01:00
n8willis
1bca2be256
Rewrite hb_ft_font_set_funcs inline explanation
2020-04-15 18:30:47 +01:00
n8willis
80c01d7687
Update hb-ft.cc
2020-04-15 18:08:55 +01:00
n8willis
9b91669cb4
Update hb-ft.cc
2020-04-13 16:40:15 +01:00
n8willis
fd59cc700a
Update src/hb-glib.cc
...
Co-Authored-By: Khaled Hosny <dr.khaled.hosny@gmail.com>
2020-04-13 15:15:00 +01:00
n8willis
fb9d106797
Update src/hb-graphite2.cc
...
Co-Authored-By: Khaled Hosny <dr.khaled.hosny@gmail.com>
2020-04-13 15:14:42 +01:00
n8willis
a199eab20e
Update src/hb-graphite2.cc
...
Co-Authored-By: Khaled Hosny <dr.khaled.hosny@gmail.com>
2020-04-13 15:14:28 +01:00
n8willis
aff21795b2
Update src/hb-icu.cc
...
Co-Authored-By: Khaled Hosny <dr.khaled.hosny@gmail.com>
2020-04-13 15:14:06 +01:00
n8willis
ccc2356983
Update src/hb-graphite2.h
...
Co-Authored-By: Khaled Hosny <dr.khaled.hosny@gmail.com>
2020-04-13 15:13:56 +01:00
Qunxin Liu
0d5695983e
[subset] fixes dangling object_t issue in FeatureVariationRecord
...
Fixes https://crbug.com/oss-fuzz/21560
revert () does not clean up useless object_t. Adjust the order of
subsetting substitutions and conditions to avoid dangling object_t.
2020-04-06 13:41:33 +04:30
Ebrahim Byagowi
57b7de032f
[subset] Fail ClassDefFormat1 serialization if no space available
...
Fixes https://crbug.com/oss-fuzz/21580
2020-04-05 17:38:04 +04:30
Qunxin Liu
c8cc1e378d
fix issues in ClassDefFormat1 serialize:
...
glyph ids in Iterator may be non-consecutive,
so the number in classValue might be larger than length of the Iterator
2020-04-03 12:31:48 -07:00
Ebrahim Byagowi
75cae46dc2
[aat] minor spacing
2020-04-03 20:04:16 +04:30
Ebrahim Byagowi
3737776384
[aat] add the bug link, minor
2020-04-03 20:03:20 +04:30
Jonathan Kew
1faf0caae1
Special-case 'smcp' when checking for exposed AAT features.
...
This may be implemented by selectors under either LETTER_CASE or LOWER_CASE feature types
in AAT, so we need to check for the presence of either one.
Fixes #2307 .
2020-04-03 19:57:43 +04:30
Jonathan Kew
b87cf6e8d4
Fix sense of comparsion in hb_aat_map_builder_t::feature_info_t.
...
This makes bsearch actually work for the features array.
Fixes #2305 .
2020-04-03 19:20:48 +04:30
Jonathan Kew
b027cb518d
Set sequence number when adding feature to aat map builder, to support stable sort.
...
Fixes #2288 .
2020-04-03 03:22:06 +04:30
Ebrahim Byagowi
89fa70f511
[aat] minor over previous feat related changes
2020-04-03 01:08:01 +04:30
Jonathan Kew
b1c0b9da2f
[AAT] Don't map OT tags to AAT feature types that are not exposed.
...
If an AAT feature type is not exposed in the 'feat' table, we assume it is not intended
to be user-controllable and so we should not map any OT feature tag requests to it.
Fixes #2285 .
2020-04-02 23:58:32 +04:30
Qunxin Liu
e0c3979af1
typo fix
2020-04-02 12:05:57 +04:30
ariza
65f4136303
minor; fixes #2292
2020-04-01 19:49:18 -07:00
Garret Rieger
014e038b2c
[subset] Bail out of context lookup expansion once the lookup limit is encountered.
2020-04-01 11:14:41 +04:30
Garret Rieger
5d345d0cd1
[subset] Limit the number of lookup indices processed subsetting Feature.
...
> Also, remove two unnessecary full iterations of the lookup index iterator during serialization of the index array. Fixes fuzzer found timeout.
2020-04-01 11:13:05 +04:30
Simon Cozens
bdda2ff609
More strictly follow noun/verb/identifier format for GPOS/GSUB lookups
...
Less generic than the previous commit, but more descriptive and more consistent.
2020-03-30 16:40:29 +01:00
Simon Cozens
bef7ef81da
Reformat kerx/morx instrumentation to 'verb noun identifier'
2020-03-30 16:39:43 +01:00
Simon Cozens
42aac64030
Add table index to lookup messages
...
We could say GSUB/GPOS explicitly, but using the index is more general, in case future tables (such as JSTF, Silf) become supported.
2020-03-30 16:06:30 +01:00
Simon Cozens
2cea796b75
Instrument entering GSUB/GPOS tables
2020-03-30 16:04:17 +01:00
Khaled Hosny
1b64b73080
Revert "Add messages for GPOS/GSUB phases"
...
This reverts commit b07714d6b5
.
2020-03-30 16:49:23 +02:00
Ebrahim Byagowi
2e1bf61dd5
[gsubgpos] Use FeatureVariations::NOT_FOUND_INDEX instead Index::
...
As noted by https://github.com/harfbuzz/harfbuzz/issues/2280#issuecomment-604386389
Added on b143e34
, fixed on 2571891
Closes #2280
2020-03-26 22:59:28 +04:30
Ebrahim Byagowi
96d792ae80
[avar] Prevent mul overflow
...
Fixes https://crbug.com/oss-fuzz/21350
2020-03-26 15:01:14 +00:00
Ebrahim Byagowi
18fc9197e2
[meson] Run check-symbols.sh and check-static-inits.sh correctly
...
* Search src/ build directory for objects in check-static-inits.sh
* Find .def files in src/ build directory in src/check-symbols.sh
* Pass builddir also in autotools also, we may just remove libs passing after autotools removal
* Move harfbuzz_subset_def target so can be referenced as a check-static-inits.sh dependency
2020-03-26 09:40:14 +00:00
Ebrahim Byagowi
9c2c9553eb
[test] Check -subset also doesn't link to lib[std]c++
2020-03-26 09:40:14 +00:00
Ebrahim Byagowi
25718913d4
[gsubgpos] minor build fix
2020-03-26 14:04:37 +04:30
Ebrahim Byagowi
b143e34ee1
[gsubgpos] Initialize variation index on HB_NO_VAR
...
hb_shape_plan_key_t::equal expects hb_ot_shape_plan_key_t be initialized by
hb_ot_layout_table_find_feature_variations calls but it won't get initialized
when HB_NO_VAR build config is used.
Related to https://github.com/harfbuzz/harfbuzz/issues/2280
2020-03-26 12:06:12 +04:30
Ebrahim Byagowi
071e2e345f
minor
2020-03-26 12:03:07 +04:30
Ebrahim Byagowi
cc977b6e5c
[gsubgpos] Minor simplification
...
Just changed the order, no functional change
2020-03-26 11:19:43 +04:30
Ebrahim Byagowi
1a48278511
[gsubgpos] Minor style improve
2020-03-26 11:15:09 +04:30
Garret Rieger
4ad686b9c0
[subset] fix fuzzer timeout in layout closure
...
Bail out of chain context lookup expansion once the lookup limit is encountered.
2020-03-26 06:32:28 +00:00
Ebrahim Byagowi
f0ce56bbd0
[meson] Don't compile test-bimap on msvc either
...
MSVC doens't like its NullPool,
test-bimap.cc.obj : error LNK2019: unresolved external symbol "unsigned __int64 const * const _hb_NullPool" (?_hb_NullPool@@3QB_KB) referenced in function
2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
22f311e100
[meson] Don't compile noinst_programs in msvc for now
2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
7054b12206
[meson] Mark rest of non-install executables explicitly
2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
e8808c1c20
[meson] Minor, replace tabs with spaces
2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
2db8279162
[meson] Don't compile test-{algs,iter,meta} on msvc
2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
3385afacd3
[meson] Don't run check-includes if is amalgam build
2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
6a8a1dc5bb
[meson] Port src/ binary artifacts to meson
2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
4738dff18e
[make] minor move on Makefile.am
2020-03-24 19:06:09 +00:00
Simon Cozens
b07714d6b5
Add messages for GPOS/GSUB phases
2020-03-23 22:02:44 +02:00
Ebrahim Byagowi
748e1cf898
[subset] Avoid linking to libstdc++ in libharfbuzz-subset.so
...
Just like other targets (except harfbuzz-icu) avoid linking to libstdc++
2020-03-23 18:06:02 +00:00
Ebrahim Byagowi
a0c58be371
[tools] Remove py2 remains
2020-03-18 23:41:20 +03:30
Tim-Philipp Müller
93b3e30215
[meson] fix icu-related linking errors in test with amalgam build
...
test-unicode.c:960: undefined reference to `hb_icu_get_unicode_funcs'
test-unicode.c:961: undefined reference to `hb_icu_get_unicode_funcs'
For now add the icu sources to libharfbuzz also for the amalgam
build, later we need to have a separate harfbuzz-icu module and
link against that, and/or generate harfbuzz.cc.
2020-03-14 15:16:00 +03:30
Garret Rieger
2f556c38c0
[subset] Fix crash when serializer runs out of room during gpos subsetting.
2020-03-14 00:55:47 +03:30
Chun-wei Fan
838346c54a
meson: Support GDI integration
...
...and supersede the configuration option uniscribe with gdi, as Uniscribe is
tightly tied to GDI. This means that enabling GDI would also mean enabling
Uniscribe.
2020-03-13 14:30:17 +03:30
Chun-wei Fan
4b4d5c295d
src/meson.build: Some cleanups for Visual Studio builds
...
We don't actually need the .def files (vs_module_defs) entry when we are
building DLLs with Visual Studio as long as we have HB_DLL_EXPORT defined.
Plus, to maintain compatibility with the CMake builds, for Visual Studio builds
we do not prefix the libraries with 'lib', nor have a '-0' suffix for the DLL
file name.
2020-03-13 14:30:17 +03:30
Chun-wei Fan
91ca17e1fd
src/hb-gobject-enums.cc.tmpl: Replace © with (C)
...
This was, we also avoid Visual Studio compiler warnings C4828 as that sign is
not favored when /utf-8 is enabled, which is the norm nowadays as Visual Studio
2015 or later is required to build harfbuzz nowadays.
2020-03-13 14:30:17 +03:30
Chun-wei Fan
62fb6738d5
Fix gen-def for harefbuzz-gobject
...
The © sign is causing issues for the script, so replace those with (C)
2020-03-13 14:30:17 +03:30
Chun-wei Fan
8d425ed446
meson: Fix harfbuzz-gobject builds without introspection
...
Make the `sources:` field reflect the items depending on whether introspection
is being built
2020-03-13 14:30:17 +03:30
Chun-wei Fan
3341d5346e
meson: Don't apply -DHB_DLL_EXPORT to all targets
...
Only have it apply to the libraries when they are not built statically on
Visual Studio
2020-03-13 14:30:17 +03:30
Ebrahim Byagowi
a224f4179f
Turn more of simple dagger chains to foreach
...
Less noise, as was agreed before and applied 385741d
also
2020-03-13 08:33:34 +03:30
Ebrahim Byagowi
755a77d660
Move outline draw API behind HB_EXPERIMENTAL_API directive
2020-03-13 08:25:53 +03:30
Ebrahim Byagowi
1dd3896688
[meson] Make it work on autotools dist
2020-03-12 14:49:40 +03:30
Garret Rieger
834a224a50
[subset] Put a limit on the number of lookup indices that can be visited during closures
...
Fixes https://crbug.com/oss-fuzz/21025
2020-03-12 13:32:36 +03:30
Ebrahim Byagowi
f8c8be0564
[meson] Add amalgam build option
2020-03-12 00:25:48 +03:30
Aaron Boxer
68f982415b
meson: update to latest master
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller
535186fd84
meson: provide a harfbuzz-config for use from CMake
...
See #822 and #1437 .
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller
7eaf3754dc
meson: update for changes in master
...
And remove header files from sources list, Meson figures
out header dependencies by itself (via the compiler).
2020-03-11 19:18:57 +03:30
Khaled Hosny
04438554c8
meson: Update build files after rebase
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller
618584e923
meson: rename incbase to incconfig
...
Makes it clearer what it's for: config.h. See #4 .
2020-03-11 19:18:57 +03:30
Khaled Hosny
14b5c774c2
meson: Fix include directory when used as subproject
...
HarfBuzz headers are under src/ not the root directory, without using
incsrc no headers will be found by the dependent project. I think
incbase is superfluous, it should be replaced by incsrc or dropped.
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller
6abe7983ed
meson: add g-i introspection
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller
d230a02048
meson: generate .def file for MSVC symbol export on the fly
...
Fix symbol export with MSVC when features are disabled,
such as GLib. We need to generate the list of exported
symbols on the fly to make sure we only export symbols
that are actually available.
Needs some minor modifications to the gen-def.py script:
- accept header list also via command line args; we can't
pass things to a configure_file() command via the environment
in Meson.
- strip any leading 'src/' from library filename. This might
be there because in Meson the script might be called from
the top-level directory and not the current source directory.
Remove .def files again which had been checked in for earlier
versions of the Meson port.
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller
4840c8237e
meson: add option and build system plumbing for CoreText on macOS/iOS
...
Untested though.
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller
83ebbe4ade
meson: add option and build system plumbing for DirectWrite on Windows
...
Untested though.
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller
b7796a5d69
meson: add option and build system plumbing for uniscribe on Windows
...
Untested though.
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller
c81290b0c1
meson: add feature option for internal ucdn lib
2020-03-11 19:18:57 +03:30
Nirbheek Chauhan
f65def4dc7
meson: Declare dependencies for use as a subproject
...
Also use fallbacks for dependencies that have meson build files
2020-03-11 19:18:57 +03:30
Mathieu Duponchelle
29c47d8eb5
meson: pass subdirs to pkgconfig.generate()
2020-03-11 19:18:57 +03:30
Mathieu Duponchelle
484313ff36
meson: install
2020-03-11 19:18:57 +03:30
Mathieu Duponchelle
d4a7237327
meson: all tests passing on Windows / MSVC
2020-03-11 19:18:57 +03:30
Mathieu Duponchelle
99b26789d2
meson: more windows fixes
2020-03-11 19:18:57 +03:30
Mathieu Duponchelle
920efc0ef7
Add Meson build definitions
...
Fixes #490
http://mesonbuild.com
2020-03-11 19:18:57 +03:30
Khaled Hosny
0615c7b64b
Remove workaround for old pkg-config
...
Add FreeType dependency to .pc, Ubuntu 14.4 is long dead.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1565
2020-03-10 22:04:35 +02:00
Ebrahim Byagowi
47f5a86036
minor, use NN on every OffsetTo<UnsizedArrayOf<>>
2020-03-10 13:57:46 +03:30
Ebrahim Byagowi
648338c7d4
[gvar] Add fields docs from ot-spec as other tables
2020-03-10 13:20:56 +03:30
Ebrahim Byagowi
1b3b96973b
[gvar] Don't copy shared tuples into gvar's accelerator
2020-03-10 12:46:09 +03:30
Ebrahim Byagowi
29dd1fe506
[gvar] Don't check again against face num glyph
...
Done once by sanitize_shallow
2020-03-10 11:41:58 +03:30
Ebrahim Byagowi
d4b1181760
[gvar] minor, rename gvar_table to table
2020-03-10 11:29:56 +03:30
Ebrahim Byagowi
5c37693864
[gvar] Remove axisCount comparison with fvar as we runtime check that
2020-03-10 11:25:47 +03:30
Ebrahim Byagowi
ba22df36ad
minor
...
makes search for sanitize calls easier for me
2020-03-10 10:43:27 +03:30
Ebrahim Byagowi
8ca9df7acb
[subset] Remove not needed blob sanitize call
2020-03-10 10:40:05 +03:30
Ebrahim Byagowi
07acd1a042
[subset] Rename src_base args to base to match sanitize methods
...
So it will become easier to follow that serialize methods signatures should
match with their sanitize methods counterparts.
2020-03-08 23:39:26 +03:30
ariza
188a0a47c2
removed default base; replaced w/ bias if required
2020-03-08 22:59:43 +03:30
blueshade7
4c3af7d406
add "add_link()" with bias arg
...
issue #2227
2020-03-08 18:48:56 +03:30
Ebrahim Byagowi
bdf372b24c
[subset/cbdt] Release the referenced cbdt table on error
...
Just accidentally spotted it, when the table has less than 4 bytes
2020-03-08 00:49:40 +03:30
Ebrahim Byagowi
0d729b4b72
[avar] Fix out-of-bound read when input is bigger than all the coords
...
'i' shouldn't become equal to array's length which as the increament
is happened at end of the loop, if the input is bigger than all the
table coords, it will be equal to array's length.
Fixes https://crbug.com/oss-fuzz/21092
2020-03-07 13:20:41 +03:30
Ebrahim Byagowi
6924e29f62
[var] Fix hb_ot_var_get_axis_infos's offset semantic
...
The API was adding offset to input's infos buffer index also which is
unusual between our APIs and wrong.
2020-03-06 02:01:04 +03:30
Ebrahim Byagowi
b7617f6b3c
[glyf] Update to latests of ttf-parser
2020-03-05 15:08:06 +03:30
ariza
0b29053864
removed unused code
2020-03-05 10:11:23 +03:30
ariza
e8f010d793
removed unused code & data; rename
2020-03-05 10:11:23 +03:30
Garret Rieger
14a7b6f1ab
Set hb_buffer_t to use array_t.reverse().
2020-03-04 16:52:29 -08:00
ariza
5935a1dc0b
add pop_discard() calls to errror returns
2020-03-05 01:22:51 +03:30
ariza
c05458ec7f
update cff & cff2 subsetters
2020-03-05 01:22:51 +03:30
Ebrahim Byagowi
9004848560
[gvar] Make sure font's num_coords matches with gvar.axisCount
2020-03-04 12:43:26 +03:30
Ebrahim Byagowi
1af3363f9e
[gvar] Use hb_array_t instead indexing raw pointers
2020-03-04 12:43:26 +03:30
Ebrahim Byagowi
99b5b3f1b1
[gvar] Make sure TupleVarHeader has the needed size
...
Fixes https://crbug.com/oss-fuzz/21026
2020-03-04 12:43:26 +03:30
Ebrahim Byagowi
b398748d8b
[algs] Add hb_clamp
...
Similar to stl and glsl's clamp
2020-03-04 11:18:19 +03:30
Ebrahim Byagowi
f745777c60
minor, debug bit, ops
2020-03-03 19:14:41 +03:30
Ebrahim Byagowi
f253f06cf3
[fuzz] Add another fixed case
...
https://crbug.com/oss-fuzz/14626
another numerous subtables count which is fixed by d38360397
2020-03-03 19:12:04 +03:30
Ebrahim Byagowi
d383603976
Limit OT::Lookup subtables ( #2219 )
...
Fixes https://crbug.com/oss-fuzz/13943
2020-03-02 22:41:08 +03:30
Ebrahim Byagowi
60262e4ca9
[var] Build end-points array on gvar itself
2020-02-29 22:57:59 +03:30
Ebrahim Byagowi
44169f3396
[draw] Fix invalid rendering of some glyph on Estedad-VF
...
Basically reverts 11f3fca
so I can do the same tested and better later
Fixes #2215
2020-02-29 16:04:03 +03:30
Michiharu Ariza
5ab50eebd7
collect_unicodes() with clamp, calling add_range()
...
Use add_range instead an inner loop, clamp its input number by
number of glyphs a face has.
Even the face cmap12 and 13 have 32-bit hb_codepoint_t, which is here
used to make timeout, face's maxp has 16-bit gid limitation at least for now,
using that makes sure we both fix and the timeout and don't need to change
much things here also in order to support 32-bit gids also someday.
Fixes #2204
2020-02-29 13:02:29 +03:30
Garret Rieger
414529e45a
[subset] Limit the number of feature indices processed during script subsetting.
2020-02-28 16:10:14 -08:00
Garret Rieger
75622b0d24
[subset] Limit the number of features processed in the feature closure.
2020-02-28 16:10:14 -08:00
Garret Rieger
c66ee213b7
Limit the number of feature indices processed during feature collection.
2020-02-28 16:10:14 -08:00
Ebrahim Byagowi
758fda728b
[glyf] Don't accept gids higher than maxp's glyphs number
...
This specially becomes concerning on sub-components where a gvar table
that is sanitized using maxp's glyphs number overflows when a high gid
accepted here goes to it, maybe an additional check can be put there
also, this however feels to be enough.
Fixes https://crbug.com/oss-fuzz/20944
2020-02-28 23:19:06 +03:30
Ebrahim Byagowi
e642aab116
[subset] Add source_blob as a hb_subset_context_t field ( #2203 )
...
So no more double sanitizing source table.
2020-02-28 22:24:25 +03:30
Ebrahim Byagowi
e90213868b
Revert "collect_unicodes() to check gid < num_glyphs with cmap 12"
...
Didn't fix the case actually, making bots to fail.
This reverts commit 15b43a4104
.
2020-02-28 21:24:51 +03:30
Ebrahim Byagowi
61208401f4
[gvar] Use hb_bytes_t.check_range instead having in house one
...
And use TupleVarHeader calculated size for validity check.
Fixes https://crbug.com/oss-fuzz/20919 and possibly other gvar related issues
2020-02-28 21:09:07 +03:30
Michiharu Ariza
15b43a4104
collect_unicodes() to check gid < num_glyphs with cmap 12
...
fixes #2204
2020-02-28 20:15:39 +03:30
Qunxin Liu
b0749bfaa5
[subset] GDEF LigCaretList subsetting support
2020-02-28 14:51:52 +03:30
ariza
002f0e20c4
reimplment serialize_int using check_assign()
2020-02-28 14:21:58 +03:30
Ebrahim Byagowi
14b134379d
[gvar] Minor, check whether sub_array result also have enough room
2020-02-27 21:01:48 +03:30
Ebrahim Byagowi
8eba66c1c6
[gvar] Fix invalid memory access by refactoring GlyphVarData fetch logic
...
Fixes https://crbug.com/oss-fuzz/20906
2020-02-27 20:26:54 +03:30
Evgeniy Reizner
f44e1dc07d
Fix spelling.
2020-02-27 13:33:56 +03:30
Qunxin Liu
5ad761b943
[subset] GDEF MarkGlyphSets subsetting support
2020-02-26 15:15:21 -08:00
Qunxin Liu
fcd7f33bbb
[subset] GDEF glyphClassDef subsetting support
...
glyphClassDef uses the same ClassDef format. However, glyphClassDef table
uses predefined class values so we do not remap class values.
2020-02-26 11:10:31 -08:00
Garret Rieger
50129b03a1
Add a reverse () call to hb_array_t.
2020-02-26 11:09:54 -08:00
Garret Rieger
38c6598c1c
Switch to C style comments.
2020-02-26 11:09:54 -08:00
Garret Rieger
52b6e0baa0
When serializing cmap14 order the offsets from smallest to largest.
...
Current versions of OTS fail fonts with cmap 14's who's last offset does not point to the a block at the end of the table.
2020-02-26 11:09:54 -08:00
ariza
d0aaba5c50
fixes oss-fuzz 20886
...
hb_set_t::resize () is needed after compact()
2020-02-26 09:35:32 -08:00
Ebrahim Byagowi
05a25c1a5b
[cff] minor, remove unused fields
2020-02-26 19:35:27 +03:30
Ebrahim Byagowi
9fe0dc3464
[draw] Pass draw_helper_t itself around instead recreating it
...
Specially helpful if we want to change the design
2020-02-26 17:40:46 +03:30
Ebrahim Byagowi
4cdaa9d1f4
[glyf] Simplify contour end logic
...
So no need for infinite loop here
2020-02-26 16:29:14 +03:30
Ebrahim Byagowi
84163c83d3
[draw] Skip commands and paths not contributing anything
...
They aren't contributing to rendering and making issue for stroking, let's skip them
ourselves as Skia does also https://skia-review.googlesource.com/c/skia/+/268166
They are useful for extracting extents and so which that functionality won't be effected by this change.
2020-02-26 16:09:28 +03:30
Ebrahim Byagowi
073d4954e0
[draw] Port glyf path extract to draw_helper_t
2020-02-26 15:40:40 +03:30
Ebrahim Byagowi
0ebf3a4e62
[draw] Move common CFF path building logic to draw_helper_t
2020-02-26 15:15:22 +03:30
Michiharu Ariza
c400cb8863
Re-implement hb_set_t::del_range ( #2194 )
...
* optimize hb_set_del_range()
fix issue #2193
* fixed bug & added tests
* coding & comment tweaks
2020-02-25 16:06:03 -08:00
Ebrahim Byagowi
c21eb86bfd
Merge pull request #2163 from harfbuzz/absolute-link
...
added add_link_abs()
2020-02-26 02:54:38 +03:30
ariza
4081439d2a
tweak reflecting review & add test cases
2020-02-25 15:03:12 -08:00
ariza
de896278f7
coding & comment tweaks
2020-02-25 07:12:20 -08:00
Ebrahim Byagowi
2f97aa65e5
[cff] Make sure previous is ended on processing a seac
2020-02-25 18:07:44 +03:30
Ebrahim Byagowi
acc2d4738e
[cff] Make path extract easier to read and more defensive
2020-02-25 18:05:48 +03:30
Ebrahim Byagowi
b59eb54f70
[glyf] Refactor, move get_points inside Glyph
2020-02-25 12:56:32 +03:30
ariza
173b745da8
fixed bug & added tests
2020-02-24 22:56:57 -08:00
ariza
a5012e97c4
optimize hb_set_del_range()
...
fix issue #2193
2020-02-24 17:09:48 -08:00
Ebrahim Byagowi
1f5a54c768
[gvar] fix infinite loop introduced by 11f3fca
...
The attempt on removing end_points had made the code unreadable
and has intrdouced infinite, fixed by making the code clear what
it tries to achieve.
2020-02-24 14:30:07 +03:30
Ebrahim Byagowi
f00eb4ebfa
[gvar] Don't compare against Null address
2020-02-24 09:25:19 +03:30
Ebrahim Byagowi
19b78d56cd
[gvar] Accept coord_count even if is higher than gvar's axisCount
2020-02-24 09:25:18 +03:30
Ebrahim Byagowi
197e2e929b
[gvar] Return gracefully even if gvar wasn't used at all
2020-02-24 08:55:35 +03:30
Ebrahim Byagowi
346ab9884b
[gvar] Return gracefully even if coords_count != gvar's axis count
...
It shouldn't be that common to have the situation, even so, no need to
reject entire a glyph even if gvar isn't used.
2020-02-24 08:48:54 +03:30
Ebrahim Byagowi
5f23a76e99
[cff] Don't remove coords const qualification
...
We should find some way to audit all the const removals, perhaps by
enabling -Wold-style-cast warning on the project and turning all the
implicit const removals to const_cast.
2020-02-24 08:23:25 +03:30
Michiharu Ariza
ff5223ba60
remove invalid glyphs from closure ( #2188 )
...
fix issue #2186
2020-02-23 15:53:21 -08:00
Ebrahim Byagowi
e17fd0d91c
[tools] More on py3 compatibility
2020-02-24 00:10:11 +03:30
Ebrahim Byagowi
0cf050a7b1
[draw] Merge consequent move-to commands of CFF/CFF2
2020-02-23 23:23:50 +03:30
Ebrahim Byagowi
86bd5a0ba1
[draw] End CFF paths with a line-to
...
Issue a line-to command when start and end point of a path isn't same, matches freetype also.
2020-02-23 23:23:50 +03:30
Ebrahim Byagowi
a46ba770ab
[number] minor
2020-02-22 17:15:06 +03:30
ariza
4aa354beba
chain second OffsetTo::serialize_copy() to first
2020-02-21 10:17:26 -08:00
ariza
6120f50c8f
fix Head with link.bias
2020-02-21 10:17:26 -08:00
ariza
e65bff0943
workaround whence_t as bit-field
2020-02-21 10:17:26 -08:00
ariza
1aed6d223c
fix whence=Head; position as 28 bits
2020-02-21 10:17:25 -08:00
ariza
4ca8e0d989
re-implement Tail; rewrote name table with it
2020-02-21 10:17:25 -08:00
ariza
c1313e4be2
minor: undid unintended change
2020-02-21 10:17:25 -08:00
ariza
9c65680b48
rename enums to avoid conflict on win
2020-02-21 10:17:25 -08:00
ariza
555f6f1daa
merge add_link_abs() into add_link()
2020-02-21 10:17:25 -08:00
ariza
017cd945bf
added add_link_abs()
2020-02-21 10:17:25 -08:00
Ebrahim Byagowi
07504569d5
[gsub] minor format
2020-02-21 13:05:44 +03:30
Garret Rieger
411225426f
Fix glyph closure for alternate substitution.
...
It was not filtering on the glyphs to be retained.
2020-02-21 13:01:23 +03:30
Ebrahim Byagowi
da37880e17
[draw] Add a private bit field instead null-checking quad-to callback
...
This doesn't imply the the design is good or stable just is better
to not fail due to null quad-to callback so as our quad-cubic curves
translation is currently table limited which can be revisited anytime.
2020-02-20 19:04:20 +03:30
Ebrahim Byagowi
8c652f72fc
Minor, switch to https links where possible
2020-02-19 16:32:44 +03:30
Ebrahim Byagowi
bbcbcafc25
[tool] Minor, move input files link
2020-02-19 16:21:47 +03:30
Ebrahim Byagowi
8d19907704
Remove python2 support from tests/utils scripts
2020-02-19 16:17:45 +03:30
Rico Tzschichholz
2c9fbf5561
Improve GIR build
2020-02-19 14:12:29 +03:30
Qunxin Liu
493e40ff78
[subset] add one empty byte to glyf table
...
if it's going to end up empty after subsetting
This will make OTS happy and match what fontTools is doing now.
2020-02-19 12:24:38 +03:30
Ebrahim Byagowi
a7dec0cb51
[glyf] Tweak path_builder_t
2020-02-18 16:22:12 +03:30
Ebrahim Byagowi
d52ea2a42c
[glyf] minor
2020-02-18 15:46:02 +03:30
Ebrahim Byagowi
3b0c58f811
[glyf] minor, use private font coords to simplify
2020-02-18 15:43:25 +03:30
Ebrahim Byagowi
dcd2729e71
[glyf] Move contour_bounds_t into scope it is actually used
2020-02-18 15:38:57 +03:30
Ebrahim Byagowi
8bb47fa17d
[glyf] minor, spacing
2020-02-18 15:06:58 +03:30
Ebrahim Byagowi
21a5fe4f09
[glyf] Make returning phantoms to not require another vector
2020-02-18 14:38:55 +03:30
Ebrahim Byagowi
5c03fbe7e0
[glyf] do a phantom only iteration when possible
2020-02-18 14:08:37 +03:30
Ebrahim Byagowi
11f3fca01d
[glyf/gvar] Remove need of passing end points vector around
2020-02-18 14:08:37 +03:30
Ebrahim Byagowi
0f2c2d989b
[glyf] Push consumer machine one more level further
2020-02-18 14:08:37 +03:30
Ebrahim Byagowi
11f5f7c59c
[glyf] Adopt a state machine like style for the path builder
...
Toward making glyf path reader alloc free at least on gvar absence.
2020-02-18 00:49:09 +03:30
Ebrahim Byagowi
60f8f384f9
[glyf] Switch to ttf-parser's glyf to path algorithm
...
It consumes each point at a time and doesn't need to know contour size before hand
2020-02-18 00:49:09 +03:30
ariza
3c792c2aa5
add test cases for hb_unwrap_type
2020-02-17 21:16:15 +00:00
ariza
168ceeac49
renamed to hb_unrwap_type(); now recursive
2020-02-17 21:16:15 +00:00
ariza
71552ecc26
add hb_get_type
2020-02-17 21:16:15 +00:00
ariza
6585846352
pop_pack(share=false) in end_serialize()
...
issue #2177
2020-02-16 17:16:29 -08:00
Michiharu Ariza
39fb57c0e4
add share option to pop_pack() ( #2176 )
...
as a solution for #2164
2020-02-16 08:38:41 -08:00
ariza
9c6499d9f4
rewrite read_points() to take lambda & consts args
...
replacing awkward x/y_setter_t structs
2020-02-16 00:56:31 -08:00
Behdad Esfahbod
d663e28af1
[serialize] Catch signedness overflows in check_assign()
...
Should address https://github.com/harfbuzz/harfbuzz/pull/2163#pullrequestreview-355137936
2020-02-12 15:41:21 +00:00
Ebrahim Byagowi
ff984ed3cd
Use multiplication to avoid undefined behaviour per clang
...
Newer versions of MSVC with /we4146 don't like putting negative sign behind a
unsigned number as https://github.com/harfbuzz/harfbuzz/pull/2069
That however have made https://crbug.com/1050424 this complain:
src/hb-ot-color-sbix-table.hh:304:28: runtime error: negation of -2147483648 cannot be represented in type 'int';
cast to an unsigned type to negate this value to itself
which apparently can be fixed using this change.
Let's see if this won't make another ubsan complain!
2020-02-11 19:51:52 +03:30
Ebrahim Byagowi
21e1b1310a
[colr] minor style fix
2020-02-11 17:10:34 +03:30
Ebrahim Byagowi
cbb45c3ee7
[subset/colr] minor improve to resolve msvc complain
...
MSVC says,
hb-ot-color-colr-table.hh(215): warning C4700: uninitialized local variable 'new_record' used [build\harfbuzz-subset.vcxproj]
harfbuzz-subset.vcxproj -> build\Debug\harfbuzz-subset.lib
2020-02-11 16:46:18 +03:30
Ebrahim Byagowi
352ac63ef9
Fix an unlikely UAF on the deprecated _set_glyph_func API
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2168
2020-02-11 03:05:04 +03:30
Ebrahim Byagowi
6a390df8af
[tools] Print unicode links on gen-* tools output
...
As Behdad's review
2020-02-10 17:20:09 +03:30
Evgeniy Reizner
4dc87365d7
Add links to files used by python scripts.
...
Closes #2150
2020-02-09 20:52:49 +03:30
Ebrahim Byagowi
40166eb0e5
[var] Fix the just introduced hb_font_set_var_coords_design storing bug
...
The memcpy call was using the current coords count which is zero initially so no copy at all.
Sad that no test has caught it, should see why, will however with the upcoming style API tests.
2020-02-08 13:22:01 +03:30
Ebrahim Byagowi
5c1a023f67
[tool] Optimize COLR glyph dump
...
Move palette colors fetching out of gid iteration so not
fetching all the colors of a palette each time.
2020-02-08 11:07:33 +03:30
Ebrahim Byagowi
0b76e8130e
Don't use _normalize_variations to avoid twice axis fetch
2020-02-08 11:04:34 +03:30
Ebrahim Byagowi
ab2d3ec542
[var] Implement hb_font_get_var_coords_design
...
Hold design coords and simulate when normalized coords are set directly.
2020-02-08 11:04:34 +03:30
Garret Rieger
5a10f3a055
Use vector instead of map during page compaction in hb-set.
2020-02-08 10:27:44 +03:30
Garret Rieger
2742c81624
Fix page_map corruption in hb_set_t during process().
...
If a process operation results in less pages then the current set has, it will likely corrupt the page_map since it overwrites page_map entries ahead of where it's processing. This fixes that problem by removing page_map entries that will be dropped. Then dropping orphaned pages and re-indexing retained pages.
2020-02-08 10:27:44 +03:30
Qunxin Liu
eb7849a806
[subset] GPOS6 MarkToMark subsetting support
2020-02-06 10:46:05 -08:00
Qunxin Liu
82afc75835
[subset] GPOS4 MarkBase subsetting support
2020-02-06 10:46:05 -08:00
Ebrahim Byagowi
4dc3db7344
Minor, fix warnings raised when built with -std=c++2a
...
Follow up to c184180
,
It was raising,
src/hb-ot-layout-common.hh:1067:63: warning: implicit capture of 'this' with a capture default of '=' is deprecated [-Wdeprecated-this-capture]
| hb_filter ([=] (const OffsetTo<TSubTable> &_) { return (this+_).intersects (glyphset, lookup_type); })
^
src/hb-ot-layout-common.hh:1067:19: note: add an explicit capture of 'this' to capture '*this' by reference
| hb_filter ([=] (const OffsetTo<TSubTable> &_) { return (this+_).intersects (glyphset, lookup_type); })
^
, this
and
src/hb-ot-layout-common.hh:2626:38: warning: implicit capture of 'this' with a capture default of '=' is deprecated [-Wdeprecated-this-capture]
{ r.collect_lookups (this, lookup_indexes); })
^
src/hb-ot-layout-common.hh:2625:18: note: add an explicit capture of 'this' to capture '*this' by reference
| hb_apply ([=] (const FeatureTableSubstitutionRecord& r)
^
, this
and
src/hb-ot-hdmx-table.hh:141:44: error: implicit capture of 'this' with a capture default of '=' is deprecated [-Werror,-Wdeprecated-this-capture]
return device_record->widthsZ.as_array (get_num_glyphs ()) [_];
^
src/hb-ot-hdmx-table.hh:137:17: note: add an explicit capture of 'this' to capture '*this' by reference
| hb_map ([=] (hb_codepoint_t _)
^
, this
2020-02-06 16:25:54 +03:30
Ebrahim Byagowi
b4d3bf1d8a
[draw] Add hb_draw_funcs_is_immutable and hb_draw_funcs_make_immutable
2020-02-06 11:52:32 +03:30
Ebrahim Byagowi
3a98c7fae1
[glyf] Skip empty contours
...
As https://savannah.nongnu.org/bugs/index.php?57701
2020-02-06 11:35:48 +03:30
ckitagawa
03f778cf3c
[cmap] remove dead code
2020-02-05 18:00:39 +03:30
Ebrahim Byagowi
71a2018600
[cbdt] minor, tweak spaces
2020-02-05 17:40:51 +03:30
Ebrahim Byagowi
eaa2402a79
[cbdt] Merge hb-ot-color-cbdt-table.cc into its header file
...
Not needed as far as can be said.
2020-02-05 17:09:12 +03:30
Ebrahim Byagowi
a7f694d4b0
Merge branch 'subset_cblc' into master
2020-02-05 16:31:21 +03:30
Ebrahim Byagowi
43016715e1
[subset] minor on _subset
2020-02-05 15:02:20 +03:30
Ebrahim Byagowi
dcb5dfc970
[subset] minor on tables iteration
2020-02-05 15:01:25 +03:30
Ebrahim Byagowi
a8593339e2
[subset] minor on switch statements
2020-02-05 15:00:25 +03:30
Ebrahim Byagowi
b1f63109c6
[subset] Optimize _is_table_present
...
One call for most of the fonts and no malloc
2020-02-05 00:30:40 +03:30
Ebrahim Byagowi
25707e37e3
[cff] minor
2020-02-05 00:27:28 +03:30
ckitagawa
0d61926ca7
[subset] Keep head when no glyf table
2020-02-04 23:31:33 +03:30
Ebrahim Byagowi
7f9b2228a6
[glyf] minor
...
Improve using https://developer.blender.org/diffusion/B/browse/master/source/blender/blenlib/intern/freetypefont.c$572
2020-02-04 23:05:49 +03:30
Ebrahim Byagowi
5b43603385
[subset] Rename _subset2 to _subset
2020-02-04 21:29:24 +03:30
ariza
2792fb8ba1
first rewrite of cff/cff2 _subset with _subset2
2020-02-04 21:20:43 +03:30
ckitagawa
b114b26a56
Add guard to copy_glyph_at_idx
2020-02-04 09:49:24 -05:00
Ebrahim Byagowi
b2a68ed587
[name] Minor, use subtraction instead ternary operator
...
Guess ternary was a bit more legible, apparently however we agreed to use subtraction,
https://github.com/harfbuzz/harfbuzz/pull/2139#discussion_r372582005
2020-02-01 23:16:45 +03:30
Qunxin Liu
490ef1cc23
[subset] Fix namerecord ordering
...
This will fix inconsistency with fontTools.
Also according to the spec, namerecords must be sorted
first by platform ID, then by platform-specific ID,
then by language ID, and then by name ID.
2020-02-01 23:07:47 +03:30
ckitagawa
e128f80278
parent 777ba47b50
...
author ckitagawa <ckitagawa@chromium.org> 1579631743 -0500
committer ckitagawa <ckitagawa@chromium.org> 1580506176 -0500
[subset] Add CBLC support
2020-01-31 16:37:30 -05:00
Evgeniy Reizner
b4377afd28
Minor hb_ot_layout documentation fixes.
2020-01-31 22:57:38 +03:30
Qunxin Liu
0216a96b0f
[subset] Fix simple glyph trim_padding in glyf table
...
Detail: when numOfContours = 1 and flag = 0x31
xCoordinates and yCoordinates would be empty
2020-01-31 10:49:44 -08:00
Qunxin Liu
b6a8f5e63c
[subset] CMAP table subsetting fix
...
Not all codepoints smaller than 0xFFFF go to cmap4 table.
Only subset codepoints existing in each table.
This will also make harfbuzz consistent with fontTools' behavior
2020-01-31 10:49:44 -08:00
Ebrahim Byagowi
777ba47b50
Merge pull request #2132 from ckitagawa-work/subset_colr
...
[subset] Add COLR support
2020-01-30 22:38:43 +03:30
Ebrahim Byagowi
5b069c3612
[draw][docs] update to new terminology
2020-01-30 18:05:01 +03:30
Ebrahim Byagowi
920dca4550
[draw][docs] update to new terminlogy
2020-01-30 18:03:06 +03:30
Ebrahim Byagowi
1632726c1f
[draw] minor
2020-01-30 16:48:34 +03:30
ckitagawa
92f43a99c6
[subset] COLR, simplify logic and use add_array
2020-01-29 16:06:55 -05:00
ckitagawa
fba5128a9e
Fix build
2020-01-29 10:24:55 -05:00
ckitagawa
7d542a5274
Refactor to two iterators
2020-01-29 10:21:00 -05:00
ckitagawa
0aed54dca6
Use one-liner methods
2020-01-28 15:35:53 -05:00
ckitagawa
81c469eb62
Try to fix Wrange-loop-analysis
2020-01-28 15:35:53 -05:00
ckitagawa
0d1ba94ac7
Minor style fixes
2020-01-28 15:35:53 -05:00
ckitagawa
ed857c4680
[subset] Add COLR support
2020-01-28 15:35:53 -05:00
Ebrahim Byagowi
d106900bfd
[draw][glyf] Implement quadratic to cubic call translation
2020-01-28 15:27:27 +03:30
Ebrahim Byagowi
74fdcdcac8
[draw] Rename conic_to to quadratic_to
2020-01-28 13:45:22 +03:30
Ebrahim Byagowi
ac81e94016
Rename hb_outline_decompose to hb_font_draw_glyph and hb_outline_decompose_funcs_t to hb_draw_funcs_t
2020-01-28 13:24:49 +03:30
Ebrahim Byagowi
cf5f946756
[outline] use hb_object_is_immutable instead comparing to Null
2020-01-27 23:43:54 +03:30
Ebrahim Byagowi
981125aa2a
Rename hb_ot_glyph_* to hb_outline_*
2020-01-27 23:43:54 +03:30
Evgeniy Reizner
cd7b46ca15
Use correct return type in _unsafe_to_break_find_min_cluster.
2020-01-26 23:59:36 +03:30
Ebrahim Byagowi
cd266e4f3d
minor
2020-01-25 21:33:38 +03:30
Ebrahim Byagowi
f9070cfef8
Run morx if run is horizontal or GSUB doesn't exist
2020-01-25 00:36:36 +03:30
Ebrahim Byagowi
8e0898080f
[sbix] minor style fixes
2020-01-24 23:42:53 +03:30
Qunxin Liu
36a5c042d7
[subset] Add "--name-languages" and "--name-legacy" options
...
Make name table subsetting consistent with fontTools
2020-01-24 23:17:04 +03:30
Ebrahim Byagowi
b7762c7068
Disable hb_ot_glyph_decompose in HB_TINY
2020-01-24 21:20:07 +03:30
ckitagawa-work
0e4b2676bd
[subset] sbix fix missed offset is_null() check
2020-01-24 20:46:07 +03:30
Ebrahim Byagowi
2d14735588
[src/main] separate the places use private API, minor
2020-01-24 19:56:06 +03:30
Ebrahim Byagowi
23277beef9
Fold src/test-ot-glyph and src/test-ot-color into src/main
2020-01-24 19:56:06 +03:30
Ebrahim Byagowi
b72337e57e
[test] Adopt test-ot-color with ot-glyph and remove freetype/cairo dependecy
2020-01-24 19:56:06 +03:30
Ebrahim Byagowi
e171beeb5f
Revert "[subset] Add "--name-languages" and "--name-legacy" options"
...
Causes tests failures, please reapply when tests are fixed, thanks.
This reverts commit fd85818b5b
.
2020-01-24 19:51:32 +03:30
Dominik Röttsches
298c46afbf
Only prefer AAT morx for horizontal layout
...
Fixes #2124 .
2020-01-24 19:48:36 +03:30
Qunxin Liu
fd85818b5b
[subset] Add "--name-languages" and "--name-legacy" options
...
Make name table subsetting consistent with fontTools
2020-01-23 17:24:05 -08:00
Qunxin Liu
c370da45ff
[subset] Cmap table: remove encodingRecord entry for empty cmap4 subtable
2020-01-23 17:23:55 -08:00
ckitagawa
d3fff622b3
Move push call to caller
2020-01-23 23:46:22 +03:30
ckitagawa
7dc341fe74
[subset] Fix UBSAN issue in sbix
2020-01-23 23:46:22 +03:30
ariza
1ab3924b31
refix PR #2087 subset PairPos1
...
also added oss-fuzz 20211 data fixed by this
2020-01-23 10:50:52 -08:00
Ebrahim Byagowi
7633b7695e
Merge pull request #2016 from ebraminio/glyf
...
Implement glyph outline path API
2020-01-23 18:51:40 +03:30
Ebrahim Byagowi
02f324c949
[ot-glyph] remove open callback
...
Apparently it wasn't requested actually and can be detected easily
as paths are opened usually when move command is issued anyway.
2020-01-23 15:12:15 +03:30
Ebrahim Byagowi
684ff3e0cd
[ot-glyph] noop->nil, fix close path
2020-01-23 14:48:59 +03:30
ckitagawa
3747b329b2
Address garretrieger@'s comments
2020-01-22 10:11:15 -08:00
ckitagawa
af62c1c3b0
Fix style issue
2020-01-22 10:11:15 -08:00
ckitagawa
8614a30bc9
[subset] Fix sbix fuzz problem
2020-01-22 10:11:15 -08:00
ariza
72cbfb9059
remove empty lookup subtables
...
Added a variant of subset_offset_array which takes an extra arg passed to serialize_subset for this impl.
Added a new api test "test-subset-gpos" for this.
2020-01-21 16:53:19 -08:00
Michiharu Ariza
8f49aaa16f
minor: un-include glyf.hh in gvar.hh
2020-01-16 15:15:15 -08:00
Michiharu Ariza
c828d7bf76
[subset] fixed GPOS device table sanitize & serialize ( #2087 )
2020-01-15 15:32:44 -08:00
Qunxin Liu
e565d1f9bc
[subset] subset lookup/feature/script lists for GSUB/GPOS
2020-01-15 14:04:33 -08:00
ckitagawa
93376a6436
Add unittests
2020-01-15 13:36:01 -08:00
ckitagawa
6bcf57eaa3
Simplify copy and add fuzzing coverage
2020-01-15 13:36:01 -08:00
ckitagawa
78b50a67be
Address initial comments
2020-01-15 13:36:01 -08:00
ckitagawa
43b6c865ae
[subset] Support sbix subsetting
2020-01-15 13:36:01 -08:00
Ebrahim Byagowi
79fed9a1e4
[ot-glyph] Add open/close callbacks
2020-01-14 17:34:59 +03:30
Ebrahim Byagowi
ec1fba1388
[ot-glyph] make hb_ot_glyph_decompose_funcs_t struct opaque
2020-01-14 15:55:23 +03:30
Qunxin Liu
8ffc9add22
[subset] layout closure_features and store them in subset-plan
2020-01-14 07:24:48 +03:30
Dominik Röttsches
66dfd605b5
Fix duplicate check in hb_ot_rotate chars
...
Fixes #2099 . Fix indentation in mirroring section as well.
2020-01-13 18:20:12 +03:30
Ebrahim Byagowi
d7c3cb18ee
[ot-glyph] minor on tests
2020-01-13 18:17:21 +03:30
Ebrahim Byagowi
dc03a993d0
Fix collect lookups logic of FeatureTableSubstitution ( #2097 )
...
https://crbug.com/oss-fuzz/20036
2020-01-12 14:21:29 +03:30
Ebrahim Byagowi
a32ecc15ae
Fix collect lookups logic of FeatureVariationRecord
...
As "Offset to a feature table substitution table, from beginning of the FeatureVariations table."
from https://docs.microsoft.com/en-us/typography/opentype/spec/chapter2 the record should
match its sanitize logic not the reverse way.
Fixes https://crbug.com/oss-fuzz/20021 and https://crbug.com/oss-fuzz/20022
2020-01-11 15:37:24 +03:30
Ebrahim Byagowi
1a4c658b43
Use REPLACEME tag
...
So we can use the version we like when we decide what it should be while the next release
and can review the API before the release one other time.
2020-01-11 01:30:05 +03:30
Qunxin Liu
0b39c48064
[subset] closure lookups for GSUB/GPOS
2020-01-10 13:11:06 -08:00
Ebrahim Byagowi
42f4f1ea50
[ot-glyph] Add tests for hb_ot_glyph_decompose
2020-01-11 00:33:31 +03:30
Ebrahim Byagowi
06a1fcb3b4
[ot-glyphs] fix the tests
2020-01-10 23:12:30 +03:30
Ebrahim Byagowi
084a8182fb
[ot-glyphs] Move CFF glyph decompose logic to their tables
...
Thus making path decompose zero alloc on CFF/CFF2
2020-01-10 22:56:43 +03:30
Ebrahim Byagowi
6118523502
[ot-glyph] move glyph decompose logic of glyf to itself
...
One less vector allocation yet isn't zero alloc yet
which needs more work.
2020-01-10 21:08:26 +03:30
Ebrahim Byagowi
017f606c83
[ot-glyph] rewrite the API
2020-01-10 20:44:15 +03:30
Ebrahim Byagowi
05443e55bc
[ot-glyph] Return empty path for empty faces
2020-01-10 14:25:07 +03:30
Ebrahim Byagowi
6e7602c104
[ot-glyph] Fix leaks
2020-01-10 14:25:07 +03:30
Ebrahim Byagowi
5b08596d60
[gvar] Don't apply anything when no coords is given
2020-01-10 14:25:07 +03:30
Ebrahim Byagowi
742aaa1363
[ot-glyf] Fix leak issue
2020-01-10 14:25:07 +03:30
Ebrahim Byagowi
fddf79fc37
[glyf] minor
2020-01-10 14:25:07 +03:30
Ebrahim Byagowi
0b559d750f
[ot-glyph] Improve API names
2020-01-10 14:25:07 +03:30
Ebrahim Byagowi
af08f388ab
[ot-glyph] Support CFF1's seac
2020-01-10 14:25:07 +03:30
Ebrahim Byagowi
04ac7fb1c9
[ot-glyph] Add cff2 support
2020-01-10 14:25:07 +03:30
Ebrahim Byagowi
5cc09c462b
[ot-glyph] Initial cff1 support
2020-01-10 14:25:07 +03:30
Ebrahim Byagowi
3dcba9f215
[ot-glyph] Redesign the API
2020-01-10 14:25:07 +03:30