Commit Graph

8745 Commits

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