Commit Graph

4070 Commits

Author SHA1 Message Date
Behdad Esfahbod 5a24b1d25c [travis] Remove coverity scan
I never could get it to work, and it's a proprietary platform.
2015-11-23 16:47:15 -06:00
Behdad Esfahbod a699181365 Merge pull request #176 from behdad/missing-braces
Add braces for subobject initializer in _hb_font_funcs_nil
2015-11-20 13:28:42 -08: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
jfkthame f19c6db18e Add braces for subobject initializer in _hb_font_funcs_nil
To avoid triggering -Wmissing-braces; see https://bugzilla.mozilla.org/show_bug.cgi?id=1226175#c8
2015-11-20 08:43:49 +00:00
Behdad Esfahbod 9cc1ed4fa6 Do not allow recursiving to same position and same lookup
This is just to make it harder to be extremely slow.  There definitely
are ways still, just harder.  Oh well... how do we tame this problem
without solving halting problem?!

Fixes https://github.com/behdad/harfbuzz/issues/174
2015-11-19 12:39:09 -08:00
Behdad Esfahbod 7d75eee799 [fuzzing] Run fuzzing tests using hb-fuzzer as well 2015-11-19 12:15:05 -08:00
Behdad Esfahbod 13188cba7f Revert "Fix hang in OOM situations"
This reverts commit f0599db761.

Commit abadc1717d provides a better
fix for this.
2015-11-19 11:59:47 -08:00
Behdad Esfahbod 18e1c6b6ef Revert "Make sure we make progress in OOM situations"
This reverts commit 68b507a3c3.

Commit abadc1717d provides a better
fix for this.
2015-11-19 11:50:58 -08:00
Behdad Esfahbod e1118aeac3 1.1.0 2015-11-18 23:52:51 -08:00
Behdad Esfahbod 63fe05c8b1 Fix make distcheck 2015-11-18 23:52:51 -08:00
Behdad Esfahbod 9b087dec77 [travis] Only coverity-scan the coverity_scan branch
This essentially disables coverity-scan right now, until we find
a pattern to continuously submit branches there.

For background reasoning, see:
Fixes https://github.com/behdad/harfbuzz/issues/171
2015-11-18 23:23:35 -08:00
Behdad Esfahbod 85062e3b46 Add tests for previous two commits
To fully test what these are supposed to test, they should be run
against libharfbuzz-fuzzing.la instead of libharfbuzz.la, but for
now just record the files.
2015-11-18 23:09:13 -08:00
Behdad Esfahbod 37b40cd8a1 Fix another move_to assertion failure
If buf->idx is at end, don't set end past it...

Fixes https://github.com/behdad/harfbuzz/issues/173
2015-11-18 23:04:45 -08:00
Behdad Esfahbod abadc1717d Try to better handle OOM situations
Fixes assert fail in https://github.com/behdad/harfbuzz/issues/161
with libharfbuzz-fuzzing.
2015-11-18 17:52:08 -08:00
Behdad Esfahbod ec625f7dfb Try to fix gnome-continuous build fail 2015-11-18 16:37:59 -08:00
Behdad Esfahbod ff16ef3379 Enable building a bounded version of the library for fuzzing
test/fuzzing/hb-fuzzer links against libharfbuzz-fuzzing.so now.
2015-11-18 16:27:32 -08:00
Behdad Esfahbod e0082ae60d Move things around 2015-11-17 18:42:13 -08:00
Behdad Esfahbod dde8cc87bd Merge pull request #163 from fanc999/msvc.src
Update the sources so they will compile under Visual Studio
2015-11-17 18:40:10 -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
Chun-wei Fan 4d27bb8746 hb-ot-shape-complex-arabic.cc: Fix build on Visual Studio
Visual Studio does not like declaring a enum variable within a for
statement, so fix the build by declaring the enum before doing the for
loop.
2015-11-16 23:04:36 +08:00
Chun-wei Fan a49e7b7e40 MSVC builds: Add fallback implementation for pre-2013 MSVC
Pre-2013 MSVC does not have scalbn() and scalbnf(), which are used in the
utility programs.  Add  fallback implementations for these, which can be
used when necessary.
2015-11-16 23:04:36 +08:00
Chun-wei Fan 998e8dda93 util: Fix build on Visual Studio
Use the fallback implementation for lround() only on pre-2013 Visual
Studio, and ensure we are clear about the types of the parameters for
lround() and scalbnf(), since Visual Studio can be quite picky on
ambiguous parameter types.  Also, use g_ascii_strcasecmp() rather than
strcasecmp() as we are already using GLib for this code and we are
assured that g_ascii_strcasemp() is available.

For scalbnf() on pre-2013 Visaul Studio, a fallback implementation is
needed, but use another forced-included header for those compilers, which
will be added later.

Also use (char)27 on Visual Studio builds as '\e' is not a recognized
escape sequence, which will do the same thing.
2015-11-16 23:04:35 +08:00
Behdad Esfahbod e97835ad43 [util] Fix crash when --output-file is specified but not --output-format 2015-11-10 11:37:01 -08:00
Behdad Esfahbod d5f0d7c9fb Merge pull request #167 from KonstantinRitt/unicode_cp_opt
Micro optimizations to UTF-16 and UTF-32 codecs
2015-11-07 07:50:58 -08:00
Behdad Esfahbod 04ff23e73d [arabic] Improve stretch length calculation
Err on the side of being too short, than too wide.  Reduces chance
of overlaps with neighboring glyphs.
2015-11-06 16:29:44 -08:00
Behdad Esfahbod 59821ab8b4 [arabic] Don't stretch over cased letters
Addresses
6e6f82b6f3 (commitcomment-14248516)
2015-11-06 16:27:44 -08:00
Behdad Esfahbod 5337db29af Revert "Don't process lookups if buffer is in error"
This reverts commit f92bd86cc8.

We don't want to be like cairo, where as soon as there's an error,
nothing works anymore.  So, lets process lookups as long as there's
no new memory needed.  That's also a model that hides fewer bugs.
2015-11-06 16:18:09 -08:00
Konstantin Ritt 529a933128 Micro optimization to hb_utf16_t and hb_utf32_t ::prev()
Implement reverse lookup instead of re-using next()
2015-11-07 02:00:04 +04:00
Konstantin Ritt 44ae9be7a2 Nano optimization to hb_utf16_t and hb_utf32_t ::next() 2015-11-07 01:58:38 +04:00
Behdad Esfahbod a6d7668a95 [fuzzing] Cap max buffer len at 128 2015-11-06 09:46:54 -08:00
Behdad Esfahbod f1c4adbcd3 Fix typo 2015-11-06 09:46:05 -08:00
Behdad Esfahbod 68b507a3c3 Make sure we make progress in OOM situations 2015-11-06 00:09:26 -08:00
Behdad Esfahbod 5a7eb5d4d8 [fuzzing] Add test case for OOM
From https://github.com/behdad/harfbuzz/issues/161
2015-11-06 00:01:24 -08:00
Behdad Esfahbod f0599db761 Fix hang in OOM situations
Fixes https://github.com/behdad/harfbuzz/issues/161
2015-11-05 23:55:51 -08:00
Behdad Esfahbod f92bd86cc8 Don't process lookups if buffer is in error 2015-11-05 23:52:29 -08:00
Behdad Esfahbod 4301703bdd Limit buffer max size growth
https://github.com/behdad/harfbuzz/issues/161
2015-11-05 23:44:59 -08:00
Behdad Esfahbod 19300183a6 [fuzzing] Add build system 2015-11-05 23:08:50 -08:00
Behdad Esfahbod 9c9ad214af [fuzzer] Add README
https://github.com/behdad/harfbuzz/issues/139#issuecomment-154202645
2015-11-05 22:50:52 -08:00
Behdad Esfahbod 6e6f82b6f3 Implement SYRIAC ABBREVIATION MARK with 'stch' feature
The feature is enabled for any character in the Arabic shaper.
We should experiment with using it for Arabic subtending marks.
Though, that has a directionality problem as well, since those
are used with digits...

Fixes https://github.com/behdad/harfbuzz/issues/141
2015-11-05 17:46:34 -08:00
Behdad Esfahbod c743ec5886 [ft] Fix extents with negative scales
Fixes https://github.com/behdad/harfbuzz/issues/162
2015-11-05 17:38:27 -08:00
Behdad Esfahbod 73fec3992a Reserve a few scratch-flags bits for complex shapers 2015-11-05 15:22:18 -08:00
Behdad Esfahbod 136863371c Add new shaper method postprocess_glyphs()
Unused currently.  To be used for Syriac stretch implementation.

https://github.com/behdad/harfbuzz/issues/141
2015-11-05 13:24:15 -08:00
Behdad Esfahbod 6c0ebd02c9 [util] If font has color, generate PNG with color 2015-11-05 11:37:48 -08:00
Behdad Esfahbod e95eb23a4e Don't try zeroing marks by GDEF if there are no non-ASCII
This one is a hack, but should be ok.
2015-11-04 22:59:28 -08:00
Behdad Esfahbod 7fa54ed75a Don't try zeroing mark attachments by Unicode if there's no non-ASCII 2015-11-04 22:59:24 -08:00
Behdad Esfahbod 550bd14d2b Actually commit changes for previous commit 2015-11-04 22:58:58 -08:00
Behdad Esfahbod ff31b3c1b8 Skip GPOS cursive / attachment adjustmnent if none happened
I'm starting to really like how free these new scratch_flags are.
2015-11-04 22:47:30 -08:00
Behdad Esfahbod 0f407325f6 Minor 2015-11-04 22:28:44 -08:00
Behdad Esfahbod 497a6c2071 Skip forming clusters if text is all ASCII 2015-11-04 22:24:19 -08:00