Commit Graph

222 Commits

Author SHA1 Message Date
Behdad Esfahbod 864a2dddae Clean up bit functions
Compile all code-paths possible, to better catch errors.
Also enable MSVC ones on mingw which seems to support them.
2018-02-16 16:09:38 -08:00
Behdad Esfahbod 978ace6fbb Improve _hb_popcount()
Support 128bit type.
2018-02-16 16:08:45 -08:00
Arkady Shapkin d37310ac5d Remove checking macros __OPTIMIZE__ for MSVC
Visual C++ compiler doesn't define macros __OPTIMIZE__  when optimizations enabled
2018-02-16 12:40:11 -08:00
Ebrahim Byagowi 139c9928f6
Fix hb-private.hh compile issue 2018-02-16 13:27:26 +03:30
Arkady Shapkin 6c10328eb8 Use _BitScanForward and _BitScanReverse on MSVC 2018-02-15 14:31:25 -08:00
Behdad Esfahbod 90d1c740c3 Add MSVC to no-visibility list 2018-02-11 19:08:59 -08:00
Behdad Esfahbod 0db6c6f214 Add Sun compiler to no-visibility as well
Fixes https://github.com/harfbuzz/harfbuzz/pull/776
2018-02-11 18:29:01 -08:00
Behdad Esfahbod cd32177a32 Try at fixing multiple-definition of NullPool
If we don't have visibility, make NullPool static.
2018-02-11 19:36:00 -06:00
Behdad Esfahbod af274507c4 Minor 2018-02-10 13:25:49 -06:00
Behdad Esfahbod 570d523761 [subset] Merge remote-tracking branch 'googlefonts/master' 2018-02-10 13:24:22 -06:00
Rod Sheeter 4816064c0e add missing return 2018-02-09 17:14:37 -08:00
Behdad Esfahbod 8cef3a6199 Try fixing build with Sun Studio
Trying to fix:
https://circleci.com/gh/harfbuzz/harfbuzz/6635

Also part of:
https://github.com/harfbuzz/harfbuzz/issues/630
2018-02-09 16:04:23 -06:00
Rod Sheeter 59c658c8d5 capture codepoints sorted so we can use them for cmap later. one day we will have a map 2018-02-08 19:22:47 -08:00
Behdad Esfahbod 931f8b7eb5 Fix another thinko 2018-02-07 21:42:03 -06:00
Behdad Esfahbod c479a59988 [subset] Assemble font 2018-02-07 21:26:04 -06:00
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