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