Commit Graph

8617 Commits

Author SHA1 Message Date
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
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