Behdad Esfahbod [Thu, 17 Dec 2015 11:59:15 +0000 (11:59 +0000)]
[use] Fix halant detection
Before, we were just checking the use_category(). This detects as
halant a ligature that had the halant as first glyph (as seen in
NotoSansBalinese.) Change that to use the is_ligated() glyph prop
bit. The font is forming this ligature in ccmp, which is before
the rphf / pref tests. So we need to make sure the "ligated" bit
survives those tests. Since those only check the "substituted" bit,
we now only clear that bit for them and "ligated" survives.
Fixes https://github.com/behdad/harfbuzz/issues/180
Behdad Esfahbod [Thu, 17 Dec 2015 11:04:33 +0000 (11:04 +0000)]
[arabic] Use glyph advance width in apply_stch() instead of extents
That seems to be what Windows is doing, and makes more sense.
Behdad Esfahbod [Wed, 16 Dec 2015 16:08:36 +0000 (17:08 +0100)]
Fix Since: tags for new API
https://github.com/behdad/harfbuzz/commit/
e1d4d0f1dbd8518b5672245c05d73f22a9ed03ea#commitcomment-
15006653
Behdad Esfahbod [Mon, 14 Dec 2015 13:19:03 +0000 (14:19 +0100)]
Merge pull request #196 from srl295/aix
AIX fixes
Steven R. Loomis [Fri, 11 Dec 2015 18:21:27 +0000 (10:21 -0800)]
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
Behdad Esfahbod [Thu, 10 Dec 2015 16:44:19 +0000 (17:44 +0100)]
Limit use of AIX intrinsics to IBM's compiler
Behdad Esfahbod [Thu, 10 Dec 2015 15:56:07 +0000 (16:56 +0100)]
Merge branch 'font-extents'
Fixes https://github.com/behdad/harfbuzz/pull/165
Behdad Esfahbod [Thu, 10 Dec 2015 15:55:16 +0000 (16:55 +0100)]
[util] Port hb-view to use font metrics from HarfBuzz instead of cairo
Behdad Esfahbod [Thu, 10 Dec 2015 15:38:29 +0000 (16:38 +0100)]
[ft] Use ftface->size->metrics for font extent info
Behdad Esfahbod [Thu, 10 Dec 2015 15:37:49 +0000 (16:37 +0100)]
[ot-font] Respect OS/2 fsSelection USE_TYPO_METRICS bit
Behdad Esfahbod [Thu, 10 Dec 2015 14:54:42 +0000 (15:54 +0100)]
Add atomic ops for AIX
Patch from Volker Simonis.
Behdad Esfahbod [Mon, 7 Dec 2015 20:38:47 +0000 (21:38 +0100)]
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.
Behdad Esfahbod [Mon, 7 Dec 2015 09:44:08 +0000 (10:44 +0100)]
Merge pull request #192 from behdad/jfkthame-stch
[issue 191] Make apply_stch() give a more precise fit
Behdad Esfahbod [Mon, 7 Dec 2015 09:34:47 +0000 (10:34 +0100)]
Fix undefined behavior in cmp function
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=93274
Behdad Esfahbod [Mon, 7 Dec 2015 09:30:43 +0000 (10:30 +0100)]
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
Behdad Esfahbod [Mon, 7 Dec 2015 09:28:46 +0000 (10:28 +0100)]
Add test to make sure ot-languages array is sorted
Currently fails. Part of
https://bugs.freedesktop.org/show_bug.cgi?id=93275
Behdad Esfahbod [Mon, 7 Dec 2015 08:34:58 +0000 (09:34 +0100)]
Merge pull request #134 from ebraminio/dwrite
Add working but less prefect DirectWrite backend
jfkthame [Sat, 5 Dec 2015 17:47:37 +0000 (17:47 +0000)]
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.
Behdad Esfahbod [Tue, 1 Dec 2015 00:53:21 +0000 (16:53 -0800)]
src/test.cc: wrong field printed
Fixes https://github.com/behdad/harfbuzz/issues/188
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=93182
Simon Cozens [Mon, 26 Oct 2015 07:23:22 +0000 (16:23 +0900)]
Get font ascender and descender metrics from OS/2 table.
Simon Cozens [Mon, 26 Oct 2015 07:22:38 +0000 (16:22 +0900)]
Parse the OS/2 table.
Behdad Esfahbod [Fri, 27 Nov 2015 00:35:43 +0000 (19:35 -0500)]
1.1.2
Behdad Esfahbod [Fri, 27 Nov 2015 00:30:37 +0000 (19:30 -0500)]
Fix a few docs blocks
Behdad Esfahbod [Fri, 27 Nov 2015 00:26:26 +0000 (19:26 -0500)]
[introspection] Make scanner happy with HB_EXTERN
Behdad Esfahbod [Fri, 27 Nov 2015 00:22:22 +0000 (19:22 -0500)]
Use C-style casts instead of compare to 0, to convert hb_bool_t to bool
Behdad Esfahbod [Thu, 26 Nov 2015 23:48:42 +0000 (18:48 -0500)]
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
Behdad Esfahbod [Thu, 26 Nov 2015 23:48:30 +0000 (18:48 -0500)]
Add tests for previous commit
Behdad Esfahbod [Thu, 26 Nov 2015 23:43:15 +0000 (18:43 -0500)]
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
44f82750807475aa5b16099ccccd917d488df703, though that broke the
fallback shaper because the default was returning false...
Behdad Esfahbod [Tue, 24 Nov 2015 21:38:43 +0000 (15:38 -0600)]
Merge pull request #114 from ThePhD/vc++-fixes
Fix all VC++ warnings and errors
Behdad Esfahbod [Tue, 24 Nov 2015 21:30:27 +0000 (15:30 -0600)]
Merge pull request #177 from fanc999/exporting
Enable use of compiler directives to export symbols
Behdad Esfahbod [Tue, 24 Nov 2015 21:29:44 +0000 (15:29 -0600)]
Merge pull request #181 from mhosken/master
Fix y_scale problems in hb-gr
Behdad Esfahbod [Tue, 24 Nov 2015 19:18:20 +0000 (13:18 -0600)]
1.1.1
Khaled Hosny [Tue, 24 Nov 2015 14:37:35 +0000 (18:37 +0400)]
Merge pull request #185 from khaledhosny/travis-osx
[travis] Enable Mac OS X support
Khaled Hosny [Tue, 24 Nov 2015 08:46:35 +0000 (12:46 +0400)]
[travis] Enable Mac OS X support
Fixes https://github.com/behdad/harfbuzz/issues/182
Behdad Esfahbod [Mon, 23 Nov 2015 22:46:14 +0000 (16:46 -0600)]
[travis] Remove coverity scan
I never could get it to work, and it's a proprietary platform.
Martin Hosken [Mon, 23 Nov 2015 03:03:56 +0000 (10:03 +0700)]
Fix y_scale problems in hb-gr
Chun-wei Fan [Thu, 19 Nov 2015 10:34:12 +0000 (18:34 +0800)]
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+.
ThePhD [Sat, 21 Nov 2015 21:57:26 +0000 (16:57 -0500)]
c-style cast
Behdad Esfahbod [Fri, 20 Nov 2015 21:28:42 +0000 (13:28 -0800)]
Merge pull request #176 from behdad/missing-braces
Add braces for subobject initializer in _hb_font_funcs_nil
Behdad Esfahbod [Fri, 20 Nov 2015 21:24:19 +0000 (13:24 -0800)]
Whitespace
Behdad Esfahbod [Fri, 20 Nov 2015 21:21:29 +0000 (13:21 -0800)]
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
jfkthame [Fri, 20 Nov 2015 08:43:49 +0000 (08:43 +0000)]
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
Behdad Esfahbod [Thu, 19 Nov 2015 20:39:09 +0000 (12:39 -0800)]
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
Behdad Esfahbod [Thu, 19 Nov 2015 20:03:04 +0000 (12:03 -0800)]
[fuzzing] Run fuzzing tests using hb-fuzzer as well
Behdad Esfahbod [Thu, 19 Nov 2015 19:59:03 +0000 (11:59 -0800)]
Revert "Fix hang in OOM situations"
This reverts commit
f0599db761d7fc2d585d86e757a797f75ebc7499.
Commit
abadc1717d997b69f987fdf1be9e12156d2d13d6 provides a better
fix for this.
Behdad Esfahbod [Thu, 19 Nov 2015 19:50:58 +0000 (11:50 -0800)]
Revert "Make sure we make progress in OOM situations"
This reverts commit
68b507a3c3c62c28c38e13fee733702bb703b6ca.
Commit
abadc1717d997b69f987fdf1be9e12156d2d13d6 provides a better
fix for this.
Behdad Esfahbod [Thu, 19 Nov 2015 07:40:47 +0000 (23:40 -0800)]
1.1.0
Behdad Esfahbod [Thu, 19 Nov 2015 07:52:34 +0000 (23:52 -0800)]
Fix make distcheck
Behdad Esfahbod [Thu, 19 Nov 2015 07:23:35 +0000 (23:23 -0800)]
[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
Behdad Esfahbod [Thu, 19 Nov 2015 07:09:13 +0000 (23:09 -0800)]
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.
Behdad Esfahbod [Thu, 19 Nov 2015 07:04:45 +0000 (23:04 -0800)]
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
Behdad Esfahbod [Thu, 19 Nov 2015 01:52:08 +0000 (17:52 -0800)]
Try to better handle OOM situations
Fixes assert fail in https://github.com/behdad/harfbuzz/issues/161
with libharfbuzz-fuzzing.
Behdad Esfahbod [Thu, 19 Nov 2015 00:37:59 +0000 (16:37 -0800)]
Try to fix gnome-continuous build fail
Behdad Esfahbod [Thu, 19 Nov 2015 00:27:32 +0000 (16:27 -0800)]
Enable building a bounded version of the library for fuzzing
test/fuzzing/hb-fuzzer links against libharfbuzz-fuzzing.so now.
Behdad Esfahbod [Wed, 18 Nov 2015 02:42:13 +0000 (18:42 -0800)]
Move things around
Behdad Esfahbod [Wed, 18 Nov 2015 02:40:10 +0000 (18:40 -0800)]
Merge pull request #163 from fanc999/msvc.src
Update the sources so they will compile under Visual Studio
Chun-wei Fan [Mon, 9 Nov 2015 09:17:56 +0000 (17:17 +0800)]
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.
Chun-wei Fan [Fri, 6 Nov 2015 06:28:30 +0000 (14:28 +0800)]
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.
Chun-wei Fan [Tue, 3 Nov 2015 10:49:34 +0000 (18:49 +0800)]
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.
Chun-wei Fan [Mon, 2 Nov 2015 08:55:29 +0000 (16:55 +0800)]
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.
Behdad Esfahbod [Tue, 10 Nov 2015 19:37:01 +0000 (11:37 -0800)]
[util] Fix crash when --output-file is specified but not --output-format
Behdad Esfahbod [Sat, 7 Nov 2015 15:50:58 +0000 (07:50 -0800)]
Merge pull request #167 from KonstantinRitt/unicode_cp_opt
Micro optimizations to UTF-16 and UTF-32 codecs
Behdad Esfahbod [Sat, 7 Nov 2015 00:29:44 +0000 (16:29 -0800)]
[arabic] Improve stretch length calculation
Err on the side of being too short, than too wide. Reduces chance
of overlaps with neighboring glyphs.
Behdad Esfahbod [Sat, 7 Nov 2015 00:27:44 +0000 (16:27 -0800)]
[arabic] Don't stretch over cased letters
Addresses
https://github.com/behdad/harfbuzz/commit/
6e6f82b6f3dde0fc6c3c7d991d9ec6cfff57823d#commitcomment-
14248516
Behdad Esfahbod [Sat, 7 Nov 2015 00:18:09 +0000 (16:18 -0800)]
Revert "Don't process lookups if buffer is in error"
This reverts commit
f92bd86cc8c11d262d1830c631cb7c63fc9d4bc8.
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.
Konstantin Ritt [Fri, 6 Nov 2015 22:00:04 +0000 (02:00 +0400)]
Micro optimization to hb_utf16_t and hb_utf32_t ::prev()
Implement reverse lookup instead of re-using next()
Konstantin Ritt [Fri, 6 Nov 2015 21:58:38 +0000 (01:58 +0400)]
Nano optimization to hb_utf16_t and hb_utf32_t ::next()
Behdad Esfahbod [Fri, 6 Nov 2015 17:46:54 +0000 (09:46 -0800)]
[fuzzing] Cap max buffer len at 128
Behdad Esfahbod [Fri, 6 Nov 2015 17:46:05 +0000 (09:46 -0800)]
Fix typo
Behdad Esfahbod [Fri, 6 Nov 2015 08:09:26 +0000 (00:09 -0800)]
Make sure we make progress in OOM situations
Behdad Esfahbod [Fri, 6 Nov 2015 08:01:24 +0000 (00:01 -0800)]
[fuzzing] Add test case for OOM
From https://github.com/behdad/harfbuzz/issues/161
Behdad Esfahbod [Fri, 6 Nov 2015 07:52:41 +0000 (23:52 -0800)]
Fix hang in OOM situations
Fixes https://github.com/behdad/harfbuzz/issues/161
Behdad Esfahbod [Fri, 6 Nov 2015 07:52:29 +0000 (23:52 -0800)]
Don't process lookups if buffer is in error
Behdad Esfahbod [Fri, 6 Nov 2015 07:44:59 +0000 (23:44 -0800)]
Limit buffer max size growth
https://github.com/behdad/harfbuzz/issues/161
Behdad Esfahbod [Fri, 6 Nov 2015 07:08:50 +0000 (23:08 -0800)]
[fuzzing] Add build system
Behdad Esfahbod [Fri, 6 Nov 2015 06:50:52 +0000 (22:50 -0800)]
[fuzzer] Add README
https://github.com/behdad/harfbuzz/issues/139#issuecomment-
154202645
Behdad Esfahbod [Fri, 6 Nov 2015 01:29:03 +0000 (17:29 -0800)]
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
Behdad Esfahbod [Fri, 6 Nov 2015 01:33:57 +0000 (17:33 -0800)]
[ft] Fix extents with negative scales
Fixes https://github.com/behdad/harfbuzz/issues/162
Behdad Esfahbod [Thu, 5 Nov 2015 23:22:18 +0000 (15:22 -0800)]
Reserve a few scratch-flags bits for complex shapers
Behdad Esfahbod [Thu, 5 Nov 2015 21:24:15 +0000 (13:24 -0800)]
Add new shaper method postprocess_glyphs()
Unused currently. To be used for Syriac stretch implementation.
https://github.com/behdad/harfbuzz/issues/141
Behdad Esfahbod [Thu, 5 Nov 2015 19:37:48 +0000 (11:37 -0800)]
[util] If font has color, generate PNG with color
Behdad Esfahbod [Thu, 5 Nov 2015 06:55:11 +0000 (22:55 -0800)]
Don't try zeroing marks by GDEF if there are no non-ASCII
This one is a hack, but should be ok.
Behdad Esfahbod [Thu, 5 Nov 2015 06:54:49 +0000 (22:54 -0800)]
Don't try zeroing mark attachments by Unicode if there's no non-ASCII
Behdad Esfahbod [Thu, 5 Nov 2015 06:58:58 +0000 (22:58 -0800)]
Actually commit changes for previous commit
Behdad Esfahbod [Thu, 5 Nov 2015 06:42:41 +0000 (22:42 -0800)]
Skip GPOS cursive / attachment adjustmnent if none happened
I'm starting to really like how free these new scratch_flags are.
Behdad Esfahbod [Thu, 5 Nov 2015 06:28:44 +0000 (22:28 -0800)]
Minor
Behdad Esfahbod [Thu, 5 Nov 2015 06:24:19 +0000 (22:24 -0800)]
Skip forming clusters if text is all ASCII
Behdad Esfahbod [Thu, 5 Nov 2015 06:00:25 +0000 (22:00 -0800)]
Move variable-sized struct member to end
Hopefully makes clang build happy
Behdad Esfahbod [Thu, 5 Nov 2015 05:53:16 +0000 (21:53 -0800)]
Optimize positioning for when h_origin is nil
Behdad Esfahbod [Thu, 5 Nov 2015 05:42:55 +0000 (21:42 -0800)]
Add font->has_...() to check for individual nil font funcs
Hopefully this wouldn't break any compiler. There was some magic
moments to getting this to compile...
Behdad Esfahbod [Thu, 5 Nov 2015 05:16:26 +0000 (21:16 -0800)]
Minor reshaping of hb_font_funcs_t implementation
In anticipation of further changes. No functional changes.
Behdad Esfahbod [Thu, 5 Nov 2015 04:51:21 +0000 (20:51 -0800)]
Comments
Behdad Esfahbod [Thu, 5 Nov 2015 04:47:42 +0000 (20:47 -0800)]
[ot] Remove font funcs that do nothing
Behdad Esfahbod [Thu, 5 Nov 2015 04:43:59 +0000 (20:43 -0800)]
[ot] Port ot font funcs to allocated object
Behdad Esfahbod [Thu, 5 Nov 2015 04:40:05 +0000 (20:40 -0800)]
[ft] Remove font funcs that do nothing
Behdad Esfahbod [Thu, 5 Nov 2015 04:37:49 +0000 (20:37 -0800)]
[ft] Port ft font funcs to allocated object
Behdad Esfahbod [Thu, 5 Nov 2015 04:22:44 +0000 (20:22 -0800)]
Separate nil font-funcs from parent-peeking font-funcs
API change: all fonts created with hb_font_create() now inherit from
(ie have parent) hb_font_get_empty().
Behdad Esfahbod [Thu, 5 Nov 2015 03:28:17 +0000 (19:28 -0800)]
Optimize positioning direction calculations
It makes the binary smaller AND faster. Yumm!
Behdad Esfahbod [Thu, 5 Nov 2015 02:58:02 +0000 (18:58 -0800)]
Don't do fractions if buffer is ASCII-only
Behdad Esfahbod [Thu, 5 Nov 2015 02:46:22 +0000 (18:46 -0800)]
Optimize runs without Default_Ignorable's
Now that we have a buffer-wide scratch flags facility, use it to
optimize away a few passes.