src/hb.hh


Log

Author Commit Date CI Message
Behdad Esfahbod 1dac21c1 2025-03-28T12:44:20 [errors] Add -Wuninitialized Works with newer clang I think.
Behdad Esfahbod 5bf81c37 2025-03-11T22:46:16 [common] Make hb_malloc() et al public New API: +hb_malloc() +hb_calloc() +hb_realloc() +hb_free()
Behdad Esfahbod 4323c664 2025-03-10T20:06:08 [fontations] Make fontations use hb_malloc et al
Khaled Hosny 123a0d68 2025-03-06T22:07:17 Use gnu_printf format annotation under MingW with GCC only Fixes https://github.com/harfbuzz/harfbuzz/issues/5106
Khaled Hosny f012442f 2025-02-20T21:36:02 Annotate printf functions with gnu_printf format under MingW Fixes https://github.com/harfbuzz/harfbuzz/issues/5080
Behdad Esfahbod 0bb72eee 2025-02-18T00:44:29 [decycler] Turn off compiler warning ../src/OT/Var/VARC/../../../hb-decycler.hh:108:25: warning: storing the address of local variable ‘node’ in ‘*&c_15(D)->layers_decycler.hb_decycler_t::tortoise’ [-Wdangling-pointer=]
Behdad Esfahbod 16c196e0 2024-08-22T15:45:41 Fix warnings with -fstrict-flex-arrays=2 Unfortunatley we cannot set it to 2 in hb.hh; but fix the warning and add it with default value of 1 anyway. Fixes https://github.com/harfbuzz/harfbuzz/pull/4836
Ozkan Sezer c2f8f35a 2024-03-15T18:45:24 Use inttypes.h PRI?32 macros in format strings for [u]int32_t args. This is a modified and cleaned-up version of PR #4619 by @jpcomito: hb-common.h now expects 'inttypes.h' presence with MSVC exceptions, defines __STDC_FORMAT_MACROS in there (if not already defined) and undoes c930ae2 (PR #1974) and 902ab86. Co-authored-by: jcomito <jcomito@google.com>
Behdad Esfahbod 9182315b 2024-01-27T16:33:46 [hb.hh] Add error -Wcast-function-type-strict
Behdad Esfahbod fcc5d3df 2023-07-10T16:21:28 Add -Wconstant-conversion to errors
Behdad Esfahbod 72881234 2023-07-08T14:14:27 Allow overriding HB_ALWAYS_INLINE
Behdad Esfahbod ca44c38c 2023-06-29T14:41:21 Add HB_ALWAYS_INLINE With MSVC implementation as well.
Behdad Esfahbod 7e7f1d04 2023-05-02T12:06:00 Drop a pair of parantheses from likely/unlikely Such that "if likely(...)" wouldn't compile.
Behdad Esfahbod db730f46 2023-05-02T11:55:10 Simplify likely/unlikely This surprisingly saves bytes and speeds up.
Behdad Esfahbod 75e6498d 2023-03-14T12:41:46 Don't use M_PI Fixes https://github.com/harfbuzz/harfbuzz/issues/4166 Happy Pi Day!
Behdad Esfahbod 5bc6ab00 2023-02-22T08:08:11 Use __has_builtin for builtin checks instead of compiler versions https://github.com/harfbuzz/harfbuzz/issues/4066#issuecomment-1439510188
Behdad Esfahbod 5b50b077 2023-02-19T20:30:38 [subset-cff] Make BCD writing locale-independent
Behdad Esfahbod 13c70066 2023-01-18T17:29:26 Shut up gcc 13 -Wdangling-reference Fixes https://github.com/harfbuzz/harfbuzz/issues/4043
Behdad Esfahbod 075fe334 2023-01-12T17:14:42 Enable -Wunsafe-loop-optimizations I don't get any.
Behdad Esfahbod ed023f66 2023-01-12T17:04:24 Enable -Wformat-signedness And fix the codebase.
Behdad Esfahbod ae208963 2022-12-26T12:30:39 Add hb-limits.hh
Behdad Esfahbod 60c6b778 2022-10-28T14:19:39 Disable -Wcast-function-type-strict https://github.com/harfbuzz/harfbuzz/pull/3859#issuecomment-1295409126
Ryan VanderMeulen 1c0eeb7c 2022-06-15T23:05:15 Don't try to set _USE_MATH_DEFINES if already defined
Behdad Esfahbod e9c0a740 2022-06-15T16:57:16 Fix clang -Wcomma warnings Fixes https://github.com/harfbuzz/harfbuzz/issues/3656
Behdad Esfahbod 17c80035 2022-06-09T04:17:38 Revert "[cplusplus] Internally allow using hb_unique_ptr with hb_free()" This reverts commit b5f621b08d56c15832ab4f588a0673fce03305a0. A build was failing with clang 14 for Firefox apparently, sigh. https://github.com/harfbuzz/harfbuzz/issues/3647
Behdad Esfahbod b5f621b0 2022-06-05T07:52:51 [cplusplus] Internally allow using hb_unique_ptr with hb_free() ...for arbitrary types.
Behdad Esfahbod 3817bdfd 2022-06-01T12:35:03 [hb.hh] Include hb-cplusplus.hh
Behdad Esfahbod 484cc187 2022-05-30T05:06:43 [test-shape-threads] Set language
Behdad Esfahbod 91779537 2022-02-04T12:38:45 [atexit] Allow hb_atexit redefinition Fixes https://github.com/harfbuzz/harfbuzz/issues/3412
Behdad Esfahbod 9bd7ba50 2021-10-12T08:44:01 Err on -Wbitwise-instead-of-logical Part of https://github.com/harfbuzz/harfbuzz/pull/3256
Behdad Esfahbod e0d5fe74 2021-09-17T08:27:03 Centralize math include https://github.com/harfbuzz/harfbuzz/pull/3212
Behdad Esfahbod bda3238c 2021-09-14T08:12:48 Add fallback atexit implementation using template descrutors Fixes https://github.com/harfbuzz/harfbuzz/issues/3197
Behdad Esfahbod ed116320 2021-09-14T07:09:54 Call atexit() via hb_atexit() Part of https://github.com/harfbuzz/harfbuzz/issues/3197
Khaled Hosny 791a1bf3 2021-07-27T15:22:13 Don’t disable getenv on Windows The condition is inverted, regression from 40ec187dec07e97ed4004b9831e7be844e6e7948.
Behdad Esfahbod 2337f0d0 2021-07-08T10:58:50 Internally use hb_malloc/.../hb_free instead of malloc/.../free Redefining those stock names as macros was conflicting with gcc 10 headers. Fixes https://github.com/harfbuzz/harfbuzz/issues/3044
Behdad Esfahbod ed2ee8a8 2021-04-16T13:53:43 Revert "Disable -Wunused-macros under GCC" This reverts commit 1b1413246b8b4a9c6f7e0aac16afd6d110c142cf. Err. It wasn't working. We already have that disabled in the files it is warning about. Doesn't work.
Behdad Esfahbod 1b141324 2021-03-30T20:54:20 Disable -Wunused-macros under GCC Since the pragram in hb-ot-shape-complex-indic-table.cc didn't seem to silence GCC, eg: ../../src/hb-ot-shape-complex-indic-table.cc:55: warning: macro "ISC_TL" is not used [-Wunused-macros] 55 | #define ISC_TL INDIC_SYLLABIC_CATEGORY_TONE_LETTER /* 7 chars; Tone_Letter */ disable it at compiler level.
Behdad Esfahbod 23976893 2021-03-29T17:34:23 Remove hb_success_t Was not rolled-out yet. So just expand.
Behdad Esfahbod 05e845c4 2021-03-29T16:02:10 Make previous commit gcc-only
Behdad Esfahbod b5e40323 2021-03-29T15:54:40 -Wno-unused-result GCC doesn't let one turn off the warning using "(void) foo()". People have introduced macros that do "unused << foo()" instead. Until we do something similar, silence gcc. Clang on the other hand understands "(void) foo()".
Behdad Esfahbod 7cb22ba7 2021-03-01T12:44:06 Include C headers with their C++ names (#2882) Remove unnecessary includes. Fixes build with some known broken SDKs (Nintendo Switch?) https://en.cppreference.com/w/cpp/header Fixes https://github.com/harfbuzz/harfbuzz/pull/2881
Behdad Esfahbod a3c35aee 2020-06-29T02:07:20 m Move HB_SCRIPT_MYANMAR_ZAWGYI
Behdad Esfahbod c55bf551 2020-06-29T02:04:16 Remove HB_CONST_FUNC and HB_PURE_FUNC They are not necessary for inline functions.
Behdad Esfahbod cba9893a 2020-06-29T01:55:57 m[algs] Move roundf() here
Behdad Esfahbod f0947717 2020-06-29T01:53:21 m[machinery] Move HB_VAR_ARRAY here
Behdad Esfahbod a89d9f25 2021-02-20T15:35:28 m Err on -Wnarrowing instead of -Wc++11-narrowing On clang, -Wnarrowing is synonym for -Wc++11-narrowing. On gcc it isn't. So, use the widely-available one
Behdad Esfahbod 47f01c07 2020-06-29T01:25:35 m[algs] Move BEInt here
Behdad Esfahbod e5b7bc42 2020-06-29T01:24:02 m Add default value to BEInt<> Size template parameter
Behdad Esfahbod 2caae4a5 2020-06-29T01:18:28 m Move class traits
Behdad Esfahbod c2dbd6cc 2020-06-29T01:15:36 Remove static_assert of sizeof basic sized int types
Behdad Esfahbod e1706ffe 2020-06-29T00:59:06 m [algs] Move flags here
Behdad Esfahbod 017f6b0d 2020-06-29T00:44:41 m Move static_assert_expr<>
Behdad Esfahbod 61f8d0e5 2020-06-29T00:38:56 m Rename ASSERT_STATIC_EXPR_ZERO to static_assert_expr
Behdad Esfahbod 59cfffb1 2020-06-29T00:34:07 m Change ASSERT_STATIC_EXPR_ZERO template arg type to bool
Behdad Esfahbod 1981d83d 2020-06-29T00:28:31 [constexpr] HB_MARK_AS_FLAG_T
Behdad Esfahbod a4a99de0 2020-06-29T00:22:02 [constexpr] bswap
Behdad Esfahbod f8ebe1da 2020-06-29T00:20:45 [constexpr] BEInt
Behdad Esfahbod 86993c09 2021-02-19T17:09:33 Ignore -Wrange-loop-analysis Fixes https://github.com/harfbuzz/harfbuzz/issues/2834
Ebrahim Byagowi 0ca35570 2020-08-09T16:10:06 Turn -Wunused-but-set-variable to warning As #2555 turned out some glib headers are imposing that so let's turn it to warning
Ebrahim Byagowi 7c433ffd 2020-07-15T09:38:12 Add HB_CUSTOM_MALLOC definition So one can use just HB_CUSTOM_MALLOC instead need for define each of hb_*alloc_impl
Hugo Beauzée-Luyssen 40ec187d 2020-04-24T14:01:07 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)
Behdad Esfahbod a7838407 2020-06-27T22:23:59 Always round up Fixes https://github.com/harfbuzz/harfbuzz/issues/2496
Ebrahim Byagowi 385d64ee 2020-05-07T09:59:01 Add a not discardable bool type, hb_success_t
Behdad Esfahbod c37100e7 2020-04-18T16:02:55 Clean up math.h and float.h includes
Ebrahim Byagowi 818f109b 2020-04-16T21:25:32 Use float in avar calculation instead ints and checking their overflows
Ebrahim Byagowi 9ffa50fe 2020-04-16T21:25:32 Add an appropriate fallback to hb_int_mul_overflows
Behdad Esfahbod fd71c045 2019-10-28T17:06:53 Hopefully fix up previous commit and bots
Behdad Esfahbod e832dc4c 2019-10-28T17:02:40 [config] Make HB_NO_ERRNO work with systems defining errno as a macro
Iceflower d6a83abd 2019-09-26T11:42:11 Define HB_UNUSED for clang
Ebrahim Byagowi 412d6cac 2019-09-16T13:50:11 Extract an avoid errno compile flag
Behdad Esfahbod 3f2cdf07 2019-09-08T15:08:02 Change HB_VAR_ARRAY to 1 again To fix MSVC bots, while I work on changing this to 0 permanently.
Behdad Esfahbod 861547d5 2019-09-06T16:55:00 Change HB_VAR_ARRAY from 1 to 0 Going to see which compilers it breaks and special-case those...
Behdad Esfahbod 0e294c45 2019-09-06T16:54:27 Rename VAR to HB_VAR_ARRAY
Ebrahim Byagowi a77bb7eb 2019-09-03T14:49:14 Move hb_codepoint_parse to hb_parse_uint
Ebrahim Byagowi d50d2fcb 2019-09-03T05:02:06 Fallback if roundf didn't exist, like in dietlibc (#1953)
Ebrahim Byagowi a0b4ac4d 2019-08-24T17:57:14 Turn 8 spaces to tab across the project According to the current code style of the project
Behdad Esfahbod 89228ccb 2019-07-22T07:07:37 Fix warning on IBM compilers Fixes https://github.com/harfbuzz/harfbuzz/issues/1852
Ebrahim Byagowi eb8bd2f7 2019-07-16T22:27:01 Add hb_gdi_face_create API Based on Konstantin Ritt work posted on mailing list
Ebrahim Byagowi 6a6bf7b7 2019-07-17T21:22:38 Downgrade -Wdeprecated-declarations to warning Fixes #1834 at least till fix of #1829
Behdad Esfahbod 8e3cde67 2019-06-19T19:58:24 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]
Behdad Esfahbod 60653a7a 2019-06-18T13:01:11 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.
Behdad Esfahbod 6172ec5d 2019-06-18T12:41:56 Remove (unused) posix_memalign fallback Was wrong. The returned pointer couldn't be passed to free(). Ouch!
Ebrahim Byagowi 19b8eb08 2019-06-11T01:33:30 Move HB_NO_SETLOCALE to closer place to its to unbreak HB_TINY build (#1768)
Ebrahim Byagowi a36ff941 2019-06-10T15:48:28 Add HB_NO_SETLOCALE
Ebrahim Byagowi c4cae81a 2019-06-10T15:32:54 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.
Behdad Esfahbod 3c240bd3 2019-06-07T10:56:24 Downgrade double-promotion from error to warning https://github.com/harfbuzz/harfbuzz/issues/1740
Eli Zaretskii d5e5f378 2019-06-05T22:20:03 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.
Behdad Esfahbod 42ae468a 2019-05-13T23:43:45 [config] Add NDEBUG and HB_NDEBUG Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Behdad Esfahbod e98f0ddd 2019-05-13T13:53:06 Fix extra semi-colon
Behdad Esfahbod e6582de1 2019-05-10T23:53:38 Add hb-config.hh
Behdad Esfahbod 227d85e1 2019-05-10T23:15:58 Minor
Behdad Esfahbod c2c9d204 2019-05-07T23:13:38 Fix double-promotion warnings Make it an error.
Behdad Esfahbod 45f5e562 2019-05-07T00:33:32 Warn on -Wdeprecated
Ebrahim Byagowi e261dc3a 2019-05-07T01:24:55 Ignore -Wc++11-compat as we require C++11 actually pollutes gcc bots logs https://circleci.com/gh/harfbuzz/harfbuzz/85395
Cody Planteen 72e3eba8 2019-05-02T13:03:15 Add configuration option HB_NO_GETENV to disable use of getenv()
Behdad Esfahbod 22da1231 2019-04-24T10:53:16 [map] Fix TODO
Behdad Esfahbod a3fcb9a3 2019-04-16T10:45:20 [meta] Add HB_AUTO_RETURN_EXPR, HB_VOID_RETURN_EXPR, hb_priority, hb_has(), hb_get() The first three based on range-v3.
Behdad Esfahbod 02d864aa 2019-04-15T15:39:03 Add HB_FUNCOBJ() Fixes https://github.com/harfbuzz/harfbuzz/issues/1651
Behdad Esfahbod b52c0e54 2019-04-11T11:20:10 Use injected class name to simplify macros
Behdad Esfahbod baf1e790 2019-04-11T11:18:04 [C++11] Use deleted methods