Commit Graph

178 Commits

Author SHA1 Message Date
Ebrahim Byagowi 8b6eb6cf46
Add a macOS 10.14.3 fonts tests (#1608) 2019-03-08 01:33:41 +03:30
Behdad Esfahbod a9321cb5f8 Fix mac test 2019-01-25 16:11:45 +01:00
Behdad Esfahbod 06358ae974 [AAT] Add test for recent Ligature stack fix, using Zapfino on Mac 2019-01-25 15:11:47 +01:00
Behdad Esfahbod 00f06d1aa6 Fix test 2019-01-24 16:11:05 +01:00
Behdad Esfahbod 9f31417733 Form cluster for Emoji sub-region tag sequences
Fixes https://github.com/harfbuzz/harfbuzz/issues/1556
2019-01-24 16:08:33 +01:00
Behdad Esfahbod 5034f8f2ab Fix macos tests with previous commit 2019-01-24 12:50:38 +01:00
Behdad Esfahbod 3ecda71041 Adjust mark offsets when zeroing from fallback mark positioning code
Adjust tests.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1532
2019-01-24 12:28:24 +01:00
Behdad Esfahbod cbe0ed117a [AAT] Re-enable tests MORX-31 and MORX-41 2019-01-23 20:45:18 +01:00
Behdad Esfahbod 410731d3fb [test/text-rendering-tests] Update from upstream 2019-01-23 20:31:06 +01:00
Tor Arne Vestbø f401f85a5a Remove assumption about Core Text working in 96 DPI
Core Text doesn't actually have a concept of DPI internally, as it
doesn't rasterize anything by itself, it just generates vector paths
that get passed along to Core Graphics.

In practice this means Core Text operates in the classical macOS
logical DPI of 72, with one typographic point corresponding to one
point in the Core Graphics coordinate system, which for a normal
bitmap context then corresponds to one pixel -- or two pixels for
a "retina" context with a 2x scale transform.

Scaling the font point sizes given to HarfBuzz to an assumed DPI
of 96 is problematic with this in mind, as fonts with optical
features such as 'trak' tables for tracking, or color glyphs,
will then base the metrics off of the wrong point size compared
to what the client asked for.

This in turn causes mismatches between the metrics of the shaped
text and the actual rasterization, which doesn't include the 72
to 96 DPI scaling.

If a 96 DPI is needed, such as on the Web, the scaling should be
done outside of HarfBuzz, allowing the client to keep the DPI of
the shaping in sync with the rasterization.

The recommended way to do that is by scaling the font point size,
not by applying a transform to the target Core Graphics context,
to let Core Text choose the right optical features of the target
point size, as described in WWDC 2015 session 804:

  https://developer.apple.com/videos/play/wwdc2015/804/
2019-01-15 13:26:35 +01:00
Ebrahim Byagowi bf738ba3ba
[test][aat] Remove extra --shaper ot
As run-tests.py already adds it
2018-11-30 00:06:40 +03:30
Behdad Esfahbod 1a182e97ee [test/text-rendering-tests] Update from upstream 2018-11-29 12:39:52 -05:00
Ebrahim Byagowi e0307de818
[test][aat.kern] More (#1427) 2018-11-29 11:36:05 +03:30
Ebrahim Byagowi 7b78d2233d
[test][aat] Update expectency
It is not visually noticeable but apparently affected by kern format2 correct implementation.
I should've checked CoreText result which can't as CircleCI outage.
2018-11-29 00:55:05 +03:30
Ebrahim Byagowi 5155067e10
[test] Add test for format2 kern (#1423) 2018-11-29 00:07:00 +03:30
Ebrahim Byagowi 19863c8059
[test][aat] Add a test and make macOS runners faster (#1422) 2018-11-28 20:28:42 +03:30
Ebrahim Byagowi 97eaedca5d
[test][aat] Enable Tamil MN test (#1414) 2018-11-26 16:58:58 +03:30
Ebrahim Byagowi 0e3a48e542
[test][aat] fix 10.13.6 Helvetica expectation 2018-11-25 13:37:23 +03:30
Ebrahim Byagowi cbc541b426
[aat] Add m grave test (#1412) 2018-11-25 12:50:30 +03:30
Ebrahim Byagowi fa26ad0f48
[aat] Fix macos expectation 2018-11-25 11:25:17 +03:30
Behdad Esfahbod 264c4a539c [test] Reorder test suites
aots is less interesting.  Run text-rendering-tests before aots.
2018-11-25 01:16:01 -05:00
Ebrahim Byagowi e6877e28cd [test] Add the missed aots fonts 2018-11-25 02:14:41 +03:30
Ebrahim Byagowi 825ea5a460 [test] Merge 10.12.6 and 10.13.6 tests, update to Apple Chancery fix 2018-11-25 02:14:41 +03:30
Ebrahim Byagowi b518e5af9f
Add 10.13.6 aat fonts tests and bot (#1409) 2018-11-25 01:39:00 +03:30
Behdad Esfahbod b7f7950e8f [aat] Add test for recent regression 2018-11-24 15:56:17 -05:00
Behdad Esfahbod 5020affc38 [tests] Minor 2018-11-24 15:42:11 -05:00
Behdad Esfahbod ed900ee9af [tests] Rename 2018-11-24 15:22:09 -05:00
Ebrahim Byagowi 3cc14e78ae
[test] Enable more of aots tests (#1408)
The ones commented out in this change should've be passed :/
a closer look is needed.
2018-11-24 20:49:21 +03:30
Ebrahim Byagowi 24887d1115
Add Adobe AOTS tests (#1395)
Annotated OpenType Specification or aots, https://github.com/adobe-type-tools/aots
provides a set of tests for OpenType specification, this change add those tests in addition
to modified version of their HarfBuzz test runner for generating harfbuzz project specific tests.
2018-11-24 20:07:24 +03:30
Ebrahim Byagowi c9cc96c0cf
[aat] Update expectation 2018-11-23 19:58:56 +03:30
Ebrahim Byagowi 341851efe1
[aat] Add macOS specific tests (#1404) 2018-11-23 15:40:05 +03:30
Behdad Esfahbod 8280459e74
Merge pull request #1291 from harfbuzz/use-reordering
[use] Fix reordering
2018-11-22 22:39:12 -05:00
David Corbett 264439c6c3 Test U+111C9 SHARADA SANDHI MARK 2018-11-21 16:33:45 -05:00
David Corbett 3c7792ca32 [use] Fix reordering
Fixes #1235.
2018-11-19 16:49:40 -05:00
Behdad Esfahbod cff4c6087f Fix vertical fallback space sign
Ouch!

Follow-up to cf203af8a3

Fixes https://github.com/harfbuzz/harfbuzz/issues/1343
2018-11-16 15:04:41 -08:00
punchcutter e543e1a085 Add Grantha test 2018-11-13 20:44:27 -08:00
Behdad Esfahbod 9fae611740 [test/text-rendering-tests] Update from upstream 2018-11-08 12:26:38 -05:00
Behdad Esfahbod cf203af8a3 Implement space fallback in vertical direction
Fixes https://github.com/harfbuzz/harfbuzz/issues/1343
2018-10-31 18:27:09 -07:00
Behdad Esfahbod 0aa90271fd [tests] Fix for recent rounding change in CBDT 2018-10-28 23:03:20 -07:00
Behdad Esfahbod e3ceb2dde3 Fix again 2018-10-25 14:30:36 -07:00
Behdad Esfahbod 1cfe702872 Fixup 2018-10-25 13:37:08 -07:00
Behdad Esfahbod 5739c876d0 [test] Rename some fonts
If we have duplicae font files in different directories, that would
break the oss-fuzz build currently.  So, rename some to avoid
name class with text-rendering-test.  Would be better to find
another solution.
2018-10-25 13:23:33 -07:00
Behdad Esfahbod ba502dea1e [morx] Fix cluster-merging when ligating
Only merge when actual ligature happened.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1305
2018-10-23 16:50:31 -07:00
Behdad Esfahbod cf92d6579e [trak] Allow disabling tracking for ranges of text
Fixes https://github.com/harfbuzz/harfbuzz/issues/1303
2018-10-23 03:10:56 -07:00
Ebrahim Byagowi 22ecefd88e Make tracking optout possible using 'trak' ot feature
So '--features=-trak' or 'font-feature-settings: 'trak' 0;' can prevent
applying of tracking if used.
2018-10-23 02:57:55 -07:00
David Corbett 205737acdc [use] Prohibit visually ambiguous vowel sequences 2018-10-23 02:25:08 -07:00
Behdad Esfahbod 48ed598a35 [VORG] Hook up to hb-ot-font's v_origin
Fixes https://github.com/harfbuzz/harfbuzz/issues/544

Test added with NotoSansCJK, eg. with U+FF38.
2018-10-23 02:21:27 -07:00
Behdad Esfahbod 1bfb96a9c8 [test/text-rendering-tests] Update from upstream 2018-10-22 23:41:47 -07:00
Khaled Hosny d4e928b142 [color] Minimal API for COLR/CPAL 2018-10-22 10:17:31 +02:00
Behdad Esfahbod 257ded1f9e [trak] Fix test for previous fix 2018-10-19 11:20:14 -07:00
Behdad Esfahbod c0c190c16a [fuzzing] Run tests against fuzzing fonts
Some disable.
2018-10-16 16:39:55 -07:00
Behdad Esfahbod 3676c685d4 [fuzzing] Move rest of fuzzing tests here 2018-10-16 16:32:26 -07:00
Behdad Esfahbod 1487173dcf [fuzzing] Delete duplicate fonts 2018-10-16 16:30:38 -07:00
Behdad Esfahbod 1aa353e4fc Fix tests 2018-10-16 15:26:51 -07:00
Ebrahim Byagowi e53206271d
Add all the fonts found by fuzzers to the repo (#1258) 2018-10-17 01:42:04 +03:30
Behdad Esfahbod 2137582c96 [morx] Reword ligation
Still fails MORX-41.  Am talking to Sascha to better understand what CoreText
is doing.
2018-10-16 14:46:07 -07:00
Behdad Esfahbod c46d42f8f2 [test/text-rendering-tests] Update from upstream 2018-10-16 13:39:54 -07:00
Behdad Esfahbod 8dc6296818 [ot-font] Implement TrueType v_origin
Fixes https://github.com/harfbuzz/harfbuzz/issues/537
2018-10-15 01:09:05 -07:00
Behdad Esfahbod bf8469be9a Attach CursivePositioning backwards, not forward
This is how Uniscribe does it.  So, adjust.  This is only relevant
to fonts that apply cursive positioning from a contextual lookup.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1181
2018-10-11 20:45:40 -04:00
Behdad Esfahbod bdb53ca24a [myanmar] Implement Zawgyi shaper
Enabled if script tag 'Qaag' is passed to HarfBuzz.  Disables mark
advance-zeroing and fallback mark-positioning.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1162
2018-10-11 20:20:29 -04:00
Behdad Esfahbod 788e147855 [test] Add test for USE indic3 2018-10-11 19:24:52 -04:00
David Corbett 65d01f7755 Test deprecated tag fallback in a font
The font supports the deprecated tag 'DHV ' instead of 'DIV '. dv is
mapped to 'DIV ' and 'DHV ', in that order. The test specifies
`--language=dv`, demonstrating that if a font does not support the first
OpenType tag mapped to a BCP 47 tag, it will fall back to the next tag.
2018-10-11 13:54:28 -04:00
Behdad Esfahbod 100e95f48e [trak] Add tests 2018-10-11 11:30:45 -04:00
Behdad Esfahbod 9c1bb81f5c [test/text-rendering-tests] Update from upstream 2018-10-08 16:11:14 -04:00
Behdad Esfahbod 2a5cb37fdb Revert "[morx] Fix MORX-35"
This reverts commit f62f6e90ad.
2018-10-07 20:37:15 -04:00
Behdad Esfahbod f62f6e90ad [morx] Fix MORX-35
Fixes https://github.com/harfbuzz/harfbuzz/issues/1224
2018-10-07 18:52:48 -04:00
Behdad Esfahbod c07b91b812 [test/text-rendering-tests] Update from upstream 2018-10-07 18:00:14 -04:00
Behdad Esfahbod 5a41cf6be6 [test/text-rendering-tests] Update from upstream 2018-10-05 18:09:12 +02:00
Behdad Esfahbod 55468ca01b [test/text-rendering-tests] Update from upstream 2018-10-04 12:19:30 +02:00
Behdad Esfahbod 6ff8a8a10b Minor 2018-10-04 12:09:45 +02:00
Behdad Esfahbod 14ff3cbe0f Apply morx if there's no GSUB! 2018-10-04 11:34:21 +02:00
Behdad Esfahbod 81f5eb09ec Add emoji test for recent work 2018-10-03 21:32:52 +02:00
Behdad Esfahbod 03fb6dd4c7 Rewrite grapheme-formation in terms of new work
Also, don't attach ZWNJ to previous cluster.  Closer to Unicode graphemes.
2018-10-03 21:11:40 +02:00
Behdad Esfahbod 3f1c741b7a [test] Split a test 2018-10-03 21:11:40 +02:00
Behdad Esfahbod df32eaae42 [indic] Disallow vowel mark combinations that spoof other vowel marks
Fixes https://github.com/harfbuzz/harfbuzz/issues/1019

New numbers:

BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%)
DEVANAGARI: 707261 out of 707394 tests passed. 133 failed (0.0188014%)
GUJARATI: 366353 out of 366457 tests passed. 104 failed (0.0283799%)
GURMUKHI: 60729 out of 60747 tests passed. 18 failed (0.0296311%)
KANNADA: 951300 out of 951913 tests passed. 613 failed (0.0643966%)
MALAYALAM: 1048136 out of 1048334 tests passed. 198 failed (0.0188871%)
ORIYA: 42327 out of 42329 tests passed. 2 failed (0.00472489%)
SINHALA: 271596 out of 271847 tests passed. 251 failed (0.0923313%)
TAMIL: 1091754 out of 1091754 tests passed. 0 failed (0%)
TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%)

Devanagari regressed because Uniscribe doesn't enforce the full set.

Tests added with the *-vowel-letters.txt files in tree and Noto fonts.
2018-10-03 15:53:28 +02:00
Behdad Esfahbod 75114e01d2 [use] Add Halant_Or_Vowel_Modifier category
Fixes https://github.com/harfbuzz/harfbuzz/issues/1102
2018-10-03 12:30:23 +02:00
Behdad Esfahbod 9f1dee32fb [tests] Allow test-runner to ignore shaping output
Fixes https://github.com/harfbuzz/harfbuzz/issues/1212
2018-10-02 18:56:20 +02:00
Behdad Esfahbod 729f634728 Disable joiner-skipping when looking back for base to attach mark to
Fixes https://github.com/harfbuzz/harfbuzz/issues/1189
2018-10-02 14:41:31 +02:00
Behdad Esfahbod ab4c37f73a [khmer] Add mark-ordering tests
Fixes https://github.com/harfbuzz/harfbuzz/issues/667
2018-10-01 19:35:48 +02:00
Behdad Esfahbod 02bebe42c1 [test/text-rendering-tests] Update from upstream 2018-09-28 10:01:59 -04:00
Behdad Esfahbod d5c509272f [dfont] Fix test expecatation and minor touch up
I have no way to authoritatively know, but looks like test font only has one
face.  So, adjust test expectation instead.
2018-09-11 17:18:21 +02:00
Ebrahim Byagowi 2b2ed1e536 [dfont] Add test 2018-09-11 16:47:21 +02:00
Behdad Esfahbod cfdea88475 [random] Switch to 32bit RNG 2018-09-11 10:57:48 +02:00
Behdad Esfahbod 80de4bcd26 Minor clean up of 'rand' patchset 2018-09-11 10:47:59 +02:00
David Corbett b545e27d88 Don't seed the RNG from the contents of the buffer 2018-09-11 10:47:59 +02:00
David Corbett 2de96e8468 Test 'rand' 2018-09-11 10:47:59 +02:00
Behdad Esfahbod 62fc54725a [ot-font] Fallback vertical advance to UPEM
Used to be ascent+descent.  Whatever. This is more convenient for
upcoming changes.
2018-08-25 23:15:52 -07:00
Behdad Esfahbod 1becabe06c [cmap] Use bsearch to find subtables 2018-08-25 15:37:56 -07:00
Behdad Esfahbod 92ba9905ca [indic] Allow double-halant in old-spec Devanagari
Fixes https://github.com/harfbuzz/harfbuzz/issues/1071
2018-07-31 15:19:32 -07:00
Behdad Esfahbod fe099a844b [test] Add Khmer tests, with NotoSansKhmer-Regular.ttf
Note that there's minor positioning differences, and ONE reordering
difference between what we get for these and what Uniscribe gets.
Probably same as what's described in commit message for
1a96cc825d
2018-07-31 14:20:31 -07:00
David Corbett 62fa7cd1cc Order Chakma split vowels in accordance with NFC
Fixes #1105.
2018-07-22 19:47:21 -07:00
Behdad Esfahbod 9940504e93 [indic] Adjust left-matra repositioning and Halant,ZWJ sequence
From the new code (first paragraph is from the OT Devanagari spec.):

  /*   o Reorder matras:
   *
   *     If a pre-base matra character had been reordered before applying basic
   *     features, the glyph can be moved closer to the main consonant based on
   *     whether half-forms had been formed. Actual position for the matra is
   *     defined as “after last standalone halant glyph, after initial matra
   *     position and before the main consonant”. If ZWJ or ZWNJ follow this
   *     halant, position is moved after it.
   *
   * IMPLEMENTATION NOTES:
   *
   * It looks like the last sentence is wrong.  Testing, with Windows 7 Uniscribe
   * and Devanagari shows that the behavior is best described as:
   *
   * "If ZWJ follows this halant, matra is NOT repositioned after this halant.
   *  If ZWNJ follows this halant, position is moved after it."
   *
   * Test case, with Adobe Devanagari or Nirmala UI:
   *
   *   U+091F,U+094D,U+200C,U+092F,U+093F
   *   (Matra moves to the middle, after ZWNJ.)
   *
   *   U+091F,U+094D,U+200D,U+092F,U+093F
   *   (Matra does NOT move, stays to the left.)

Fixes https://github.com/harfbuzz/harfbuzz/issues/1070

Test case added with Adobe Devanagari.
2018-07-03 14:34:38 +04:30
Behdad Esfahbod 4a115fe7fe [sinhala] Move reph to after post-consonants
Apparently this changed between Win 7 and Win 10.

Fixes https://github.com/harfbuzz/harfbuzz/issues/967

To be continued in https://github.com/harfbuzz/harfbuzz/issues/1044
2018-06-04 15:40:43 -07:00
Behdad Esfahbod 2eb9bbd986 [test/text-rendering-tests] Update from upstream 2018-05-22 18:31:30 -07:00
Behdad Esfahbod f673cfbd64 Support scripts that are written both LTR and RTL
Right now only Old Italic is marked as such.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1000
2018-05-07 14:12:17 -07:00
Ebrahim Byagowi 9925030f19 Don't decompose Bengali Rra and Rha
Fixes #779 and follow up to b01d9b3d90
2018-04-26 13:54:09 -07:00
Ebrahim Byagowi cab2c2c08c
Make more gen-* scripts py3 compatible (#940) 2018-03-29 12:48:47 +04:30
Behdad Esfahbod bcf578fefe [test] Add test suite for Brahmi Number Joiners
https://github.com/harfbuzz/harfbuzz/pull/660
2018-02-28 16:31:46 -08:00
Ebrahim Byagowi 5b9c234043 [CPAL] Refactor and address the reviews 2018-02-28 11:25:29 +03:30
Behdad Esfahbod e2d2d81984 Limit how much work sanitize() can do
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6022
2018-02-18 17:28:53 -08:00