ckitagawa
6bcf57eaa3
Simplify copy and add fuzzing coverage
2020-01-15 13:36:01 -08:00
ckitagawa
78b50a67be
Address initial comments
2020-01-15 13:36:01 -08:00
ckitagawa
43b6c865ae
[subset] Support sbix subsetting
2020-01-15 13:36:01 -08:00
Ebrahim Byagowi
79fed9a1e4
[ot-glyph] Add open/close callbacks
2020-01-14 17:34:59 +03:30
Ebrahim Byagowi
ec1fba1388
[ot-glyph] make hb_ot_glyph_decompose_funcs_t struct opaque
2020-01-14 15:55:23 +03:30
Ebrahim Byagowi
d7c3cb18ee
[ot-glyph] minor on tests
2020-01-13 18:17:21 +03:30
Ebrahim Byagowi
dc03a993d0
Fix collect lookups logic of FeatureTableSubstitution ( #2097 )
...
https://crbug.com/oss-fuzz/20036
2020-01-12 14:21:29 +03:30
Ebrahim Byagowi
a32ecc15ae
Fix collect lookups logic of FeatureVariationRecord
...
As "Offset to a feature table substitution table, from beginning of the FeatureVariations table."
from https://docs.microsoft.com/en-us/typography/opentype/spec/chapter2 the record should
match its sanitize logic not the reverse way.
Fixes https://crbug.com/oss-fuzz/20021 and https://crbug.com/oss-fuzz/20022
2020-01-11 15:37:24 +03:30
Qunxin Liu
0b39c48064
[subset] closure lookups for GSUB/GPOS
2020-01-10 13:11:06 -08:00
Ebrahim Byagowi
42f4f1ea50
[ot-glyph] Add tests for hb_ot_glyph_decompose
2020-01-11 00:33:31 +03:30
Ebrahim Byagowi
06a1fcb3b4
[ot-glyphs] fix the tests
2020-01-10 23:12:30 +03:30
Ebrahim Byagowi
fddf79fc37
[glyf] minor
2020-01-10 14:25:07 +03:30
Michiharu Ariza
d2ab1ec65b
fixes oss-fuzz 19978: Null-dereference READ ( #2091 )
2020-01-10 07:54:16 +03:30
Ebrahim Byagowi
257a197ae7
Fail serialize when map has incorrect value
...
fixes https://crbug.com/oss-fuzz/19956
am not super happy with the fix, guess we should do some check
before the memcpy anyway as @blueshade7 thinks also,
so let's have it or revert it when we have a better approach for the case.
2020-01-09 22:55:45 +03:30
Qunxin Liu
1db2c1d0da
fix for cmap4 and OS_2 subsetting: maximum character code allowed is 0xFFFF
2020-01-09 10:00:32 -08:00
Ebrahim Byagowi
8ed46c3678
[fuzz] minor, add another already fixed case
...
https://crbug.com/oss-fuzz/19907
2020-01-07 23:43:53 +03:30
Ebrahim Byagowi
341407f7a5
[fuzz] minor, upload another fixed case
...
https://crbug.com/oss-fuzz/19878
2020-01-07 09:10:24 +03:30
Ebrahim Byagowi
7950beecfc
[subset] Fix null pointer dereference in hvar/vvar subset ( #2085 )
...
Rest of the code assumes there is at least one subtable, lets return here if not.
* https://crbug.com/oss-fuzz/19827
* https://crbug.com/oss-fuzz/19847
2020-01-06 21:25:00 +03:30
Ebrahim Byagowi
33c3d63a0a
Merge pull request #1594 from harfbuzz/var-subset
...
Issue 1558: [subset] TrueType/CFF2 variable font
2019-12-31 13:52:50 +03:30
Evgeniy Reizner
b79ceac3c6
Prefer UINT_MAX instead of uint overflow.
...
Also, prefer HB_FEATURE_GLOBAL_START and HB_FEATURE_GLOBAL_END.
2019-12-15 11:46:05 -08:00
Ebrahim Byagowi
6f76c325e5
[test] Update 10.15 results
...
Turned out only SFNS, which wasn't available in 10.14 anyway, needed an update
See https://crbug.com/1005969#c37 also
2019-12-10 21:43:11 +03:30
Ebrahim Byagowi
2241a676ba
[test] Add macOS 10.15 related fonts
...
breaks the test and 10.15 bot, will add the fix in next commit, also adds a broken test for f47cbade1
2019-12-10 19:50:34 +03:30
Behdad Esfahbod
b1167d19e9
Fix!
2019-12-05 15:46:58 +00:00
Behdad Esfahbod
5ff410b493
Add files, oops
2019-12-05 15:37:56 +00:00
Behdad Esfahbod
2dc20e632e
Implement fallback vertical shaping from Firefox
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/355
2019-12-05 15:28:42 +00:00
blueshade7
ed94e41065
fixed api test test-ot-glyphname
2019-11-26 18:34:06 +00:00
blueshade7
7a4745ba8d
added api test test-ot-glyphname
2019-11-26 18:34:06 +00:00
blueshade7
ea8fdfa079
Merge branch 'master' into var-subset
2019-11-22 15:59:09 -08:00
Ebrahim Byagowi
64a45be519
[ubsan] Don't decrease pointer if match_glyph_data is null ( #2048 )
...
Similar to fix on https://github.com/harfbuzz/harfbuzz/pull/2022
Fixes https://crbug.com/1023070
2019-11-09 12:25:33 +03:30
Ebrahim Byagowi
84b86a12d9
[fuzz] Remove just added case
...
It didn't fail locally but on bots causing timeout, let remove for now.
2019-11-06 09:22:34 +03:30
Ebrahim Byagowi
a8f049c9a1
[fuzz] Upload testcase of https://crbug.com/oss-fuzz/18529
...
Apparently false alarm per last comment and was ok locally also but lets have it here also
2019-11-05 22:26:36 +03:30
Khaled Hosny
dd288840d6
[cmap] Check GID before adding ranges in format 4 & 12
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2031
2019-10-29 02:09:13 +02:00
Qunxin Liu
defe9b6da0
crash fix : Heap-buffer-overflow READ 2
...
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18513
2019-10-25 13:09:47 -07:00
Qunxin Liu
b2fcca6e14
fuzzer crash fix
...
https://oss-fuzz.com/testcase-detail/5643107869917184
2019-10-24 16:11:30 -07:00
Ebrahim Byagowi
9815ca0338
[ci] Use custom subset fuzzer timeout for failing sanitizer bots
2019-10-25 00:16:23 +03:30
Garret Rieger
95ab110cd9
Optimize intersects_array to fix fuzzer timeout.
2019-10-22 13:33:50 -07:00
Qunxin Liu
b33a0d628e
fuzzer crash fix: Null-dereference WRITE
...
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18363
2019-10-22 01:01:08 +03:30
Qunxin Liu
1f0a9d9be9
[subset] GPOS Lookup Type 2: PairPos
2019-10-21 12:35:28 -07:00
Ebrahim Byagowi
e766783152
[fuzz] Add https://crbug.com/oss-fuzz/17898 testcase
2019-10-21 22:17:06 +03:30
Qunxin Liu
b66094ada0
[subset] GSUB Lookup Type 6: ChainContextSubst
2019-10-18 16:52:55 -07:00
Garret Rieger
831daf4c76
Enforce HB_MAX_LANGSYS limit during layout subsetting.
2019-10-18 15:10:30 -07:00
Ebrahim Byagowi
453050ad30
Merge remote-tracking branch 'upstream/master' into var-subset
2019-10-13 08:45:29 +03:30
Ebrahim Byagowi
dc45f22521
[ot-metrics] Don't use mixed scaled and not scaled for generating extents
2019-10-08 23:27:39 +03:30
Ebrahim Byagowi
d73cdcf361
[ot-font] Apply font scaling before turning to int
2019-10-08 11:11:18 +03:30
Michiharu Ariza
b9ff43c162
Implement gvar table and variable glyf
...
Split from Ariza's "[subset] TrueType/CFF2 variable font" work on #1594
2019-10-06 08:58:40 +03:30
Ebrahim Byagowi
19d45dcab7
Merge remote-tracking branch 'upstream/master' into var-subset
2019-10-03 13:39:17 +03:30
Qunxin Liu
b0c3eb06b6
[subset] GPOS Lookup Type 3: CursivePos
2019-09-25 05:43:25 +09:00
Ebrahim Byagowi
0665dce116
[fuzzer] Don't process output in debug mode as it causes timeout
2019-09-21 17:36:33 +04:30
Qunxin Liu
bf66d1bf58
[subset] Add integration tests for cmap14
2019-09-20 07:55:11 +09:00
Evgeniy Reizner
7d4da8b862
Remove duplicated tests from test-ot-tag ( #1958 )
2019-09-06 12:24:32 -04:00
Behdad Esfahbod
52d19ba459
Minor
2019-09-04 11:28:40 -04:00
Ebrahim Byagowi
d3b984d379
Revert in-house pow10 ( d80a3ea
) and fix oss-fuzz/16922
...
Probably can be fixed but merging it was wrong so let's revert.
2019-09-02 18:28:03 +04:30
Ebrahim Byagowi
9ff32b79b3
Merge remote-tracking branch 'upstream/master' into glyf-rebase
2019-08-29 19:53:18 +04:30
Ebrahim Byagowi
28620310b8
[test] Avoid alloca use as clang complain
...
Fixes https://circleci.com/gh/harfbuzz/harfbuzz/108171 complain
2019-08-29 14:55:54 +04:30
Ebrahim Byagowi
875985cd48
[subset] Don't allow malicious fonts to insert unlimited table headers
...
Fixes https://crbug.com/oss-fuzz/16810
2019-08-29 14:51:22 +04:30
Ebrahim Byagowi
a0b4ac4dce
Turn 8 spaces to tab across the project
...
According to the current code style of the project
2019-08-27 02:40:41 +04:30
Ebrahim Byagowi
269a120f13
[subset] Raise the bar in new vs old table size
...
https://crbug.com/oss-fuzz/16740
This is actually an interesting thing that {h,v}mtx allocates as
much as a font pretends to have glyphs but the solution is not
that obvious as regular fonts can have less than actually containing
metrics in their {h,v}mtx. This change raises the bar to consider this
hmtx 4 byte for every glyph case.
Initially we wanted to just find things allocating crazy amount of
memory but having the assert has led to interesting findings also
so let's don't remove the assert and see what we can find elsewhere.
2019-08-25 20:37:00 +04:30
Ebrahim Byagowi
28aba780c4
[subset] Fix blob leak of _subset2 when returns early
...
Fixes https://crbug.com/oss-fuzz/16639
2019-08-24 16:11:21 +04:30
Behdad Esfahbod
163a66dc73
[test] Add test for aaa85931f3
2019-08-20 14:22:57 -07:00
Ebrahim Byagowi
d59d89b281
[test] Rebase 10.14 trak related test
2019-08-20 13:07:17 +04:30
Ebrahim Byagowi
37de38adea
Merge branch 'master' into remove-coretext-96dpi-assumption
2019-08-20 12:59:33 +04:30
Khaled Hosny
da5118da77
[ot-shape] Enable abvm/blwm features by default
...
Core Text seems to apply them to Latin text, but Uniscribe doesn’t.
See https://github.com/harfbuzz/harfbuzz/pull/1908#issuecomment-521819343
2019-08-16 02:17:32 +02:00
Khaled Hosny
2164bd6f29
[ot-shape] Enable dist feature by default ( #1908 )
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1907
2019-08-16 00:28:41 +02:00
Behdad Esfahbod
e56d4ff43b
Rename hb_ot_meta_get_entries() to +hb_ot_meta_get_entry_tags()
2019-08-13 21:02:47 -07:00
Ebrahim Byagowi
b31d627f15
Increase subset fuzzer timeout to 16s
...
To satisfy -valgrind and -tsan bots, very ugly
2019-08-11 23:34:48 +04:30
Qunxin Liu
321d5588d4
[subset] Add subsetting for GPOS Lookup Type 1: Single Adjustment Positioning Subtable
2019-08-06 14:06:35 -07:00
Qunxin Liu
37572882e7
[subset] cmap table to use _subset2 and new iterator frameworks
2019-08-05 11:26:34 -07:00
Michiharu Ariza
6b3e093911
Merge branch 'master' into var-subset
2019-07-31 16:04:48 -07:00
Ebrahim Byagowi
8c0a2e68ad
[fuzz] Add dummy call of the added APIs ( #1886 )
2019-07-30 13:16:15 +04:30
Ebrahim Byagowi
9f2b4956b4
[base] Add hb_ot_layout_get_baseline API
2019-07-30 04:42:51 +04:30
Ebrahim Byagowi
40a4b6ddbd
[var] Add a new API, hb_font_set_var_named_instance
2019-07-29 16:23:47 -07:00
Ebrahim Byagowi
b6a2281f1a
[meta] Make values match their enum type naming
2019-07-30 03:48:23 +04:30
Ebrahim Byagowi
20072a2eca
[metrics] Make values match their enum type naming
2019-07-30 03:48:23 +04:30
blueshade7
6e3bfecf35
Merge branch 'master' into var-subset
2019-07-29 12:25:43 -07:00
Ebrahim Byagowi
2c2a2b97db
[meta] Rename hb_ot_meta_t to hb_ot_meta_tag_t
2019-07-29 22:43:09 +04:30
Ebrahim Byagowi
e21bdf500d
Increase subset fuzzer timeout to 8s
...
Probably we should just remove timeout when running tsan and vaglrind here, the flaky bots
2019-07-28 22:59:09 +04:30
Ebrahim Byagowi
62932c14bd
[meta] Rename ot-metadata to ot-meta per review
2019-07-25 17:49:51 -07:00
Ebrahim Byagowi
bc65ebbce7
[meta] hb_ot_metadata_get_entries, tags iteration API
2019-07-25 17:49:51 -07:00
Ebrahim Byagowi
3ac03bd67c
[meta] New API, hb_ot_metadata_reference_entry for fetching meta entries
2019-07-25 17:49:51 -07:00
Ebrahim Byagowi
356b68a00a
[metrics] Add a test that actually practices variation ( #1858 )
2019-07-25 23:22:00 +04:30
blueshade7
5988ab8a4e
Merge branch 'master' into var-subset
2019-07-22 14:36:16 -07:00
Khaled Hosny
04c11a19b7
Merge pull request #1851 from khaledhosny/fix-sbix-extents
...
Fix sbix glyph extents
2019-07-22 16:44:47 +02:00
Ebrahim Byagowi
a51aa951b5
[metrics] Fix _get_variation API to works with actual coord values
2019-07-22 18:35:55 +04:30
Khaled Hosny
c9796d15e1
Fix sbix glyph extents
...
* The ‘height’ needs to be negated since the API returns “distance from
top to bottom side”.
* Similarly, the ‘y_offset‘ needs to be added to the height to get the
‘y_bearing’, since sbix’s offset is “the point in the glyph relative
to its lower-left corner which corresponds to the origin” while
‘y_bearing’ is the “top side of glyph from origin”.
With these changes the sbix glyph metrics return values similar to other
tables, as they were otherwise unusable.
2019-07-22 05:42:34 +02:00
Ebrahim Byagowi
bdfdac0f26
[ci][fuzzer] print valgrind failure if an error happened
2019-07-19 10:33:00 +04:30
Ebrahim Byagowi
87e628436e
Implement a simple API for fetching opentype metrics
...
Fixes https://github.com/harfbuzz/harfbuzz/pull/1432
2019-07-18 14:15:58 -07:00
blueshade7
4cba7bdae9
regenerate Confortaa subset test expected results
2019-07-18 14:03:33 -07:00
blueshade7
a76d8b0d55
Merge commit '504bb17287c978d60a4a515555852465319f74ed' into var-subset
2019-07-17 14:12:06 -07:00
Qunxin Liu
1da1b4dc94
[subset] For option "--unicodes", add support for "*" to retain all code points
2019-07-15 11:18:50 -07:00
blueshade7
386a4a64f5
regenerate subset api test result SourceHanSans-Regular.41,4C2E.retaingids.otf
2019-07-12 17:05:34 -07:00
blueshade7
670768e5b9
fix inc-bimap for subsetting VarStore with retain-gids
2019-07-12 16:14:23 -07:00
Ebrahim Byagowi
f8242b61ab
[fuzz] Increase subset runner timeout for tsan bot
...
Now is flaky let's just increase and maybe investigate later
2019-07-11 15:10:36 +04:30
Ebrahim Byagowi
b65bad18aa
[fuzz] Don't fail when blob is empty
...
And enable more tests able to trig the issue.
2019-07-11 14:31:55 +04:30
Ebrahim Byagowi
c85f624b51
Force blob generation and memory check in hb-subset-fuzzer
2019-07-10 23:38:07 +04:30
blueshade7
0eef8113d8
retain gids in HVAR so in sync with fontTools
...
regenerate Comfortaa subset test results
2019-07-09 11:43:59 -07:00
blueshade7
6e35668b45
fix var-subset build
2019-07-09 09:47:54 -07:00
blueshade7
8bf989ea70
update from master
2019-07-08 17:13:29 -07:00
Michiharu Ariza
5763a92749
Merge branch 'master' into var-subset
2019-07-01 15:17:19 -07:00
Behdad Esfahbod
f53590971c
[test] Make Unicode tests strict against internal UCD
...
https://github.com/harfbuzz/harfbuzz/pull/1799
2019-06-27 13:42:51 -07:00
David Corbett
d42264f151
Test at least one character per Unicode version
2019-06-27 13:38:03 -07:00
Michiharu Ariza
8341c0b304
add test case file
2019-06-27 08:43:31 -07:00
Michiharu Ariza
82d4bfb8f3
enable cff subset tests
...
add Unicode UCS-4 cmap
fix Unicode bits in OS/2
add Unicode cmap sub-table in SourceHanSans-Regular_subset.otf
regenerate cff subset test expected results
2019-06-14 11:08:59 -07:00
David Corbett
4f37c0db9b
Remove 'mym3'
2019-06-11 15:41:37 -07:00
Michiharu Ariza
90872a29ee
change assert(false) to failure
2019-06-11 12:42:28 -07:00
Michiharu Ariza
6f35cf7a63
regenerate SourceSerifVariable expected subset results
2019-06-06 09:15:34 -07:00
Michiharu Ariza
66361c72f6
restore gvar/MVAR/HVAR tables in subset tests
2019-06-05 14:51:04 -07:00
Michiharu Ariza
4ddab6facc
Merge branch 'master' into var-subset
2019-06-05 11:21:27 -07:00
Michiharu Ariza
65e66a2d37
added test data
2019-06-03 16:31:41 -07:00
Bruce Mitchener
5846884f86
test: Use nullptr in C++ code. ( #1744 )
2019-06-03 12:30:25 +04:30
Behdad Esfahbod
87dd4bff1c
[math] Rename HB_MATH_GLYPH_PART_FLAG_EXTENDER
...
To HB_OT_MATH_GLYPH_PART_FLAG_EXTENDER. Added a deprecated macro.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1734
2019-05-30 11:26:17 -04:00
Ebrahim Byagowi
8a13371847
[test] minor, fix copyright
...
nothing important, fixing a copy paste error inconsistency
2019-05-28 13:54:45 +04:30
Ebrahim Byagowi
13316ac5d4
[test] minor style improve
2019-05-28 13:48:39 +04:30
David Corbett
d64fb9db52
[use] Allow U+1A60 TAI THAM SIGN SAKOT after vowel
2019-05-27 13:14:03 -04:00
Qunxin Liu
e1a5ce6aa6
Fix fuzzer crash testcase
...
Add a check for stringOffSet(uint16) overflow,
return early if overflow happens
2019-05-24 15:26:20 -04:00
rsheeter
96de94768b
Merge pull request #1722 from googlefonts/glyf
...
[subset] Use iterators in glyf/loca subsetting
2019-05-24 11:22:41 -07:00
Rod Sheeter
e662532833
[subset] Cppcheck complaints
2019-05-24 10:39:56 -07:00
Qunxin Liu
993d81b9c5
[subset] Add one ttf file with fvar/STAT tables to integration test
...
Ignore gvar/MVAR/HVAR table
add support for --nameIDs=* option
2019-05-22 17:20:45 -07:00
Rod Sheeter
51a0129f73
[subset] Thar be comparison of integers of different signs
2019-05-21 20:12:19 -07:00
Garret Rieger
b928de91a7
[subset] Add test/subset/data/expected/layout to dist list.
2019-05-21 13:02:11 -07:00
Garret Rieger
c740c8636b
[subset] Add integration tests for SingleSubst.
2019-05-21 13:02:11 -07:00
Rod Sheeter
349d692b0e
[subset] Iter in and out for loca
2019-05-21 12:38:53 -07:00
Rod Sheeter
d1b12a5465
Merge branch 'master' of https://github.com/harfbuzz/harfbuzz into glyf
2019-05-20 21:29:54 -07:00
Rod Sheeter
5cedda5e4a
[subset] Fix null pointer deref, tidy up a bit
2019-05-20 21:25:42 -07:00
Rod Sheeter
8a84b540c7
[subset] Tests passing using iterator based glyf
2019-05-20 21:25:42 -07:00
Rod Sheeter
82bbec3063
Merge branch 'master' of https://github.com/harfbuzz/harfbuzz into glyf
2019-05-20 21:25:42 -07:00
rsheeter
3a4c928fcf
[subset] Fix glyf tests except hint stripping & local test asan
2019-05-20 21:25:42 -07:00
Garret Rieger
0ff3618c2d
[subset] Use hb_subset_input_t inside of subset_options_t so that input defaults are shared between the library and cli.
2019-05-20 13:35:46 -07:00
Garret Rieger
3be0ffe45d
[subset] Add drop tables to subset input.
2019-05-20 13:35:46 -07:00
Behdad Esfahbod
9ef241cd40
[test] Add one more
2019-05-20 11:38:02 -04:00
Behdad Esfahbod
3efb7af7e2
[STAT] Fix sanitize condition
...
Oops!
Fixes https://oss-fuzz.com/testcase-detail/5696825891225600
2019-05-20 11:37:16 -04:00
Garret Rieger
6555f20958
[subset] Truncate empty gids at the end in retain-gids mode.
2019-05-16 10:34:53 -07:00
David Corbett
125c45ed36
Convert Consonant_Initial_Postfixed to CONS_MED
2019-05-15 14:34:25 -07:00
David Corbett
99ca956c13
Fix record-test.sh on machines without sha1sum
2019-05-15 14:34:25 -07:00
Behdad Esfahbod
f39934983f
[ucdn] Fix Hangul composition
...
https://github.com/grigorig/ucdn/issues/23
2019-05-14 00:13:21 -07:00
Behdad Esfahbod
148d883680
[test] Don't call deprecated API
2019-05-13 14:34:53 -07:00
Ebrahim Byagowi
30c059a978
[test] minor, fix -Weverything bot
2019-05-11 18:48:41 -04:00
Ebrahim Byagowi
25531a3039
[test] minor
...
style fix and add return statement
2019-05-11 19:50:42 +00:00
Behdad Esfahbod
25a5b287f2
Fix sanitize fail of extension sublookups
...
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=960331
2019-05-10 16:03:20 -07:00
Garret Rieger
e8ef0e627c
[subset] WIP convert hdmx subsetting to use iterators.
2019-05-08 15:47:24 -07:00
Ebrahim Byagowi
df237d2fe7
[test] Add https://crbug.com/oss-fuzz/14641 testcase
...
As 503748d
fix
2019-05-08 14:17:14 -07:00
Behdad Esfahbod
5ac4ab6868
[subset] fix for name table serializing with new serializer machinery
2019-05-07 10:59:03 -07:00
Behdad Esfahbod
49b1c763a0
[test] Run "fonttools ttx" instead of "ttx"
2019-05-02 16:19:34 -07:00
Michiharu Ariza
1223a352b7
Merge branch 'master' into var-subset
2019-04-29 16:43:48 -07:00
Ebrahim Byagowi
6d6edc8b25
[valgrind] Use libtool and support run-subset-fuzzer-tests ( #1668 )
2019-04-28 11:54:07 -07:00
Ebrahim Byagowi
62c6e17072
[test] Add crbug.com/oss-fuzz/14474 testcase
...
Fixed at 6977a95f
2019-04-28 10:55:07 -07:00
Qunxin Liu
1ca4b5c770
[subset] Add unit test for str de-dup
...
Also move the implementation of some methods from the .cc to the .hh
2019-04-26 15:24:47 -07:00
Qunxin Liu
6faac8df83
[subset] Subsetting Name Table Step 4
...
Add unit test and integration test
2019-04-26 15:24:47 -07:00
Behdad Esfahbod
42f4bd6b80
Minor warning fix again
2019-04-18 19:06:07 -04:00
Michiharu Ariza
ba0386060d
fix oss-fuzz issue 14345
2019-04-18 18:18:05 -04:00
Michiharu Ariza
c87488b46d
Merge branch 'master' into var-subset
2019-04-17 12:07:15 -07:00
Michiharu Ariza
49fe81fdeb
updated api test results for HVAR/VVAR subset changes
2019-04-17 11:48:12 -07:00
David Corbett
6745a600bf
Comment out ot_languages where fallback suffices
2019-04-17 10:28:59 -04:00
Michiharu Ariza
6cde814a36
Merge branch 'master' into var-subset
2019-04-16 11:35:07 -07:00
Behdad Esfahbod
b7384c89e2
[fuzzing] Run valgrind with --leak-check=full
2019-04-15 16:53:10 -04:00
Behdad Esfahbod
3ff66c0029
[fuzzing] Fail if valgrind is requested but not found
2019-04-15 16:52:21 -04:00
Michiharu Ariza
3e524bf772
fix VarData serialize to remove unused data sets
...
add api test case for that
2019-04-12 12:48:48 -07:00
Michiharu Ariza
9e79285ef3
Merge branch 'master' into var-subset
2019-04-10 17:24:29 -07:00
Michiharu Ariza
ab9d30965d
Add tt var metrics test cases & bug fixes
2019-04-10 17:21:37 -07:00
Michiharu Ariza
e44b83aac0
replace test font SourceHanSans with its subet
2019-04-05 10:15:08 -07:00
Behdad Esfahbod
3bed03dc6a
[indic] Add back medial-consonant to grammar
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1592
2019-03-29 18:27:21 -07:00
Behdad Esfahbod
f8803fbace
[khmer] Add trailing Coeng to syllable grammar
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1541
2019-03-29 18:27:21 -07:00
Michiharu Ariza
0008963b28
add support of anchor point & SCALED/UNSCALED_COMPONENT_OFFSET
...
some code cleanup
2019-03-29 18:27:21 -07:00
Behdad Esfahbod
ea281aa8d0
Use class templates for Null objects
...
This allows partial-instantiating custom Null object for template Lookup<T>.
Before, this had to be handcoded per instantiation. Apparently I missed
adding one for AAT::ankr.lookupTable, so it was getting the wrong (generic)
null for Lookup object, which is wrong and unsafe.
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=944346
2019-03-29 18:27:21 -07:00
Michiharu Ariza
9c5d694af2
add HVAR & VVAR advance width api test
2019-03-29 18:27:21 -07:00
Michiharu Ariza
ae3db1f4e3
added api test for subset VVAR & bug fix
...
added a mod copy of SourceSerifVariable-Roman.ttf with VVAR as a test font
2019-03-29 18:27:08 -07:00
Michiharu Ariza
b3007ec209
regenerated expected full fonts data after fontTools bug 1550 fixed
2019-03-29 18:26:46 -07:00
Michiharu Ariza
fe5aa8b36c
added TT VF full font test & fixed bugs
...
updated CFF2 VF api test results too
2019-03-29 18:26:46 -07:00
Michiharu Ariza
2bd2e656f9
update CFF2 test results
2019-03-29 18:26:20 -07:00
Michiharu Ariza
212dcb758c
add api test cases for HVAR with index map (and fix)
2019-03-29 18:26:20 -07:00
Michiharu Ariza
dc10a7ef60
add gvar & HVAR retain-gids test cases
2019-03-29 18:26:20 -07:00
Michiharu Ariza
43420dfa96
fix test build
2019-03-29 18:26:20 -07:00
Michiharu Ariza
6ee71166b0
add api tests for subset gvar & HVAR; bug fixes
2019-03-29 18:26:20 -07:00
Michiharu Ariza
6e066464f0
replaced tt var api test with a composite glyph
...
for better coverage
2019-03-29 18:26:20 -07:00
Michiharu Ariza
511518c759
add api test for tt var advance widths
...
stripped HVAR from SourceSansVariable-Roman.abc.ttf so glyf gets parsed
2019-03-29 18:26:20 -07:00
Michiharu Ariza
139e87b56c
fix tt var extents & add test
2019-03-29 18:25:35 -07:00
Michiharu Ariza
9584b090bb
cff2 subset fuzzer issues ( #1619 )
...
* add check to FDArray::serialize
* add test files
* fix off by one
2019-03-29 18:25:21 -07:00
Ebrahim Byagowi
5bbe78a0f3
Allow zero length ranges in sanitization ( #1617 )
...
Fixes fvar table sanitization where there are no named instance
by allowing zero length ranges starting from Null() address.
Fixes #1607
2019-03-29 18:15:00 -07:00
Ebrahim Byagowi
9b5556d985
Add a macOS 10.14.3 fonts tests ( #1608 )
2019-03-29 18:15:00 -07:00
Garret Rieger
d0b6d539f6
Make hb_subset_input_glyph_set () actually do something.
2019-03-29 18:14:59 -07:00
Behdad Esfahbod
21bb80ebf2
[indic] Add back medial-consonant to grammar
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1592
2019-03-28 20:50:04 -07:00
Behdad Esfahbod
5ab6de7a6f
[khmer] Add trailing Coeng to syllable grammar
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1541
2019-03-28 20:23:12 -07:00
Behdad Esfahbod
ec2a5dc859
Use class templates for Null objects
...
This allows partial-instantiating custom Null object for template Lookup<T>.
Before, this had to be handcoded per instantiation. Apparently I missed
adding one for AAT::ankr.lookupTable, so it was getting the wrong (generic)
null for Lookup object, which is wrong and unsafe.
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=944346
2019-03-26 16:23:40 -07:00
Michiharu Ariza
bcb4e505d6
cff2 subset fuzzer issues ( #1619 )
...
* add check to FDArray::serialize
* add test files
* fix off by one
2019-03-15 13:46:25 -07:00
Ebrahim Byagowi
8aaab78efc
Allow zero length ranges in sanitization ( #1617 )
...
Fixes fvar table sanitization where there are no named instance
by allowing zero length ranges starting from Null() address.
Fixes #1607
2019-03-14 16:49:42 -07:00
Ebrahim Byagowi
8b6eb6cf46
Add a macOS 10.14.3 fonts tests ( #1608 )
2019-03-08 01:33:41 +03:30
Garret Rieger
4f37ab63de
Make hb_subset_input_glyph_set () actually do something.
2019-03-01 10:49:46 -08:00
Michiharu Ariza
a5e933eba0
Updated expected/cff-japanese fonts with retained FDs
2019-02-08 14:44:13 -08:00
Michiharu Ariza
e2856c2d85
retain FDSelect & FDArray with --retain-gids
...
so in sync with fonttools behavior
2019-02-07 15:32:32 -08:00
Michiharu Ariza
9328354a83
separate CFF from TrueType in full font tests
2019-02-04 11:28:15 -08:00
Michiharu Ariza
ec30a8a9ac
removed unused test data
2019-02-01 15:58:03 -08:00
Michiharu Ariza
c12862657f
added desubroutinize & retain-gids full test cases with CFF fonts
...
and CFF retain-gids fixes
2019-02-01 14:50:01 -08:00
Michiharu Ariza
f2908b4d8f
Implement subset --regain-gids option with CFF1/2
...
along with api tests & expected results
2019-01-31 14:16:37 -08:00
Garret Rieger
dc04261a5b
[subset] Update the subset fuzzer to determine which options to use based on data in the fuzzing test case.
...
Add support for toggling retain_gids.
2019-01-30 15:23:19 -08:00
Garret Rieger
e6ffcc5904
[subset] Add expected files for retain-gids integration tests.
2019-01-29 13:19:21 -08:00
Garret Rieger
a903f9c228
[subset] Add some subsetting integration tests covering retain gids.
2019-01-29 13:19:21 -08:00
Garret Rieger
ccc59dc612
[subset] Add unit test for glyf subsetting and retain gids.
2019-01-29 13:19:21 -08:00
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
Behdad Esfahbod
789396ed6b
Remove wrongly added files
2019-01-22 10:51:21 +01:00
Michiharu Ariza
28917e58f9
init interp_env_t::hintmask_size
...
fixes issue #1547
2019-01-18 09:43:51 -08:00
Behdad Esfahbod
6879efc2c1
[AAT] Fix anchor bound checking, again
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12532
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=922303
2019-01-17 14:08:02 -05: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
Behdad Esfahbod
91d774712f
[test] Add test for previous commit
2019-01-14 15:31:31 -05:00
Behdad Esfahbod
7a6686a589
[AAT] Fix mort ContextualSubtable offset access
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12312
2019-01-14 15:09:14 -05:00
Behdad Esfahbod
a3fa7d3336
[AAT] Fix ankr table access
...
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=918340
2019-01-14 14:37:36 -05:00
cclauss
26c5b54fb0
CircleCI: Test for Python 3 syntax errors and undefined names ( #1522 )
...
Catch missing imports and errors like #1520 and #1521
__E901,E999,F821,F822,F823__ are the "_showstopper_" [flake8](http://flake8.pycqa.org ) issues that can halt the runtime with a SyntaxError, NameError, etc. Most other flake8 issues are merely "style violations" -- useful for readability but they do not effect runtime safety.
* F821: undefined name `name`
* F822: undefined name `name` in `__all__`
* F823: local variable name referenced before assignment
* E901: SyntaxError or IndentationError
* E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree
2018-12-31 07:00:43 +03:30
Behdad Esfahbod
686e6f2e40
Fix automake warnings
...
[skip ci]
2018-12-30 11:28:06 -05:00
cclauss
b5c12b9f4d
print() is a function in Python 3 ( #1520 )
2018-12-30 15:37:28 +03:30
fanc999
3ee4ea9456
Fix build on older Visual Studio versions ( #1499 )
...
* src/hb-cff-interp-dict-common.hh: Use ull for unsigned int64_t
The llu suffix does not work for older Visual Studio versions
(pre-2013), but ull works for all the compilers that we attempt to
support.
* test/api: Fix build on pre-C99 compilers
Ensure variables are declared at the top of the block.
* src/hb-dsalgs.hh: Add specialization for hb_is_signed<> for __int8
Pre-Visual Studio 2010 does not consider __int8 (which is typedef'ed to
int8_t) to be equivilant to signed char, so the compiler cannot find the
corresponding hb_is_signed<> specialization that is needed.
The interesting thing is unsigned __int8 is considered to be equivilant
to unsigned char, so as the other types (short, int, long) that we look
for here, so only the specialization for __int8 is added here.
This will fix builds on Visual Studio 2008 at least.
2018-12-19 22:26:54 -05:00
Michiharu Ariza
798e98c47b
[CFF] bad offset in Index ( #1476 )
...
* Update hb-ot-cff-common.hh
* fix bug
* bummer fix wasn't hit. refix
* additional sanity check
* Added test cases for oss-fuzz issues 11805, 11806
2018-12-12 21:08:15 -05:00
Michiharu Ariza
bcb4ecaf68
[CFF] check out of range FD index ( #1477 )
...
* add fd index checks to subr subsetter
also added oss-fuzz test case
* undid SubrSubsetParam::is_valid
because already validated by SubrClosures.valid
2018-12-12 20:36:01 -05:00
Ebrahim Byagowi
a33f238f88
Merge pull request #1474 from fanc999/master.msvc
...
Few fixes for Visual Studio builds
2018-12-12 12:44:06 +03:30
Behdad Esfahbod
9844c880e2
Minor
2018-12-11 17:28:04 -05:00
Michiharu Ariza
2941208f1e
[CFF] oss-fuzz issue 11690 ASSERT: substr.offset >= opStart ( #1461 )
...
* fix oss-fuzz 11690: substr.offset >= opStart
detect recursive subroutine call & handle as error
* fix build failure
* add minimized test case for oss-fuzz 11690
* removed asserts
2018-12-11 15:21:24 -05:00
David Corbett
b225593d6b
Correct REPLACEMENT CHARACTER's code point to FFFD ( #1471 )
2018-12-11 13:19:17 -05:00
Chun-wei Fan
1e09add232
test/api: Fix building on pre-C99 compilers
...
Ensure variables are declared at the top of the block.
2018-12-12 01:32:01 +08:00
Michiharu Ariza
ae087d10c2
add minimized test case for oss-fuzz issue 11714
2018-12-05 21:47:34 -08:00
Ebrahim Byagowi
f95324a335
Merge pull request #1457 from harfbuzz/cff-varstore-sanitize
...
[CFF] oss-fuzz issue 11713 (CFF2VariationStore::serialize)
2018-12-06 08:33:44 +03:30
Michiharu Ariza
9d8f3b0dfb
add minimized test case for oss-fuzz issue 11713
2018-12-05 17:14:51 -08:00
Michiharu Ariza
34e3ef8ff3
Merge branch 'master' into cff-subr-sanitize
2018-12-05 15:50:05 -08:00
Michiharu Ariza
72d8f76368
add minimized test case for oss-fuzz issue 11691
2018-12-05 15:49:11 -08:00
Behdad Esfahbod
d9dabc00e9
Merge pull request #1454 from harfbuzz/cff-fixbcd
...
[CFF] fix oss-fuzz issue 11674: parse_bcd
2018-12-05 15:39:34 -08:00
Michiharu Ariza
6708c5595f
fix oss-fuzz issue 11675 (ASSERT: count <= str.len)
...
Also added an additional error check to avail ()
2018-12-05 12:51:18 -08:00
Michiharu Ariza
010e2ddb38
minimized test case for oss-fuzz issue 11674
2018-12-05 12:23:58 -08:00
Ebrahim Byagowi
79e7e3445e
Merge pull request #1449 from harfbuzz/cff-fixcharset
...
[CFF] fix for oss-fuzz 11657: Charset overrun
2018-12-05 13:25:18 +03:30
Ebrahim Byagowi
cf4b7db6b1
Merge pull request #1448 from harfbuzz/cff-leak
...
[CFF] fix leak: oss-fuzz 11662
2018-12-05 13:23:23 +03:30
Michiharu Ariza
32cc46c75a
[CFF] fix oss-fuzz issue 11670: NULL dereference ( #1450 )
...
* guard against no subr access
* code tweak
* add minimized testcase for oss-fuzz 11670 (Null deference)
2018-12-05 09:02:34 +03:30
Michiharu Ariza
78f639b8bf
added minimized testcase for oss-fuzz issue 11657
2018-12-04 14:17:03 -08:00
Michiharu Ariza
b61f74f69a
added minimized test case for oss-fuzz issue 11662
2018-12-04 10:30:35 -08:00
Behdad Esfahbod
c968869f21
Merge pull request #1441 from harfbuzz/cff-doublenum
...
use double as CFF Number implementation
2018-12-04 04:14:13 -05:00
Michiharu Ariza
c48f53d309
more double changes
2018-12-03 16:59:41 -08:00
Michiharu Ariza
9424e80526
added minimized test cases
2018-12-03 16:18:10 -08:00
Michiharu Ariza
5fff6ab002
additional precision made a difference in extents test
2018-12-03 16:06:58 -08:00
Ebrahim Byagowi
01f628cf55
[aat] Expose hb_aat_layout_has_tracking API
2018-12-03 22:27:26 +03:30
Behdad Esfahbod
84efe0438e
[aat] Fix division sign fallout
...
Happened after 11d2f49af8
since now nClasses is unsigned int...
2018-12-02 12:39:14 -05:00
Behdad Esfahbod
967a204ee9
Minor
2018-12-01 19:28:17 -05:00
Michiharu Ariza
9ae954f43a
Merge branch 'master' into cff-subset
2018-11-30 15:00:52 -08: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
Michiharu Ariza
32d291ae89
Merge branch 'master' into cff-subset
2018-11-28 16:27:45 -08:00
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