Commit Graph

6622 Commits

Author SHA1 Message Date
Behdad Esfahbod 9a1df82e3f [uniscribe] Whitelist function type cast 2019-01-28 14:15:18 -05:00
Behdad Esfahbod 6e1c3eaf70 Fix sign comparison error 2019-01-28 14:12:41 -05:00
Behdad Esfahbod 9db7a7da63 Fix warning
c:\projects\harfbuzz\src\hb-ot-color-cbdt-table.hh(59): warning C4146: unary minus operator applied to unsigned type, result still unsigned [C:\projects\harfbuzz\build\harfbuzz.vcxproj]
2019-01-28 14:09:59 -05:00
Behdad Esfahbod 51b584880e [pragma] Silence MSVC unknown-pragma warning 2019-01-28 14:09:45 -05: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 f398097529 More static constexpr 2019-01-25 16:08:25 +01:00
Behdad Esfahbod e970de48bc [AAT] Minor sign 2019-01-24 18:16:17 +01:00
Behdad Esfahbod a371a28cda [AAT] Use a ring buffer for ligature stack
I think Apple does very similarly, but probably with a stack size of 16.
We do it with a stack size that is currently set to 64.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1531
2019-01-24 18:12:25 +01:00
Behdad Esfahbod 7886b1578f Whitespace 2019-01-24 18:06:17 +01:00
Behdad Esfahbod b976940243 [AAT] Handle transition errors during machine operation
Before we used to give up.  Now, just ignore error and continue processing.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1531
2019-01-24 18:01:07 +01:00
Behdad Esfahbod e234bb6a42 [AAT] Ignore machine errors and continue 2019-01-24 17:23:11 +01:00
Behdad Esfahbod 1ec90514f6 [AAT] Minor 2019-01-24 17:21:41 +01:00
Behdad Esfahbod 299eca0c3b [AAT] Handle out-of-bounds classes 2019-01-24 17:17:00 +01:00
Behdad Esfahbod c4623db4a3 [AAT] Minor 2019-01-24 17:10:12 +01:00
Behdad Esfahbod c4e36f97b6 [AAT] Minor 2019-01-24 17:06:16 +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 fd0889f903 Comment 2019-01-24 16:12:52 +01:00
Behdad Esfahbod 9f31417733 Form cluster for Emoji sub-region tag sequences
Fixes https://github.com/harfbuzz/harfbuzz/issues/1556
2019-01-24 16:08:33 +01:00
Behdad Esfahbod 3ecda71041 Adjust mark offsets when zeroing from fallback mark positioning code
Adjust tests.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1532
2019-01-24 12:28:24 +01:00
Behdad Esfahbod 36fb2b4da9 [AAT] In InsertionChain, set mark to previous-position if inserting
Fixes MORX-31
2019-01-23 20:53:57 +01:00
Behdad Esfahbod baf4d6a68a [AAT] Remove mark_set from InsertionChain 2019-01-23 20:36:07 +01:00
Behdad Esfahbod 0b2fa342de More of previous 2019-01-22 16:36:00 +01:00
Behdad Esfahbod a5e5dd8b42 Fix sign-compare error resulted from promoting unsigned integers to signed larger ints
Clang and gcc know not to warn in these cases, but not nonmainstream compilers
2019-01-22 16:30:07 +01:00
Behdad Esfahbod 32379bbf10 Cast HB_UNTAG results to uint8_t 2019-01-22 12:55:29 +01:00
Behdad Esfahbod 83d4aa5ca9 More -Wcast-error fix 2019-01-22 12:52:23 +01:00
Behdad Esfahbod 447323b85a Better fix for -Wcast-align errors 2019-01-22 12:50:12 +01:00
Behdad Esfahbod 81ec543d80 More -Wcast-error fixes 2019-01-22 12:43:12 +01:00
Behdad Esfahbod 9077272549 pragma GCC diagnostic error "-Wsign-compare" 2019-01-22 12:40:18 +01:00
Behdad Esfahbod 8d05bf7dc0 Fix cast-align error
If compiler doesn't inline StructAtOffset, this was an error since we
only disable cast-align at call-site.  So, move the cast out.

../src/hb-machinery.hh: In instantiation of 'const Type& StructAtOffset(const void*, unsigned int) [with Type = unsigned int]':
../src/hb-font.cc:146:85:   required from here
../src/hb-machinery.hh:63:12: error: cast from 'const char*' to 'const unsigned int*' increases required alignment of target type [-Werror=cast-align]
 { return * reinterpret_cast<const Type*> ((const char *) P + offset); }
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/hb-machinery.hh: In instantiation of 'Type& StructAtOffset(void*, unsigned int) [with Type = unsigned int]':
../src/hb-font.cc:147:79:   required from here
../src/hb-machinery.hh:66:12: error: cast from 'char*' to 'unsigned int*' increases required alignment of target type [-Werror=cast-align]
 { return * reinterpret_cast<Type*> ((char *) P + offset); }
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-01-22 12:34:05 +01:00
Behdad Esfahbod 70a52d6bd8 Convert all other enum class consts to static constexpr
Fixes https://github.com/harfbuzz/harfbuzz/issues/1553
2019-01-22 12:17:26 +01:00
Behdad Esfahbod 5d4b0377b9 Convert unsigned enum class consts to static constexpr
Part of https://github.com/harfbuzz/harfbuzz/issues/1553
2019-01-22 12:17:26 +01:00
Behdad Esfahbod ef00654962 Convert tag enum class consts to static constexpr
Part of https://github.com/harfbuzz/harfbuzz/issues/1553
2019-01-22 12:17:26 +01:00
Behdad Esfahbod 39e1b6d03f Convert boolean enum class consts to static constexpr
Part of https://github.com/harfbuzz/harfbuzz/issues/1553
2019-01-22 12:17:26 +01:00
Behdad Esfahbod 271cb7c1c0 Make some enum constants unsigned 2019-01-22 12:17:26 +01:00
Behdad Esfahbod 3d9a6e6266 Whitespace 2019-01-22 12:17:26 +01:00
Behdad Esfahbod c81f02fd06 pragma GCC diagnostic error "-Wvla" 2019-01-22 12:17:26 +01:00
Behdad Esfahbod 380c3cffb9 Use enum for class constant 2019-01-22 10:51:20 +01:00
Behdad Esfahbod 6d042a18e7 [CFF] Use enum for tableTag 2019-01-22 10:51:20 +01:00
Behdad Esfahbod c1cbbb9459 Use static constexpr for large class constants 2019-01-22 10:51:20 +01:00
Behdad Esfahbod 043b610fa6 Fix sign compare warnings
../../third_party/harfbuzz-ng/src/src/hb-map.hh(56,45):  warning: comparison of integers of different signs: 'const hb_codepoint_t' (aka 'const unsigned int') and 'hb_map_t::(anonymous enum at ../../third_party/harfbuzz-ng/src/src/hb-map.hh:169:3)' [-Wsign-compare]
    bool is_unused () const    { return key == INVALID; }
2019-01-19 09:21:33 -05:00
Behdad Esfahbod ce317d0320 Fix warning
warning: '_WIN64' is not defined, evaluates to 0 [-Wundef]
2019-01-19 09:21:33 -05:00
Ebrahim Byagowi 0c2bd1b160
[dwrite] Fix delete-non-virtual-dtor warning (#1550) 2019-01-19 16:30:07 +03:30
Behdad Esfahbod 89bcfb204c Remove TRACE_COLLECT_GLYPHS 2019-01-18 14:59:18 -05:00
Behdad Esfahbod f13b6786f0 [pragma] Only add if GCC or clang 2019-01-18 14:53:54 -05:00
Behdad Esfahbod c2ea7a9da4 [directwrite] More fix 2019-01-18 14:20:45 -05:00
Ebrahim Byagowi 9714d3ec5c
[dwrite] Try to fix delete-non-virtual-dtor warnings
Fixes #1548 hopefully
2019-01-18 21:55:21 +03:30
Behdad Esfahbod 0772c06f96 Remove tracing from closure 2019-01-18 12:53:47 -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
Michiharu Ariza 28917e58f9 init interp_env_t::hintmask_size
fixes issue #1547
2019-01-18 09:43:51 -08:00
Behdad Esfahbod 9b4e51b2e4 [pragma] Enable error -Wdelete-non-virtual-dtor
Currently fails directwrite backend.
2019-01-18 12:23:02 -05:00