Commit Graph

10686 Commits

Author SHA1 Message Date
Ebrahim Byagowi 1b8a37f75f
[test] minor fix
oops...
2020-03-14 20:06:41 +03:30
Ebrahim Byagowi 0423da3373
[test] minor fix
macos tests are using absolute path which aren't relevant in Windows
2020-03-14 20:05:23 +03:30
Ebrahim Byagowi 74fdd34f4d
[test] make run-tests.py work on Windows 2020-03-14 20:03:14 +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
Tim-Philipp Müller a3892be701 [meson] fix spurious warning when building test/api C sources
Fixes compiler warning

  test-unicode.c:589:1: warning: ‘test_unicode_properties_lenient’ defined but not used

which didn't happen with autotools.

Reason it does with meson is that the setup for C was slightly wrong.
We would only add -DHAVE_CONFIG_H to cpp_args which is only valid when
compiling C++ code, but not plain C code, and many of these tests were
plain C.

Instead pass -DHAVE_CONFIG_H via add_project_arguments() and make sure
to set both c_args and cpp_args when building test executables.

Fixes https://github.com/harfbuzz/harfbuzz/issues/2257
2020-03-14 15:16:00 +03:30
Tim-Philipp Müller bb8aaa3108 [meson] use add_project_arguments() instead of add_global_arguments()
.. and simplify, can pass two languages in one go.

add_global_arguments() won't work if harfbuzz is used as a
meson subproject.
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
Garret Rieger 430bf69653 Add potentially crashing font as a fuzzer seed. 2020-03-14 00:55:47 +03:30
Ebrahim Byagowi c54ab9ba79 Provide meson wrap files on release tarball 2020-03-13 14:41:28 +03:30
Ebrahim Byagowi f1dd605cd9 [docs] Update to mention meson 2020-03-13 14:40:07 +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 9d0e6aef8a Meson: Look harder for Cairo on Visual Studio
Since Cairo's build system for Visual Studio does not generate pkg-config files
for us, look for cairo.h and cairo.lib manually if the pkg-config files cannot
be found.

Also look for cairo-ft more carefully: ensure that we have cairo-ft.h, and one
of its symbols can be found in the same cairo.lib that we previously found.
2020-03-13 14:30:17 +03:30
Chun-wei Fan 5efce600ab Meson: Try harder to look for ICU on Visual Studio
ICU's Visual Studio build files do not generate pkg-config files for us, unless
it is built with Cygwin instead of the project files.  If pkg-config files for
ICU cannot be found, look for its headers and .lib manually.
2020-03-13 14:30:17 +03:30
Chun-wei Fan 7baa8e0dbe meson: Updates to Uniscribe and DirectWrite build support
Update the DirectWrite support to look for dwrite_1.h, and give the green light
for both the DirectWrite and Uniscribe build options.
2020-03-13 14:30:17 +03:30
Chun-wei Fan 733414b286 meson: Try harder to find FreeType on Visual Studio
If we can't find FreeType via pkg-config or CMake, try looking for it manually,
before we attempt to build it as a fallback.
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 da95a8c239 Shaping tests: Skip FreeType tests if support not present
HarfBuzz could have been built without FreeType, so we skip the test
when hb-shape reports that the font function `ft' is unknown
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 dfab7a2546 [cmake] Bring it back to release tarball 2020-03-12 21:51:36 +03:30
Ebrahim Byagowi e860000db5 [cmake] Suggest Meson port in CMake 2020-03-12 21:51:36 +03:30
Ebrahim Byagowi b1c3d0b8b0 [cmake] cleanup 2020-03-12 21:51:36 +03:30
Ebrahim Byagowi cc63eb66ce
[editorconfig] Add meson config 2020-03-12 14:53:26 +03:30
Ebrahim Byagowi 1dd3896688 [meson] Make it work on autotools dist 2020-03-12 14:49:40 +03:30
Ebrahim Byagowi 47a047bd16
[ci] Remove the not used azure-pipelines.yml
We will use GitHub Actions instead, same infrastructure anyway, or even better, CircleCI's Windows support
2020-03-12 14:47: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 31218b41c6 [meson] Explicit state C++11 for older compilers
Needed as https://circleci.com/gh/harfbuzz/harfbuzz/132417
2020-03-12 00:25:48 +03:30
Ebrahim Byagowi 749cf378e8 [meson] test meson's own unity feature also 2020-03-12 00:25:48 +03:30
Ebrahim Byagowi f8c8be0564 [meson] Add amalgam build option 2020-03-12 00:25:48 +03:30
Ebrahim Byagowi 365d2d3cc3 [meson] Add needed compiler flags 2020-03-11 23:09:48 +03:30
Ebrahim Byagowi 12df69e59c
Minor, delete not needed cmake testing file 2020-03-11 21:52:43 +03:30
Ebrahim Byagowi 943bfeda53 [meson] Enable more of the subset tests 2020-03-11 21:49:26 +03:30
Ebrahim Byagowi c494d7abcd Remove cmake testing and add meson build bot
CMake tests are broken anyway as py3 changes so let's get rid of them
2020-03-11 20:15:10 +03:30
Ebrahim Byagowi 1c3f80ba13 [meson] Minor updates 2020-03-11 20:15:10 +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 6afa7e1c36 meson: update harfbuzz version 2020-03-11 19:18:57 +03:30
Tim-Philipp Müller f1e5f4a784 meson: tests: shaping: add aots tests 2020-03-11 19:18:57 +03:30
Tim-Philipp Müller 84725fb005 meson: tests: shaping: add missing in-house tests 2020-03-11 19:18:57 +03:30
Tim-Philipp Müller 8fc66dbf9f meson: tests: subset: no need to check for 'which' command any more
Test runner script now handles that.
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller 0976300be4 meson: pin glib wrap to 2.58.1 release 2020-03-11 19:18:57 +03:30
Tim-Philipp Müller 0fcf098206 meson: fix linking on MSVC 2020-03-11 19:18:57 +03:30
Tim-Philipp Müller 4a47f1aabc meson: suppress some spurious compiler warnings with MSVC 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