Commit Graph

207 Commits

Author SHA1 Message Date
Behdad Esfahbod b87cbe2bec Try fixing build for platforms that have no visibility attributes 2018-02-07 14:11:26 -05:00
Behdad Esfahbod 6804b61d2e [subset] Add hb_subset_face
It's a hb_face_t that has add_table() and in the future knows how to
compile itself into a font blob.
2018-02-07 13:47:35 -05:00
Behdad Esfahbod f41b92134a Fix fallthrough compiler warning with gcc >= 7
Fixes https://github.com/harfbuzz/harfbuzz/issues/755
2018-02-05 19:51:09 -05:00
Bruce Mitchener e8859fca3e Enable use of atexit() on macOS and related platforms.
The atexit() man page indicates that this is expected to behave
in the expected way on unloading of shared libraries.
2018-02-03 19:20:40 -08:00
Behdad Esfahbod ca42d96129 [aat] Implement RearrangementSubtable 2018-01-11 10:43:30 +01:00
Ebrahim Byagowi 5dbbd0fdb9
Move the #define of _GNU_SOURCE to the top of hb-private.hh (#697)
This fixes the build on Cygwin.
2018-01-11 12:33:22 +03:30
Behdad Esfahbod 7cdd6ab068 Round, instead of floor, when applying variations
Hoping this would fix remaining text-rendering-tests failures,
but so far no luck.
2018-01-10 04:44:33 +01:00
Behdad Esfahbod be59f3cbf4 Silence unused-variables warning on MSVC
Fixes https://github.com/harfbuzz/harfbuzz/issues/635
2017-12-05 09:01:28 -08:00
ebraminio 7c6937e7c7
Move all references of old url to the new address (#622) 2017-11-20 14:49:22 -05:00
Behdad Esfahbod 40ec3bbb55 Consolidate debug stuff into hb-debug.hh
Part of fixing https://github.com/behdad/harfbuzz/pull/605
2017-11-03 17:18:17 -04:00
Behdad Esfahbod 384862d7ee Remove NO_COPY() 2017-11-03 17:18:17 -04:00
Behdad Esfahbod 8eaff980fc Remove HB_TAG_CHAR4 2017-10-31 16:54:31 -06:00
Behdad Esfahbod c290ba5b7d Define _GNU_SOURCE
Might help with https://github.com/behdad/harfbuzz/pull/592
Ie. bringing in qsort_r() prototype always.
2017-10-31 13:18:21 -06:00
Behdad Esfahbod e35a763c07 [post] Implement glyph_from_name()
This concludes https://github.com/behdad/harfbuzz/pull/568
2017-10-30 13:15:05 -06:00
Behdad Esfahbod e1a37f3db4 Add hb_string_t 2017-10-30 11:42:28 -06:00
Behdad Esfahbod 0712e915b4 Remove hb_compare_func_t 2017-10-29 17:01:47 -06:00
Behdad Esfahbod 51f4d4d5cd Reduce prealloced number of user-data items from 2 to 1
Even 1 is too many but putting 0 breaks compile.  Saves 3k in .so
2017-10-27 15:09:22 -06:00
Behdad Esfahbod 62e312ead8 Use NULL instead of polyfill, if nullptr is not available
Part of fixing https://github.com/behdad/harfbuzz/issues/585
2017-10-27 09:29:20 -06:00
Behdad Esfahbod 2a74968044 Add hb-string-array.hh
Used to build static string arrays that use no relocation.
2017-10-26 20:32:16 -06:00
Behdad Esfahbod 6f08b12bc3 Minor 2017-10-26 18:23:03 -06:00
Behdad Esfahbod 2ee710e02f Minor 2017-10-23 08:37:48 -04:00
Behdad Esfahbod ced86da7dd Another try at fixing mingw32 build bot fail 2017-10-22 17:06:10 -04:00
Behdad Esfahbod d8adaa97fb Another try at fixing build bots
hb-ot-shape.cc:287:18: error: comparison of constant 32 with expression of type 'hb_unicode_general_category_t' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
2017-10-20 13:57:43 -04:00
Behdad Esfahbod 6058f98825 Remove FLAG_SAFE()
No flag is safe, over time... See previous commit.
2017-10-19 11:39:52 -07:00
Behdad Esfahbod 221ce6c18f Fix bots 2017-10-15 17:58:58 -04:00
Behdad Esfahbod 56ef4e0c52 Simplify hb_prealloced_array_t initialization 2017-10-15 16:38:29 -04:00
Behdad Esfahbod 7737e87ac4 Properly detect vector_size attribute and use fallback otherwise 2017-10-15 16:21:03 -04:00
Behdad Esfahbod deed4a48d1 Faster hb_set_t
Fixes https://github.com/behdad/harfbuzz/pull/23
2017-10-15 16:45:33 -03:00
Behdad Esfahbod 5e74044b6b Add bfind() to prealloaced_array_t 2017-10-15 16:28:34 -03:00
Behdad Esfahbod db5f7ef189 Inline another bsearch() 2017-10-15 16:28:34 -03:00
Behdad Esfahbod 6fb4ac73f9 Add popcount for 64bit ints 2017-10-15 16:00:09 +02:00
Behdad Esfahbod 3c13e153fe Try fixing AppVeyor bots 2017-10-15 14:02:58 +02:00
Behdad Esfahbod dbdbfe3d7b Use nullptr instead of NULL 2017-10-15 12:11:08 +02:00
Behdad Esfahbod c3448e8d21 Use static_assert instead of custom ASSERT_STATIC 2017-10-15 12:02:00 +02:00
Behdad Esfahbod 76dcbf8b23 Add polyfill for static_assert and nullptr
Also fix hb_assert_constant_t.
2017-10-15 11:24:35 +02:00
Ebrahim Byagowi 76c4873e8c Support branch prediction helpers on clang compiles (#491) 2017-06-02 13:23:10 -04:00
Sebastian Rasmussen 92e2c4baaf Avoid using strdup inside library. (#488)
If an application provides a malloc replacement through
hb_malloc_impl() it is important that it is used to allocate
everything, but the use of strdup() circumvents this and
causes system malloc() to be called instead. This pairs
badly with the custom hb_free_impl() being called later.
2017-05-29 10:53:30 -07:00
Behdad Esfahbod df98ce5fc8 Improve debug output with really deep nesting 2016-12-21 19:27:30 -06:00
Steve Lhomme 0b8f3ab022 clang in MSVC mode doesn't like when we redefine __attribute__ (#283) 2016-07-11 12:57:26 -07:00
Konstantin Ritt 5069062d0a Unbreak build on Windows CE
0475ef2f97 broke the build by using
vsnprintf(), which is not defined on Windows CE
2016-04-26 12:02:26 +04:00
Behdad Esfahbod 91dd115652 Add HB_NDEBUG
API changes:
- If NDEBUG is defined, define HB_NDEBUG
- Disable costlier sanity checks if HB_NDEBUG is defined.

In 1.2.3 introduced some code to disable costly sanity checks if
NDEBUG is defined.  NDEBUG, however, disables all assert()s as
well.  With HB_NDEBUG, one can disable costlier checks but keep
assert()s.

I'll probably add a way to define HB_NDEBUG automatically in
release tarballs.  But for now, production systems that do NOT
define NDEBUG, are encouraged to define HB_NDEBUG for our build.
2016-02-25 13:56:47 +09:00
Steven R. Loomis a13b023dbf AIX fixes
- use '-w' instead of '\<...\>' for check-header-guards
  grep manpage says these are the same

- put '-q' first in the grep options

- move VAR into hb-private.hh

- hb-font-private.hh - use [VAR] instead of [] for variable array
2015-12-12 17:44:44 -08:00
Behdad Esfahbod 766963adba Merge pull request #114 from ThePhD/vc++-fixes
Fix all VC++ warnings and errors
2015-11-24 15:38:43 -06:00
Behdad Esfahbod 1dc32ea4d2 Whitespace 2015-11-20 13:24:19 -08:00
Behdad Esfahbod f94c0ecbb1 Define HB_MARK_AS_FLAG_T as a macro instead of using templates
The generic template operator overloading was causing more problems than it
solved.  Eg:

https://github.com/behdad/harfbuzz/pull/163
https://github.com/behdad/harfbuzz/issues/175

So, just use macros.

Fixes https://github.com/behdad/harfbuzz/issues/175
Fixes https://github.com/behdad/harfbuzz/pull/178
2015-11-20 13:21:29 -08:00
Behdad Esfahbod e0082ae60d Move things around 2015-11-17 18:42:13 -08:00
Chun-wei Fan 167c327177 Fix build on MSVC >= 2012
Use the DEFINE_ENUM_FLAG_OPERATORS macro in winnt.h on Visual Studio,
which defines the bitwise operators for the enumerations that we want to
mark as hb_mark_as_flags_t, which will take care of the situation on newer
Visual Studio (>= 2012), where the build breaks with C2057 errors as the
underlying types of the enumerations is not clear to the compiler when we
do a bitwise op within the declaration of the enumerations themselves.

Also disable the C4200 (nonstandard extension used : zero-sized array in
struct/union) and C4800 ('type' : forcing value to bool 'true' or 'false'
(performance warning)) warnings as the C4200 is the intended scenario and
C4800 is harmless but is so far an unavoidable side effect of using
DEFINE_ENUM_FLAG_OPERATORS.
2015-11-17 12:19:22 +08:00
Behdad Esfahbod 6986208ba3 Optimize runs without Default_Ignorable's
Now that we have a buffer-wide scratch flags facility, use it to
optimize away a few passes.
2015-11-04 18:46:41 -08:00
Behdad Esfahbod aa7044de0c Generalize flags types 2015-11-04 16:25:57 -08:00
Behdad Esfahbod 672ca3b4e6 Use templates for making sure expression is constant 2015-10-26 14:05:05 -07:00