src/hb-ot-layout.cc


Log

Author Commit Date CI Message
Behdad Esfahbod cdf1fd06 2017-07-14T12:43:34 [indic] Add infrastructure to disable ZWNJ-skipping in context-matching Not used yet.
Ebrahim Byagowi 3b0e47ca 2017-06-19T14:47:09 Fix arm-none-eabi build (fixes #451) (#496)
jfkthame c04c1fe8 2017-04-11T22:29:13 Blacklist GDEF table in additional Tahoma versions. (#459) There are more broken versions of Tahoma out there on various Windows releases, so we need to add them to our blacklist to avoid broken rendering. See https://bugzilla.mozilla.org/show_bug.cgi?id=1279925 for details.
Behdad Esfahbod edcf6344 2017-03-24T10:24:52 Blacklist more versions of Padauk Patch from Phil Race.
Dominik Röttsches a657f23c 2017-02-20T21:52:07 Blacklist another instance of Padauk (#419) In https://crbug.com/681813 another instance of Padauk was identified triggering collapsed glyphs. Blacklist this version by patching hb-ot-layout.cc to print out gdef, gsub, and gpos table length, then adding those to the list of blacklisted versions.
Behdad Esfahbod 466b3e58 2017-02-03T16:43:25 Shuffle things around a bit
jfkthame 4ec19319 2017-02-02T18:48:23 Add Win10 Anniversary Update version of Tahoma to GDEF blacklist. (#412)
jfkthame 72c75487 2017-01-26T22:35:41 Add Win7 version of himalaya.ttf to the GDEF table blacklist. (#407)
Behdad Esfahbod 113393ef 2017-01-21T15:12:03 Remove a few unused includes
Behdad Esfahbod 55d42fd6 2017-01-19T19:35:48 Start adding hb-ot-var.h and implementation Supports enumerating variation axes, normalizing values, etc.
Behdad Esfahbod 1f810daf 2017-01-09T23:50:56 Port math table to hb_lazy_table_loader_t
Frédéric Wang ae00af4a 2017-01-03T05:55:09 Move math-specific code from hb-ot-layout to hb-ot-math #235 (#384)
Behdad Esfahbod ec87ba9b 2016-09-10T03:53:11 [GX] Add hb_ot_layout_feature_with_variations_get_lookups()
Behdad Esfahbod 30c42b64 2016-09-10T03:32:39 [GX] Add hb_ot_layout_table_find_feature_variations()
Behdad Esfahbod d1c62370 2016-09-28T19:11:22 Aim math API for 1.3.3 instead of 1.4.0
Khaled Hosny 7adbc5dd 2016-09-30T04:01:24 Fix building math docs (#335)
Behdad Esfahbod c3e21a66 2016-09-27T16:51:38 [MATH] Fix more docs
Behdad Esfahbod 46cc4a3a 2016-09-27T16:44:22 [MATH] Rename hb_math_*_t types to hb_ot_math_*_t With this, I believe MATH table API is not ready to be merged.
Frédéric Wang 0762b354 2016-09-27T15:28:35 Document API for MathVariants (#330)
Behdad Esfahbod 86106c75 2016-09-26T22:12:48 [MATH] Rename all API to hb_ot_math_*
Behdad Esfahbod 559eb564 2016-09-26T21:46:05 [MATH] Wire up get_glyph_assembly()
Behdad Esfahbod 353f455a 2016-09-26T21:22:48 [MATH] Wire up get_glyph_variants()
Behdad Esfahbod 7fe0e28c 2016-09-26T17:51:47 [MATH] Start fleshing out glyph variant API
Frédéric Wang 51da7a1c 2016-08-25T11:17:50 MATH table: Add API to access math variants.
Behdad Esfahbod 94f5df56 2016-09-26T13:31:47 [MATH] Clean up get_kerning()
Behdad Esfahbod 17ff30e9 2016-09-26T12:18:32 [MATH] Clean up get_top_accent_attachment() Note, the function now returns "half of horizontal advance width" if top accent attachment for glyph is not explicitly defined. This is what the spec requires. Updated tests.
Behdad Esfahbod 8bcf517f 2016-09-26T12:12:41 [MATH] Clean up get_italics_correction()
Behdad Esfahbod 06003f71 2016-09-26T12:07:29 [MATH] Clean up a bit more
Behdad Esfahbod 54c0cc38 2016-09-26T11:56:40 [MATH] Clean up get_math_constant implementation
Behdad Esfahbod 8a8cfad9 2016-09-26T11:47:05 [MATH] Cleanup previous commit a bit
Frédéric Wang d7182d12 2016-08-25T11:15:31 MATH Table: Add API to access glyph info.
Frédéric Wang 319ff591 2016-08-25T11:06:41 MATH Table: Add API to access math contants.
Behdad Esfahbod 4d3892e9 2016-09-26T10:45:58 [MATH] Fixups for previous commit
Frédéric Wang 5fbcb992 2016-08-25T10:47:15 MATH Table: Add API to check availability of math data.
Dominik Röttsches 67e9fdf4 2016-09-05T11:27:25 Blacklist Padauk 2.80 and 3.00 (#311) According to comments in issue #305 broken GDEF tables lead to incorrect rendering of Latin characters. Blacklisting this font.
jfkthame f3f6c1cc 2016-06-16T00:10:42 Blacklist GDEF tables of more fonts This is based on bug reports that have been filed against Firefox since it updated to a version of harfbuzz that uses zeroing by GDEF rather than by Unicode. I'm sure there are a bunch more font versions that should also be included; these are just the ones I have on hand and have confirmed as having bad GDEF data. Given how the list here is growing, I think we should reconsider the approach, and perhaps revert to zeroing by Unicode instead. Fixes https://github.com/behdad/harfbuzz/issues/264 Fixes https://github.com/behdad/harfbuzz/pull/266
Behdad Esfahbod 29393884 2016-04-26T10:35:23 Annotate blacklisted fonts with their sha1sum
Behdad Esfahbod 1c625dff 2016-04-09T12:53:23 Minor
Behdad Esfahbod 4f3d59a1 2016-04-08T13:41:20 Blacklist another set of timesi.ttf and timesbi.ttf
Behdad Esfahbod 94dd0bb7 2016-02-25T11:31:03 Add blacklist signature for Times New Roman (Bold) Italic on OS X
Behdad Esfahbod e23cf902 2016-02-25T11:11:15 Blacklist GDEF table of timesi.ttf and timesbi.ttf on Win 7 See discussion: https://lists.freedesktop.org/archives/harfbuzz/2016-February/005489.html
Behdad Esfahbod 7d8d58ac 2016-02-11T16:34:28 [GPOS] Divide position_finish() into two phases, for advances and offsets Right now the position_finish_advances() is empty. To be used for spacing attachments proposal later.
Behdad Esfahbod 3e704521 2016-01-11T17:38:41 [OT] Get list of lookup subtables once and loop through them This speeds up shaping the Amiri font by over 15%. This was primarily needed for my work on OpenType GX, since we will be collecting only sublookups that are "active" for current font instance; but it's a nice boost in general as well. We might, in the future, collect subtables in the lookup_accel. That would also allow us to do a per-subtbale set-digest, which should speed things up some more, specially for ContextChainFormat3 lookups... Amiri, for example, contains one lookup with 53 subtables!
Khaled Hosny d7bf9d05 2015-12-29T02:23:24 [docs] Fix comment syntax To lower the number of gtk-doc warnings.
Behdad Esfahbod 0475ef2f 2015-12-18T18:17:07 [buffer] Add debugging, aka, message, API Currently just announces lookup applications. Message-API *will* change. hb-shape / hb-view are updated to print-out messages to stder if --debug is specified.
Behdad Esfahbod 9ea0aa43 2015-12-18T17:30:18 Don't deserialize positions if buffer has no positions
Behdad Esfahbod 35d18585 2015-11-26T19:30:37 Fix a few docs blocks
Behdad Esfahbod ea512f71 2015-11-26T19:22:22 Use C-style casts instead of compare to 0, to convert hb_bool_t to bool
Behdad Esfahbod 766963ad 2015-11-24T15:38:43 Merge pull request #114 from ThePhD/vc++-fixes Fix all VC++ warnings and errors
Behdad Esfahbod abadc171 2015-11-18T17:52:08 Try to better handle OOM situations Fixes assert fail in https://github.com/behdad/harfbuzz/issues/161 with libharfbuzz-fuzzing.
Behdad Esfahbod 5337db29 2015-11-06T16:18:09 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.
Behdad Esfahbod f92bd86c 2015-11-05T23:52:29 Don't process lookups if buffer is in error
Behdad Esfahbod 77a1a2bc 2015-10-09T12:20:58 Add hb_dispatch_context_t
Behdad Esfahbod b8811429 2015-09-03T15:53:22 Fix Since tags Fixes https://github.com/behdad/harfbuzz/issues/103
Behdad Esfahbod 902e74a0 2015-08-18T18:55:03 Commented-out code to print buffer before each lookup To be turned into a useful HB_DEBUG_SHAPE infrastructure...
Behdad Esfahbod 2c8b3b2e 2015-08-18T14:36:43 [debug] Print lookup index in debug-apply output
ThePhD 5c99cf93 2015-08-14T01:02:00 Merge branch 'master' into vc++-fixes
Behdad Esfahbod 0f98fe88 2015-07-23T11:52:11 [ot] Search globally for 'vert' feature if not found in specified script/lang Fixes https://github.com/behdad/harfbuzz/issues/63
Behdad Esfahbod d78463c8 2015-07-23T10:11:35 Minor debug output fix
ThePhD 8e545d59 2015-06-22T22:29:04 Fix all VC++ warnings and errors in the current commit's builds.
Sascha Brawer 01c3a885 2015-06-01T13:22:01 Fix "Since:" tags Based on data from http://upstream-tracker.org/versions/harfbuzz.html Resolves #103
Behdad Esfahbod f47cf1f1 2015-02-21T11:45:22 Minor
Behdad Esfahbod 640b66c6 2015-02-19T17:30:05 [layout] If lookup has only one subtable, move the forward loop down to subtable I was hoping to see a nice speedup, but it resulted in a very minor one.
Behdad Esfahbod e2f50f2a 2015-02-19T17:15:05 [layout] Add apply_forward / apply_backward
Behdad Esfahbod 1d4a3284 2015-02-19T11:33:30 [layout] Remove unneeded return value from apply()
Behdad Esfahbod bd047d3b 2015-02-19T10:47:18 [layout] Minor
Behdad Esfahbod b9d3f605 2015-02-19T10:42:41 [layout] Minor
Behdad Esfahbod 241eac95 2015-01-28T20:55:42 Hide internals of lookup accelerators
Behdad Esfahbod 395b3590 2014-12-28T16:03:26 Avoid accessing layout tables at face destruction "Fixes" https://bugs.freedesktop.org/show_bug.cgi?id=86300 Based on discussion someone else who had a similar issue, most probably the user is releasing FT_Face before destructing hb_face_t / hb_font_t. While that's a client bug, and while we can (and should) use FreeType refcounting to help avoid that, it happens that we were accessing the table when we didn't really have to. Avoid that.
Behdad Esfahbod 911ca386 2014-06-24T10:20:36 Add back API removed recently Add hb_ot_layout_language_get_required_feature_index() again, which is used in Pango. This was removed in da132937989acb4d8ca9bd41c79f98750e7dda30 in favor of hb_ot_layout_language_get_required_feature(). API changes: - Added hb_ot_layout_language_get_required_feature_index back.
Jonathan Kew da132937 2014-04-27T14:05:24 Rework handling of requiredFeature to solve problem with rlig in arial.ttf from winxp https://bugzilla.mozilla.org/show_bug.cgi?id=986802 Fixes https://github.com/behdad/harfbuzz/pull/39 API Change: -hb_ot_layout_language_get_required_feature_index +hb_ot_layout_language_get_required_feature New API takes an extra pointer argument. Pass NULL in to get behavior of previous API. Reworked by behdad
Behdad Esfahbod 6ffc007b 2013-10-28T19:26:02 [otlayout] Optimize inplace See thread started by Jonathan with subject "an optimization for complex fonts".
Behdad Esfahbod ac8cd511 2013-10-18T19:33:09 Refactor
Behdad Esfahbod 49901862 2013-10-17T19:48:51 [otlayout] Guard against use of ReverseChain through Context
Behdad Esfahbod 4e6e53db 2013-10-14T13:06:36 [otlayout] "Minor"
Behdad Esfahbod 27674b4b 2013-10-03T14:54:50 [OTLayout] Protect against out-of-range lookup indices Filter them out when compiling map.
Behdad Esfahbod 6c48f20e 2013-09-09T15:43:10 [otlayout] Add structs for JSTF table
Behdad Esfahbod 5f85c80a 2013-06-26T20:14:18 [OT] Collect requiredFeature only if features are not provided As per Werner's report on the list.
Bradley Grainger 89312b74 2013-06-21T15:02:18 Destroy lookups before blobs. 'layout->gsub' may depend on data owned by 'layout->gsub_blob', so it must be deinitialized before the blob is destroyed.
Behdad Esfahbod 9d9e72e9 2013-05-03T18:10:10 [OTLayout] Use is_inplace() when flipping buffers
Behdad Esfahbod 45f3d980 2013-05-03T17:49:44 [OTLayout] Merge / templateize apply_string()
Behdad Esfahbod 780cd930 2013-05-03T17:33:16 [OTLayout] Minor
Behdad Esfahbod bac1dd6a 2013-05-02T18:52:24 [OTLayout] Refactor a bit more
Behdad Esfahbod d2c96819 2013-05-02T18:18:24 Move code around
Behdad Esfahbod 45fd9424 2013-05-02T18:06:51 [OTLayout] Add hb_ot_layout_lookup_accelerator_t
Behdad Esfahbod 893991fc 2013-04-16T21:50:33 Initialize set digests We were not initializing the digests properly and as a result they were being initialized to zero, making digest1 to never do any useful work. Speeds up Amiri shaping significantly.
Behdad Esfahbod a8cf7b43 2013-03-19T05:53:26 [Indic] Futher adjust ZWJ handling in Indic-like shapers After the Ngapi hackfest work, we were assuming that fonts won't use presentation features to choose specific forms (eg. conjuncts). As such, we were using auto-joiner behavior for such features. It proved to be troublesome as many fonts used presentation forms ('pres') for example to form conjuncts, which need to be disabled when a ZWJ is inserted. Two examples: U+0D2F,U+200D,U+0D4D,U+0D2F with kartika.ttf U+0995,U+09CD,U+200D,U+09B7 with vrinda.ttf What we do now is to never do magic to ZWJ during GSUB's main input match for Indic-style shapers. Note that backtrack/lookahead are still matched liberally, as is GPOS. This seems to be an acceptable compromise. As to the bug that initially started this work, that one needs to be fixed differently: Bug 58714 - Kannada u+0cb0 u+200d u+0ccd u+0c95 u+0cbe does not provide same results as Windows8 https://bugs.freedesktop.org/show_bug.cgi?id=58714 New numbers: BENGALI: 353689 out of 354188 tests passed. 499 failed (0.140886%) DEVANAGARI: 707305 out of 707394 tests passed. 89 failed (0.0125814%) GUJARATI: 366349 out of 366457 tests passed. 108 failed (0.0294714%) GURMUKHI: 60706 out of 60747 tests passed. 41 failed (0.067493%) KANNADA: 951030 out of 951913 tests passed. 883 failed (0.0927606%) KHMER: 299070 out of 299124 tests passed. 54 failed (0.0180527%) LAO: 53611 out of 53644 tests passed. 33 failed (0.0615167%) MALAYALAM: 1048102 out of 1048334 tests passed. 232 failed (0.0221304%) ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%) SINHALA: 271666 out of 271847 tests passed. 181 failed (0.0665816%) TAMIL: 1091753 out of 1091754 tests passed. 1 failed (9.15957e-05%) TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%) TIBETAN: 208469 out of 208469 tests passed. 0 failed (0%)
Behdad Esfahbod cfc507c5 2013-02-14T10:40:12 [Indic-like] Disable automatic joiner handling for basic shaping features Not for Arabic, but for Indic-like scripts. ZWJ/ZWNJ have special meanings in those scripts, so let font lookups take full control. This undoes the regression caused by automatic-joiners handling introduced two commits ago. We only disable automatic joiner handling for the "basic shaping features" of Indic, Myanmar, and SEAsian shapers. The "presentation forms" and other features are still applied with automatic-joiner handling. This change also changes the test suite failure statistics, such that a few scripts show more "failures". The most affected is Kannada. However, upon inspection, we believe that in most, if not all, of the new failures, we are producing results superior to Uniscribe. Hard to count those! Here's an example of what is fixed by the recent joiner-handling changes: https://bugs.freedesktop.org/show_bug.cgi?id=58714 New numbers, for future reference: BENGALI: 353892 out of 354188 tests passed. 296 failed (0.0835714%) DEVANAGARI: 707336 out of 707394 tests passed. 58 failed (0.00819911%) GUJARATI: 366262 out of 366457 tests passed. 195 failed (0.0532122%) GURMUKHI: 60706 out of 60747 tests passed. 41 failed (0.067493%) KANNADA: 950680 out of 951913 tests passed. 1233 failed (0.129529%) KHMER: 299074 out of 299124 tests passed. 50 failed (0.0167155%) LAO: 53611 out of 53644 tests passed. 33 failed (0.0615167%) MALAYALAM: 1047983 out of 1048334 tests passed. 351 failed (0.0334817%) ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%) SINHALA: 271539 out of 271847 tests passed. 308 failed (0.113299%) TAMIL: 1091753 out of 1091754 tests passed. 1 failed (9.15957e-05%) TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%) TIBETAN: 208469 out of 208469 tests passed. 0 failed (0%)
Behdad Esfahbod 6880f7e1 2013-02-13T12:17:25 [OTLayout] Make table type known to apply context
Behdad Esfahbod 56800027 2013-02-12T09:44:57 Adjust mark advance-width zeroing logic for Myanmar Before, we were zeroing advance width of attached marks for non-Indic scripts, and not doing it for Indic. We have now three different behaviors, which seem to better reflect what Uniscribe is doing: - For Indic, no explicit zeroing happens whatsoever, which is the same as before, - For Myanmar, zero advance width of glyphs marked as marks *in GDEF*, and do that *before* applying GPOS. This seems to be what the new Win8 Myanmar shaper does, - For everything else, zero advance width of glyphs that are from General_Category=Mn Unicode characters, and do so before applying GPOS. This seems to be what Uniscribe does for Latin at least. With these changes, positioning of all tests matches for Myanmar, except for the glitch in Uniscribe not applying 'mark'. See preivous commit.
Behdad Esfahbod eb45c0a2 2013-01-16T22:07:50 Minor
Behdad Esfahbod f0c82410 2013-01-03T00:07:16 [OTLayout] Always collect default language system in collect_lookups Not sure if this is the most desired behavior. It's the most easily defined though.
Behdad Esfahbod 15e9e4e1 2013-01-03T00:04:40 [OTLayout] Fix feature iteration in collect_lookups Previous logic was just wrong.
Behdad Esfahbod 733e8c0d 2013-01-03T00:00:23 [OTLayout] Whitespace
Behdad Esfahbod d37ae380 2013-01-02T23:57:36 [OTLayout] Handle required_feature_index in collect_lookups
Behdad Esfahbod efe252e6 2012-12-17T23:21:05 [OTLayout] Fix 'size' featureParams implementation Looks at alternate location now.
Behdad Esfahbod 85bc44b9 2012-12-12T11:38:49 [OTLayout] More 'size' feature sanity checking We still don't look for the old incorrect place of the featureParams. I'll wait till someone actually complains about it...
Behdad Esfahbod 372fe2b6 2012-12-11T14:30:57 [OTLayout] Make hb_ot_layout_get_size_params() do some checks
Behdad Esfahbod 875a5cbc 2012-12-11T14:17:01 [OTLayout] Change hb_ot_layout_get_params() API And add implementation for StylisticSet UINameID. No API yet.
Behdad Esfahbod 6748b96d 2012-11-30T12:02:21 Minor