Commit Graph

3666 Commits

Author SHA1 Message Date
Behdad Esfahbod bf0d3a665b [var] Add hb_font_get_var_coords_normalized() 2017-01-21 14:48:46 -08:00
Behdad Esfahbod b3c0714b4b [var] Add hb_var_coord_t and parsing routines 2017-01-20 20:30:03 -08:00
Behdad Esfahbod 72364103bc Move code around 2017-01-20 20:16:53 -08:00
Behdad Esfahbod 785982bf83 [var] Flesh out some more 2017-01-20 20:05:45 -08:00
Behdad Esfahbod 422c0c36c8 [var] Flesh out a bit 2017-01-20 19:14:54 -08:00
Behdad Esfahbod b8376b1090 Minor 2017-01-20 18:19:28 -08:00
Behdad Esfahbod f2e73d37e7 [var] Remove over-optimization 2017-01-20 17:42:18 -08:00
Behdad Esfahbod 469926cc45 [var] Change double to float in API 2017-01-20 17:40:46 -08:00
Behdad Esfahbod 55d42fd667 Start adding hb-ot-var.h and implementation
Supports enumerating variation axes, normalizing values, etc.
2017-01-19 19:35:48 -08:00
Behdad Esfahbod 272b511532 Minor 2017-01-19 19:33:07 -08:00
Khaled Hosny 2452543fdd [ot] Fix automatic fraction for RTL scripts (#405)
The numbers for right-to-left scripts are processed also from right to
left, so the order of applying “numr” and “dnom” features should be
reversed in such case.

Fixes https://github.com/behdad/harfbuzz/issues/395
2017-01-18 12:48:13 -08:00
Sascha Brawer 1337428e4f Update language tags to OpenType 1.8.1 (#403)
Resolves https://github.com/behdad/harfbuzz/issues/324
2017-01-18 04:51:02 -08:00
Behdad Esfahbod 784d1180de Fix build with clang 2017-01-11 11:58:13 -08:00
Behdad Esfahbod 1f810daf16 Port math table to hb_lazy_table_loader_t 2017-01-09 23:50:56 -08:00
Behdad Esfahbod ebbcc11122 Add hb_lazy_table_loader_t 2017-01-09 22:47:47 -08:00
Behdad Esfahbod 1af9d924a4 Move lazy-loader to more generic place 2017-01-09 22:22:37 -08:00
Behdad Esfahbod ac274331c2 In lazy-loading, remember allocation failure 2017-01-09 22:20:38 -08:00
Behdad Esfahbod 29fb0cb727 Minor 2017-01-09 21:18:55 -08:00
Behdad Esfahbod 93ef684b9b Rename hb-ot-layout-math-table.hh to hb-ot-math-table.hh 2017-01-09 21:11:00 -08:00
Behdad Esfahbod 3b5263b0e9 Typo 2017-01-09 15:49:08 -08:00
Behdad Esfahbod 00adf9c8a4 Minor
Should be enough to get -hangul.cc out of SOURCES in Firefox build:
https://dxr.mozilla.org/mozilla-central/source/gfx/harfbuzz/src/moz.build

No one else should care!
2017-01-09 00:00:49 -08:00
Behdad Esfahbod 7cf9952e7f [USE] Remove non-canonical decompositions
We have had added this in Indic shaper to assist shaping these scripts.
In Universal Shaping Engine however, it is up to font designer to
decompose them.  Hence moving them from Indic shaper to USE was
wrong.

Fixup for f6ba63b2e8

Part of fixing https://github.com/behdad/harfbuzz/issues/387
2017-01-08 23:55:54 -08:00
Behdad Esfahbod 53543f8b3e Ship UCDN and use it by default
So we are not relying on version of Unicode data in glib...

Fixes https://github.com/behdad/harfbuzz/issues/386
Fixes https://github.com/behdad/harfbuzz/issues/388
2017-01-05 20:12:32 -08:00
Frédéric Wang ae00af4a47 Move math-specific code from hb-ot-layout to hb-ot-math #235 (#384) 2017-01-02 23:55:09 -05:00
Behdad Esfahbod 6cff753941 Remove Tibetan decomposition rules from Indic shaper
The decomposition is very obscure and unlikely to help
any fonts.  Just remove it since Uniscribe probably doesn't
do this either.

Fixes https://github.com/behdad/harfbuzz/issues/382
2016-12-28 13:47:13 -05:00
Behdad Esfahbod f6ba63b2e8 Port decompositions from Indic to USE shaper
Part of https://github.com/behdad/harfbuzz/issues/382
2016-12-28 13:45:32 -05:00
Behdad Esfahbod e678b537f7 [indic] Remove Chakma decomposition rule from Indic shaper
This is now added to USE:
https://github.com/behdad/harfbuzz/pull/383

See:
https://github.com/behdad/harfbuzz/issues/381
https://github.com/behdad/harfbuzz/issues/382
2016-12-28 13:40:55 -05:00
jfkthame 49ba698124 [use] Special-case Chakma split-vowel decomp in the USE shaper. (#383) 2016-12-28 13:00:51 -05:00
Behdad Esfahbod c4ca49d55b Revert "[indic] Remove redundant Chakma decomposition rule"
This reverts commit 805f76fc00.

Need to investigate why having this rule (with the reversed order)
fixes decomposition as reported by punchcutter:
https://github.com/behdad/harfbuzz/issues/381#issuecomment-269237796
2016-12-26 14:52:08 -05:00
Behdad Esfahbod 805f76fc00 [indic] Remove redundant Chakma decomposition rule
This was not used BTW since Chakma doesn't go through Indic shaper
anymore.

See:
https://github.com/behdad/harfbuzz/issues/381
https://github.com/behdad/harfbuzz/issues/382
2016-12-26 14:12:39 -05:00
Behdad Esfahbod 3cc48a46b5 [indix] Comment 2016-12-26 13:16:56 -05:00
nvelinov 7d1c5d8281 Compilation Error for ASSERT_STATIC on Some Compilers (#380)
* this pointer in type definitions is not interpreted as a constant.
This rule is not enforced strictly by all compilers, but the Green Hills Software compiler will regard this as an error.

* Merging branches for the DEFINE_SIZE_UNION macro
Adding check for the existence of static_size field in the tested member.
2016-12-23 19:46:37 -06:00
Behdad Esfahbod e2b878055b Disable OTL processing for Hebrew if GPOS doesn't have Hebrew subtable
New approach to fix this:
69f9fbc420

Previous approach was reverted as it was too broad.  See context:
https://github.com/behdad/harfbuzz/issues/347#issuecomment-267838368

With U+05E9,U+05B8,U+05C1,U+05DC and Arial Unicode, we now (correctly) disable
GDEF and GPOS, so we get results very close to Uniscribe, but slightly different
since our fallback position logic is not exactly the same:

Before:		[gid1166=3+991|gid1142=0+737|gid5798=0+1434]
After:		[gid1166=3+991|gid1142=0@402,-26+0|gid5798=0+1434]
Uniscribe:	[gid1166=3+991|gid1142=0@348,0+0|gid5798=0+1434]
2016-12-22 14:43:23 -06:00
Behdad Esfahbod 1a0f4aa6df Revert "Synthesize GDEF glyph class for any glyph that does not have one in GDEF"
This reverts commit 69f9fbc420.

See https://github.com/behdad/harfbuzz/issues/347#issuecomment-268873401
Fixes https://github.com/behdad/harfbuzz/issues/347
2016-12-22 14:43:14 -06:00
Behdad Esfahbod 4b4a1b9f23 Fix assert fail with contextual matching
As discovered by libFuzzer / Chromium fuzzing.

Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=659496
CC https://github.com/behdad/harfbuzz/issues/139
2016-12-21 23:14:16 -06:00
Behdad Esfahbod df98ce5fc8 Improve debug output with really deep nesting 2016-12-21 19:27:30 -06:00
Behdad Esfahbod eab418c5e6 Avoid infinite loop in CoverageFormat2 iteration with bad fonts
Fixes https://github.com/behdad/harfbuzz/issues/363
2016-12-21 15:51:28 -06:00
Behdad Esfahbod 7ed71eb347 Protect collect_glyphs() and closure() against malicious DDOS fonts
Fixes https://github.com/behdad/harfbuzz/issues/363
2016-12-20 15:01:16 -06:00
Mike Hommey 1c98ff87c7 Support building with older glib versions
It is desirable to be able to build against older versions of glib.

fd7a245 changed the configure check to require glib > 2.38 for
G_TEST_DIST. Before that, version 2.16 was required, but in fact,
since aafe395, G_PASTE is being used, which was introduced in 2.19.1.
And since 0ef179e2, hb-glib uses GBytes, which were introduced in
2.31.10.

2.19.1 is rather old, but 2.38 is rather new. For Firefox, building
against 2.22 is still supported, although we could probably get away
with bumping that to 2.28. Either way, GBytes is not available.

Arguably, if you build against a glib that doesn't support GBytes,
you're not going to use the hb_glib_blob_create function, so we hide
the function when building against such a glib.

As for G_TEST_DIST, when building against versions of glib that don't
support it, we can fallback to the previous behavior, which, AIUI, was
just making the test not work when building in a separate directory.
2016-12-18 01:37:07 -06:00
Volker H. Simonis ad273881c5 Minor fixes to pacify Coverity code scan
Fixes https://github.com/behdad/harfbuzz/pull/377
2016-12-18 00:14:06 -06:00
ebraminio 1e1825bf47 [dwrite] Provide an experimental API for justification (#279) 2016-12-17 10:30:40 +03:30
Behdad Esfahbod 219cb29c5d Fix build after rebasing opentype-gx branch on top of MATH table 2016-12-16 19:06:26 -06:00
Behdad Esfahbod 0aedfd59be [GX] Apply 'rvrn' feature before any other feature 2016-12-16 19:06:26 -06:00
Behdad Esfahbod 42c8142531 [GX] Fix build with older FreeType 2016-12-16 19:06:26 -06:00
Sascha Brawer 72873cf522 Call hb_font_set_var_coords_normalized() from FT_Face coords 2016-12-16 19:06:26 -06:00
Behdad Esfahbod 4ebbeb7c50 [GX] Make FeatureVariations actually work
Yay!!!!
2016-12-16 19:06:26 -06:00
Behdad Esfahbod 72ada4f0c6 [GX] Hook up feature variations
Shape-plan caching is not implemented.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod ec87ba9ba3 [GX] Add hb_ot_layout_feature_with_variations_get_lookups() 2016-12-16 19:06:26 -06:00
Behdad Esfahbod 30c42b644e [GX] Add hb_ot_layout_table_find_feature_variations() 2016-12-16 19:06:26 -06:00
Behdad Esfahbod 7ceadbe981 Shuffle code around 2016-12-16 19:06:26 -06:00