Behdad Esfahbod
baa329c6a1
[GX] Add compact VariationDevice implementation
...
Add compact format that uses signed bytes instead of shorts.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
71b06fd392
[GX] Add VariationAlternates, to allow conditional lookups in GSUB/GPOS
...
Not hooked up to runtime yet.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
976eeb8e02
[GX] Minor
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
ed8a9067ca
[GX] Minor
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
15c5ee6747
[GX] Minor rename
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
4c535a822f
[GX] Hookup VariationDevice to Device table implementation
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
a0c2366075
[GX] Break out early if factor is zero
...
Also disable sanity-checking of variation records.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
ca28670316
[GX] Towards anisotropic interpolation
...
Also hookup to ValueRecord and Anchors.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
6d9d3c55bb
[GX] Add data types for encoding numerical variations
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
851b0db36d
Minor. We should never get to this branch, but fix it anyway.
2016-04-08 23:46:55 -07:00
Behdad Esfahbod
d163dc18e6
Minor
2016-01-12 13:05:01 +00:00
Behdad Esfahbod
da2fcfdc51
Don't count fixing-up FeatureParams offset as error
...
The font Garamond Premier Pro Caption (and possibly many other
Adobe fonts), have many FeatureParamsSize tables with the old
wrong offset. We handle fixing those up, but they were still
contributing to edit_count, and when I reduced HB_SANITIZE_MAX_EDIT
from 100 to 8 in 14c2de3218
, these
fonts were now getting GPOS dropped and hence kerning disabled.
Fix, by not counting edits made towareds offset fix-up. I'll
also increase edit count again, in the next commit.
2016-01-05 13:23:45 +00: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
Behdad Esfahbod
aa7044de0c
Generalize flags types
2015-11-04 16:25:57 -08:00
Behdad Esfahbod
5ba450407b
Make max context-length and max nesting level configurable
...
...at compile time.
2015-11-02 15:43:39 -08:00
Behdad Esfahbod
613e630617
Reduce max nesting level from 8 to 6
...
We probably should implement better system to catch cyclic lookups.
But for now, this speeds up worst case behavior with broken fonts
considerably without compromising legitimate usecases.
https://github.com/behdad/harfbuzz/issues/139#issuecomment-147788447
2015-10-13 23:33:28 -03:00
Behdad Esfahbod
b47159011c
Define return_trace()
...
Not functional change (expected!).
2015-09-29 14:57:02 +01:00
Behdad Esfahbod
ef79bdf73b
Minor
2015-02-25 15:43:35 -08:00
Behdad Esfahbod
8e3d4bae03
Minor
2015-02-25 15:43:33 -08:00
Behdad Esfahbod
40c58923cb
[layout] Refactor Lookup::dispatch()
2015-02-25 15:43:30 -08:00
Behdad Esfahbod
70366f5d19
[layout] Refactor get_subtable()
2015-02-25 15:43:29 -08:00
Behdad Esfahbod
de2118ed7a
Make sanitize() a const method
...
This makes a lot of code safer. We only try modifying the object in one
place, after making sure it's safe to do so. So, do a const_cast<> in
that one place...
2015-02-25 15:43:28 -08:00
Behdad Esfahbod
7627100f42
Mark unsigned integer literals with the u suffix
...
Simplifies hb_in_range() calls as the type can be inferred.
The rest is obsessiveness, I admit.
2014-07-11 16:22:13 -04:00
Behdad Esfahbod
7d4ada66c9
Mark unsed members with a "Z" suffix
...
There may be more. There are members that are by definition
redundant or reserved and not needed, NOT what we *currently*
don't use.
I'm sure there's more...
2014-06-27 17:32:56 -04:00
Behdad Esfahbod
586b60622c
Minor: final bits of cleanup
2014-06-27 15:39:47 -04:00
Behdad Esfahbod
99d2817123
Minor: Remove GenericOffset
2014-06-27 15:19:15 -04:00
Behdad Esfahbod
9da552dcc5
Minor: Remove some GenericXXX templates
2014-06-27 15:18:36 -04:00
Behdad Esfahbod
df554af99d
Rename search() to bsearch() and lsearch()
...
Such that the complexity of the algorithm used is clear at
call site.
2014-06-19 15:39:18 -04:00
Behdad Esfahbod
51f563579b
Move try_set to sanitize context
2014-06-04 18:42:32 -04:00
Behdad Esfahbod
dac86026a6
Fix some cppcheck warnings
...
Bug 77800 - cppcheck reports
2014-06-03 17:57:00 -04:00
Behdad Esfahbod
e1ebf01d0c
Minor
2013-11-26 18:00:35 -05:00
Behdad Esfahbod
a182dbc9e4
Minor
2013-11-26 17:53:41 -05:00
Behdad Esfahbod
83408cf804
Fix llvm warnings on Mac
...
Patch from Scott Fleischman. Warnings were:
harfbuzz/src/hb-font-private.hh:121:42: Implicit conversion loses
integer precision: 'long long' to 'hb_position_t' (aka 'int')
harfbuzz/src/hb-font-private.hh:126:42: Implicit conversion loses
integer precision: 'long long' to 'hb_position_t' (aka 'int')
harfbuzz/src/hb-font-private.hh:400:85: Implicit conversion loses
integer precision: 'long long' to 'hb_position_t' (aka 'int')
harfbuzz/src/hb-ot-layout-common-private.hh:1115:37: Implicit conversion
loses integer precision: 'long long' to 'int'
harfbuzz/src/hb-ft.cc:421:97: Implicit conversion loses integer
precision: 'unsigned long long' to 'int'
harfbuzz/src/hb-ft.cc:422:97: Implicit conversion loses integer
precision: 'unsigned long long' to 'int'
2013-11-06 14:46:04 -05:00
Behdad Esfahbod
ba6ddc421e
[otlayout] Increase MAX_CONTEXT_LENGTH
...
It's cheap.
2013-10-17 13:52:51 +02:00
Behdad Esfahbod
6b65a76b40
[otlayout] Fix (Chain)Context recursion!
...
Previously we only supported recursive sublookups with
ascending indices. We were also not correctly handling
non-1-to-1 recursed lookups.
Fix all that!
Fixes the three tests in test/shaping/tests/context-matching.tests,
which were derived from NotoSansBengali and NotoSansDevanagari
among others.
2013-10-14 18:54:51 +02:00
Behdad Esfahbod
515a0ac81e
Fix compiler warning
2013-08-09 09:40:59 -04:00
Behdad Esfahbod
625678436c
Fix glyph closure with class==0
...
As reported by cibu. Untested.
2013-08-05 22:44:18 -04:00
Behdad Esfahbod
48382e2f41
Minor
2013-07-30 18:25:39 -04:00
Behdad Esfahbod
797d76d07f
Minor
2013-04-18 19:04:12 -04:00
Behdad Esfahbod
1ffd23cb47
[OTLayout] Limit alternate-location FeatureParams to 'size' feature
2012-12-17 23:29:15 -05:00
Behdad Esfahbod
efe252e600
[OTLayout] Fix 'size' featureParams implementation
...
Looks at alternate location now.
2012-12-17 23:25:57 -05:00
Behdad Esfahbod
9b54562d63
[OTLayout] Towards correct FeatureParams handling
2012-12-17 13:55:36 -05:00
Behdad Esfahbod
87e43b7f2b
[OTLayout] Wire tag and list start all the way to Feature
...
To fix FeatureParam issues. No actual fix yet, just plumbing.
2012-12-14 17:48:23 -05:00
Behdad Esfahbod
0bae50a36f
[OTLayout] Add FeatureParamsCharacterVariants struct
...
No API yet.
2012-12-11 16:29:24 -05:00
Behdad Esfahbod
875a5cbc9c
[OTLayout] Change hb_ot_layout_get_params() API
...
And add implementation for StylisticSet UINameID. No API yet.
2012-12-11 14:17:01 -05:00
Behdad Esfahbod
f54cce3c6a
[OTLayout] Implement 'size' feature
2012-11-26 14:02:31 +02:00
Behdad Esfahbod
2dc1141d7d
[OTLayout] Remove operator() from ClassDef
2012-11-24 19:16:34 -05:00
Behdad Esfahbod
b67881b171
[OTLayout] Remove operator() from Coverage
2012-11-24 19:13:55 -05:00
Behdad Esfahbod
be218c688c
Pass this object to trace macros
2012-11-23 15:32:14 -05:00
Behdad Esfahbod
7d52e6601f
Whitespace
2012-11-16 18:49:54 -08:00