Commit Graph

170 Commits

Author SHA1 Message Date
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
Behdad Esfahbod fd71c045b4 Hopefully fix up previous commit and bots 2019-10-28 17:06:53 -07:00
Behdad Esfahbod e832dc4c64 [config] Make HB_NO_ERRNO work with systems defining errno as a macro 2019-10-28 17:02:40 -07:00
Iceflower d6a83abd6a Define HB_UNUSED for clang 2019-09-26 14:12:20 +03:30
Ebrahim Byagowi 412d6cac3a Extract an avoid errno compile flag 2019-09-17 20:58:13 +04:30
Behdad Esfahbod 3f2cdf07a4 Change HB_VAR_ARRAY to 1 again
To fix MSVC bots, while I work on changing this to 0 permanently.
2019-09-08 15:08:02 -04:00
Behdad Esfahbod 861547d531 Change HB_VAR_ARRAY from 1 to 0
Going to see which compilers it breaks and special-case those...
2019-09-06 16:55:00 -04:00
Behdad Esfahbod 0e294c455e Rename VAR to HB_VAR_ARRAY 2019-09-06 16:54:27 -04:00
Ebrahim Byagowi a77bb7eb41 Move hb_codepoint_parse to hb_parse_uint 2019-09-04 02:04:09 +04:30
Ebrahim Byagowi d50d2fcbc7 Fallback if roundf didn't exist, like in dietlibc (#1953) 2019-09-02 19:32:05 -05:00
Ebrahim Byagowi a0b4ac4dce Turn 8 spaces to tab across the project
According to the current code style of the project
2019-08-27 02:40:41 +04:30
Behdad Esfahbod 89228ccb9a Fix warning on IBM compilers
Fixes https://github.com/harfbuzz/harfbuzz/issues/1852
2019-07-22 07:07:37 -04:00
Ebrahim Byagowi eb8bd2f7ec Add hb_gdi_face_create API
Based on Konstantin Ritt work posted on mailing list
2019-07-21 14:22:19 -07:00
Ebrahim Byagowi 6a6bf7b7bc
Downgrade -Wdeprecated-declarations to warning
Fixes #1834 at least till fix of #1829
2019-07-17 21:22:38 +04:30
Behdad Esfahbod 8e3cde67df Fix MSVC build
MSVC warning:

c:\projects\harfbuzz\src\hb-ot-layout-gsubgpos.hh(2732): error C2121: '#': invalid character: possibly the result of a macro expansion [C:\projects\harfbuzz\build\harfbuzz.vcxproj]

Clang warning for it:

./hb-ot-layout-gsubgpos.hh:2729:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
2019-06-19 19:59:26 -07:00
Behdad Esfahbod 60653a7adb Remove HB_VECTOR_SIZE
It was cumbersome to get it to work reliably, for dubious performance
gain, mostly in the subsetter maybe...

Life is easier without.  It was disabled forever anyway.
2019-06-18 13:01:11 -07:00
Behdad Esfahbod 6172ec5d87 Remove (unused) posix_memalign fallback
Was wrong.  The returned pointer couldn't be passed to free().  Ouch!
2019-06-18 12:41:56 -07:00
Ebrahim Byagowi 19b8eb08e5
Move HB_NO_SETLOCALE to closer place to its to unbreak HB_TINY build (#1768) 2019-06-11 01:33:30 +04:30
Ebrahim Byagowi a36ff94171 Add HB_NO_SETLOCALE 2019-06-10 12:54:02 -07:00
Ebrahim Byagowi c4cae81a26 Remove round polyfill
Added in 01dff1e and 19256bef, this was targeted at older
msvc versions that don't support C99 but now as we require
C++11 we don't target places those envs thus removing this.
2019-06-10 12:49:50 -07:00
Behdad Esfahbod 3c240bd3dc Downgrade double-promotion from error to warning
https://github.com/harfbuzz/harfbuzz/issues/1740
2019-06-07 10:56:24 -07:00
Eli Zaretskii d5e5f37832 This makes minor changes to allow building HarfBuzz with
mingw.org's MinGW.

src/hb-algs.hh: Don't compile _BitScanForward and _BitScanReverse
for GCC >= 4.  mingw.org's MinGW doesn't have these functions.

src/hb-atomic.hh: MemoryBarrier does exist in mingw.org's MinGW,
but it is not a macro, it is an inline function.  __MINGW32_VERSION
is a macro that exists only in mingw.org's MinGW, so conditioning
on it should not affect MinGW64, where MemoryBarrier is a macro.

src/hb-uniscribe.cc: Define E_NOT_SUFFICIENT_BUFFER if it is not
defined (mingw.org's MinGW doesn't).

src/hb.hh: Don't include intrin.h for mingw.org's MinGW, since that
header is not available; instead, include windows.h.  Conditioned
on __MINGW32_VERSION to avoid affecting MinGW64.
2019-06-05 14:37:51 -07:00
Behdad Esfahbod 42ae468a8a [config] Add NDEBUG and HB_NDEBUG
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-05-13 23:43:45 -07:00
Behdad Esfahbod e98f0ddd63 Fix extra semi-colon 2019-05-13 13:53:06 -07:00
Behdad Esfahbod e6582de12f Add hb-config.hh 2019-05-10 23:53:38 -07:00
Behdad Esfahbod 227d85e138 Minor 2019-05-10 23:16:14 -07:00
Behdad Esfahbod c2c9d204fa Fix double-promotion warnings
Make it an error.
2019-05-07 23:13:38 -07:00
Behdad Esfahbod 45f5e56236 Warn on -Wdeprecated 2019-05-07 00:36:36 -07:00
Ebrahim Byagowi e261dc3a40
Ignore -Wc++11-compat as we require C++11 actually
pollutes gcc bots logs https://circleci.com/gh/harfbuzz/harfbuzz/85395
2019-05-07 01:24:55 +04:30
Cody Planteen 72e3eba8f8 Add configuration option HB_NO_GETENV to disable use of getenv() 2019-05-03 10:28:43 -07:00
Behdad Esfahbod 22da12318a [map] Fix TODO 2019-04-24 10:53:47 -04:00
Behdad Esfahbod a3fcb9a370 [meta] Add HB_AUTO_RETURN_EXPR, HB_VOID_RETURN_EXPR, hb_priority, hb_has(), hb_get()
The first three based on range-v3.
2019-04-16 10:45:57 -04:00
Behdad Esfahbod 02d864aa26 Add HB_FUNCOBJ()
Fixes https://github.com/harfbuzz/harfbuzz/issues/1651
2019-04-15 15:39:30 -04:00
Behdad Esfahbod b52c0e54b9 Use injected class name to simplify macros 2019-04-11 11:20:10 -04:00
Behdad Esfahbod baf1e79075 [C++11] Use deleted methods 2019-04-11 11:18:04 -04:00
Behdad Esfahbod 824fd342d5 Rename a few macros 2019-04-11 11:16:01 -04:00
Behdad Esfahbod 17f0cfa7ea Move BEInt to hb.hh
I knows...
2019-03-31 21:34:19 -07:00
Behdad Esfahbod eca466e6b1 Err. Fixup C++11 polyfill removal
Fixes 1d75db19fb
2019-03-29 15:59:04 -07:00
Behdad Esfahbod 3f36c89f2e Inline explicit_operator macro
Now that we require C++11, no need to macro.
2019-03-29 15:22:46 -07:00
Behdad Esfahbod 1d75db19fb Remove C++<11 polyfill
Leaving hb-atomic.hh as is since harmless and other projects might
copy from that file.
2019-03-29 15:20:34 -07:00
Behdad Esfahbod bdd5a9c48d Add hb_hash()
I don't like the hb_remove_reference() hack, but necessary.
2019-03-28 21:58:07 -07:00
Behdad Esfahbod a030ce4ff8 Merge branch 'master' into iter 2019-03-28 21:26:50 -07:00
Behdad Esfahbod 8665b9b0a2 Comment 2019-03-28 13:44:59 -07:00
Egor Pugin cf040c0fef Disable unwanted C++ definitions for MSVC.
MSVC does not set __cplusplus to the latest standard and also it does not like redefining some keywords.
2019-03-28 11:10:42 -07:00
Behdad Esfahbod e75b22039f Move hb_addressof() to hb-meta.hh 2019-01-28 21:26:23 -05:00
Behdad Esfahbod 073fa4ac5a Merge branch 'master' into iter 2019-01-28 14:35:41 -05:00
Behdad Esfahbod 51b584880e [pragma] Silence MSVC unknown-pragma warning 2019-01-28 14:09:45 -05:00
Behdad Esfahbod f35e7eabf1 pragma GCC diagnostic error "-Winjected-class-name"
See 6b6783e158
2019-01-26 22:50:00 +01:00
Behdad Esfahbod 509353357c [iter] Use hb_declval() instead of Null() to get instance
I had used Null to make one of the bots happy before.  Not going
to bend to such demands anymore..
2019-01-26 22:47:35 +01:00
Behdad Esfahbod ac90f17c55 Merge branch 'master' into iter 2019-01-26 14:05:39 +01:00
Behdad Esfahbod 60022ecced Fix -Wcast-function-type warnings in util/ with gcc 4.8 2019-01-26 14:04:51 +01:00
Behdad Esfahbod 090fe56dc6 Merge branch 'master' into iter 2019-01-25 16:06:52 +01:00
Behdad Esfahbod f60282c5bf More pragma control
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=924848
2019-01-24 16:29:09 +01:00
Behdad Esfahbod 9077272549 pragma GCC diagnostic error "-Wsign-compare" 2019-01-22 12:40:18 +01:00
Behdad Esfahbod c81f02fd06 pragma GCC diagnostic error "-Wvla" 2019-01-22 12:17:26 +01:00
Behdad Esfahbod 6e3ad650d1 Rename hb-dsalgs to hb-algs 2019-01-20 20:12:12 -05:00
Behdad Esfahbod f64ea8fc65 [meta] Move code around 2019-01-20 20:12:12 -05:00
Behdad Esfahbod 8c6cbbdfa3 [iter/meta] Add hb_is_iterable 2019-01-20 20:12:12 -05:00
Behdad Esfahbod e76a3cae0f Add hb-meta.hh for meta-programming 2019-01-20 20:12:12 -05:00
Behdad Esfahbod 2790aad28c [iter] Add operator -> 2019-01-20 20:12:12 -05:00
Behdad Esfahbod f13b6786f0 [pragma] Only add if GCC or clang 2019-01-18 14:53:54 -05:00
Behdad Esfahbod d9f6be3a61 Fix -Wundef errors with __GNUC__
Fixes https://github.com/harfbuzz/harfbuzz/issues/1549
2019-01-18 12:53:47 -05:00
Behdad Esfahbod 9b4e51b2e4 [pragma] Enable error -Wdelete-non-virtual-dtor
Currently fails directwrite backend.
2019-01-18 12:23:02 -05:00
Behdad Esfahbod a25174a56b [pragma] GCC diagnostic error "-Wreorder" 2019-01-18 09:59:36 -05:00
Behdad Esfahbod 4660090569 [pragma] GCC diagnostic warning "-Wmaybe-uninitialized" 2019-01-18 09:53:16 -05:00
Behdad Esfahbod 7a634d7d5b [pragma] Massage more 2019-01-18 09:49:14 -05:00
Behdad Esfahbod 16e5ba85b1 [pragma] More 2019-01-18 09:46:17 -05:00
Behdad Esfahbod 2bd530d598 [pragma] Reorg again
https://github.com/harfbuzz/harfbuzz/issues/1546
2019-01-18 09:28:22 -05:00
Behdad Esfahbod c04272fac8 [pragma] GCC diagnostic ignored "-Wunknown-warning-option"
Try at fixing https://github.com/harfbuzz/harfbuzz/issues/1546
2019-01-18 08:49:45 -05:00
Behdad Esfahbod a77bd6bb89 [pragma] GCC diagnostic ignored "-Wclass-memaccess" 2019-01-17 19:33:41 -05:00
Behdad Esfahbod 436c7b294a [pragma] ignored -Wunsafe-loop-optimizations // TODO fix 2019-01-17 19:03:33 -05:00
Behdad Esfahbod e3b3181e9d [pragma] error -Wclass-memaccess 2019-01-17 19:02:06 -05:00
Behdad Esfahbod 1a6b97a491 [pragma] More 2019-01-17 18:55:03 -05:00
Behdad Esfahbod 06e8091661 [pragma] More 2019-01-17 18:47:32 -05:00
Behdad Esfahbod 1077e40bf1 [pragma] Flesh out more 2019-01-17 18:36:10 -05:00
Behdad Esfahbod 14a560a245 [pragma GCC] Ignore -Wtype-limits 2019-01-17 17:42:44 -05:00
Behdad Esfahbod 3f2daae630 More GCC pragmas 2019-01-17 15:27:31 -05:00
Behdad Esfahbod d6c5473e1f Rename macro 2019-01-17 15:22:46 -05:00
Behdad Esfahbod a9946b7cfe Add more GCC warning pragmas 2019-01-17 15:22:28 -05:00
Behdad Esfahbod 868b0c0c2e Move -Wcast-align to hb.hh 2019-01-17 15:18:18 -05:00
Behdad Esfahbod 9f6172d669 Move _POSIX_SOURCE definition
Fixes https://github.com/harfbuzz/harfbuzz/issues/1308
2019-01-14 20:45:31 -05:00
Behdad Esfahbod d092fb2719 Ouch! Fix build on C++<11 2018-12-30 01:53:03 -05:00
Behdad Esfahbod 357a0a7ad3 Fix build on C++ < 11 2018-12-27 18:29:23 -05:00
Behdad Esfahbod fa333e34d6 [vector] Remove static_array
Was good idea, but with C++ types with constructor/destructor, was getting in
the way as compiler was destructing those items where it was not desired.
Since C++ does not allow zero-sized arrays, just remove it...
2018-12-27 17:56:22 -05:00
Behdad Esfahbod d25a2f1496 Fix a few warnings 2018-12-23 20:34:24 -05:00
Behdad Esfahbod 865deeb3be Adjust internal header dependencies 2018-12-21 17:46:10 -05:00
Behdad Esfahbod f419cef417 [iter] Include from hb.hh 2018-12-21 17:22:09 -05:00
Behdad Esfahbod 49334f9b50 Enable system extensions in hb.hh
Fixes https://github.com/harfbuzz/harfbuzz/issues/1491
2018-12-17 18:27:36 -05:00
Behdad Esfahbod 483f2491e4 Remove define GNU_SOURCE
Not needed.  We get it in our config.h automatically thanks to
AC_USE_SYSTEM_EXTENSIONS.  Let's see whose build it breaks...
If we end up putting it back, we should add other things from
that macro and remove the macro.
2018-12-17 17:56:10 -05:00
Behdad Esfahbod 87ff65aea1 Fix more warnings 2018-12-17 17:19:54 -05:00
Ebrahim Byagowi e412008599 Remove redundant void from C++ sources (#1486) 2018-12-17 13:01:01 -05:00
Behdad Esfahbod 01d06e34ff Minor change to explicit_operator aesthetics 2018-12-16 14:27:43 -05:00
Behdad Esfahbod b206133d1f [aat] Move contents of hb-aat.h to hb-aat-layout.h
Since it was pages and pages...
2018-11-25 01:16:02 -05:00
Ebrahim Byagowi a8726cb483 [feat] Use bsearch 2018-11-25 01:16:02 -05:00
Behdad Esfahbod f99abcc379 Add template-function convenience macros 2018-11-24 00:24:01 -05:00
Behdad Esfahbod 3d2b98ef14 Minor 2018-11-23 10:58:43 -05:00
Behdad Esfahbod a2d6c1075a Minor tweak to FLAG64 2018-11-22 22:40:57 -05:00
Behdad Esfahbod 8280459e74
Merge pull request #1291 from harfbuzz/use-reordering
[use] Fix reordering
2018-11-22 22:39:12 -05:00
Behdad Esfahbod b89c7fd3dc Allow defining HB_USE_ATEXIT to 0
That's better use of that value than requiring extra macro HB_NO_ATEXIT
2018-11-21 12:32:48 -05:00