Commit Graph

4308 Commits

Author SHA1 Message Date
Behdad Esfahbod 49e72634af Limit use of AIX intrinsics to IBM's compiler 2015-12-10 17:44:19 +01:00
Behdad Esfahbod e1d4d0f1db Merge branch 'font-extents'
Fixes https://github.com/behdad/harfbuzz/pull/165
2015-12-10 16:56:07 +01:00
Behdad Esfahbod 808d3fc0ea [util] Port hb-view to use font metrics from HarfBuzz instead of cairo 2015-12-10 16:55:16 +01:00
Behdad Esfahbod 31fa389294 [ft] Use ftface->size->metrics for font extent info 2015-12-10 16:38:29 +01:00
Behdad Esfahbod 3ad16048fd [ot-font] Respect OS/2 fsSelection USE_TYPO_METRICS bit 2015-12-10 16:37:49 +01:00
Behdad Esfahbod 70b33edae7 Add atomic ops for AIX
Patch from Volker Simonis.
2015-12-10 15:54:42 +01:00
Behdad Esfahbod 98460779ba Remove final pause from Arabic shaper
Back in the old days, we used to apply 'calt' and 'cswh' in Arabic shaper,
with a pause in between.  Then we disabled the 'cswh' because Microsoft
disabled it, but forgot to remove the unnecessary pause.  Do that now.

This has the benefit that it fixes shaping with monbaiti from Windows 10.
In that version of that font, the lookups from 'calt' are duplicated in
'rclt', and Mongolian was changed to go through Universal Shaping Engine.
We still use the Arabic shaper for Mongolian.  With a pause after 'calt',
we were applying the duplicate lookups from 'calt' and 'rclt' twice.  It
happened to be the case that these lookups were NOT idempotent.  So we
were getting wrong shaping.  See thread "Windows 10 monbaiti.ttf upgrade
(5.01 -> 5.51) caused loss of diacritical marks when shaped with harfbuz"
on the mailing list.  This fixes that.
2015-12-07 21:38:47 +01:00
Behdad Esfahbod dee0fbf9e2 Merge pull request #192 from behdad/jfkthame-stch
[issue 191] Make apply_stch() give a more precise fit
2015-12-07 10:44:08 +01:00
Behdad Esfahbod 255df68012 Fix undefined behavior in cmp function
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=93274
2015-12-07 10:34:47 +01:00
Behdad Esfahbod fcf9e61bad Fix sorting order of ot_languages array
Looks like the original sort was wrongly done.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93275
2015-12-07 10:30:43 +01:00
Behdad Esfahbod 70952ddb5a Add test to make sure ot-languages array is sorted
Currently fails.  Part of
https://bugs.freedesktop.org/show_bug.cgi?id=93275
2015-12-07 10:28:46 +01:00
Behdad Esfahbod 8c37556f73 Merge pull request #134 from ebraminio/dwrite
Add working but less prefect DirectWrite backend
2015-12-07 09:34:58 +01:00
jfkthame a7ffe35358 Make apply_stch() give a more precise fit
This aims to make Syriac Abbr Mark sizing more accurate when repeating segments are used, by adding an extra repeat and tightening up the spacing slightly rather than leaving a shortfall corresponding to a partial repeat-width.
2015-12-05 17:47:37 +00:00
Behdad Esfahbod 8e5f902656 src/test.cc: wrong field printed
Fixes https://github.com/behdad/harfbuzz/issues/188
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=93182
2015-11-30 16:53:21 -08:00
Simon Cozens 6f2e6de1fa Get font ascender and descender metrics from OS/2 table. 2015-11-27 16:03:54 -05:00
Simon Cozens 097c998a0c Parse the OS/2 table. 2015-11-26 19:58:13 -05:00
Behdad Esfahbod d44d52bd0d 1.1.2 2015-11-26 19:35:43 -05:00
Behdad Esfahbod 35d18585fc Fix a few docs blocks 2015-11-26 19:30:37 -05:00
Behdad Esfahbod 0e38c918b6 [introspection] Make scanner happy with HB_EXTERN 2015-11-26 19:26:26 -05:00
Behdad Esfahbod ea512f7108 Use C-style casts instead of compare to 0, to convert hb_bool_t to bool 2015-11-26 19:22:22 -05:00
Behdad Esfahbod 67a36a725e Fix vertical GPOS
This was brorken earlier, though, it's really hard to notice it.
Unlike the glyph_h_origin(), an unset glyph_v_origin() does NOT
mean that the vertical origin is at 0,0.

Related to https://github.com/behdad/harfbuzz/issues/187
2015-11-26 18:49:54 -05:00
Behdad Esfahbod 1c6a057dd1 Add tests for previous commit 2015-11-26 18:48:30 -05:00
Behdad Esfahbod c41c145c73 Make nil glyph_h_origin() function return true
Fixes https://github.com/behdad/harfbuzz/issues/187

Funcs implementations that have a non-zero horizontal origin must
implement the glyph_h_origin() callback, nothing new here.

Other implementations (all I know of!) can simply not set
glyph_h_origin() now.  I did that for hb-ot and hb-ft in
44f8275080, though that broke the
fallback shaper because the default was returning false...
2015-11-26 18:43:15 -05: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 b344af80ca Merge pull request #177 from fanc999/exporting
Enable use of compiler directives to export symbols
2015-11-24 15:30:27 -06:00
Behdad Esfahbod 662acd26d1 Merge pull request #181 from mhosken/master
Fix y_scale problems in hb-gr
2015-11-24 15:29:44 -06:00
Behdad Esfahbod b24e93e3a4 1.1.1 2015-11-24 13:18:20 -06:00
Khaled Hosny 233944ac91 Merge pull request #185 from khaledhosny/travis-osx
[travis] Enable Mac OS X support
2015-11-24 18:37:35 +04:00
Khaled Hosny d538201918 [travis] Enable Mac OS X support
Fixes https://github.com/behdad/harfbuzz/issues/182
2015-11-24 18:04:07 +04:00
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
Martin Hosken 1979f6fedc Fix y_scale problems in hb-gr 2015-11-23 10:04:13 +07:00
Chun-wei Fan 835bbdc7c9 Public headers: Decorate public symbols with HB_EXTERN
This prepares the headers for exporting symbols using visibility
attributes or __declspec(dllexport), so that we do not need to maintain
symbols listing files, as this is what was and is done in GLib and GTK+.
2015-11-23 11:03:11 +08:00
ThePhD f798b8e2d6 c-style cast 2015-11-21 16:57:26 -05: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