Commit Graph

10441 Commits

Author SHA1 Message Date
Ebrahim Byagowi
fddf79fc37 [glyf] minor 2020-01-10 14:25:07 +03:30
Ebrahim Byagowi
0b559d750f [ot-glyph] Improve API names 2020-01-10 14:25:07 +03:30
Ebrahim Byagowi
af08f388ab [ot-glyph] Support CFF1's seac 2020-01-10 14:25:07 +03:30
Ebrahim Byagowi
04ac7fb1c9 [ot-glyph] Add cff2 support 2020-01-10 14:25:07 +03:30
Ebrahim Byagowi
5cc09c462b [ot-glyph] Initial cff1 support 2020-01-10 14:25:07 +03:30
Ebrahim Byagowi
3dcba9f215 [ot-glyph] Redesign the API 2020-01-10 14:25:07 +03:30
Ebrahim Byagowi
b8b3ff1a02 [glyph] Don't copy, write directly into result 2020-01-10 14:25:07 +03:30
Ebrahim Byagowi
f883c31cce Implement glyph outline path API
Got help from https://github.com/opentypejs/opentype.js/blob/4e0bb99/src/tables/glyf.js#L222
2020-01-10 14:25:06 +03:30
Michiharu Ariza
d2ab1ec65b fixes oss-fuzz 19978: Null-dereference READ (#2091) 2020-01-10 07:54:16 +03:30
Ebrahim Byagowi
5e55a6d691
[subset/hvar] minor
not super excited about state of the code around, assuming was needed
so let's add this may unlikely check also.
2020-01-09 23:40:40 +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
8ed27757b1
Remove _POSIX_C_SOURCE definition from the project
Added fpr suncc support but apparently is causing more issues
even on suncc so let's see if we can go without it.

Fixes #2084
2020-01-06 19:01:13 +03:30
Ebrahim Byagowi
e7d1aeb610
[hvar] minor, fix unlikely statement 2020-01-06 12:48:22 +03:30
Ebrahim Byagowi
57b1534198
[glyf] minor, fix unlikely statements 2020-01-06 12:46:50 +03:30
Ebrahim Byagowi
9e48c6e9ef minor, use private API of hb_set_t where possible 2019-12-31 15:57:39 +03:30
Ebrahim Byagowi
ce114d6b27 minor, tweak spaces 2019-12-31 15:53:02 +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
Khaled Hosny
68c1798a67 [coretext] Use kCTFontOpenTypeFeatureTag
Instead of trying to map OpenType features to AAT feature selectors
which only works for a small subset of OpenType features, use the
simpler kCTFontOpenTypeFeatureTag with OpenType feature tags directly.

With this change, features like cvXX can be enabled in coretext shaper,
while they were previously ignored due to missing mapping.

This seems to work even with AAT fonts that don’t have OpenType layout
tables, which suggests that CoreText is doing the mapping itself in this
case.

kCTFontOpenTypeFeatureTag seems to have been introduced in macOS 10.10
and iOS 8.0, though, so its use is conditional on version check for now.
Not sure how to check iOS version, so I left this out.
2019-12-22 06:27:48 -08:00
Marcel Fabian Krüger
b28c282585 Check to avoid overflows 2019-12-16 18:08:22 -08:00
Marcel Fabian Krüger
d70afb1e5a Clamp max_ops to upper bound in hb-sanitize.hh 2019-12-16 18:08:22 -08:00
Behdad Esfahbod
aa43e183dd [perf Add texts/en-words.txt
$ cat docs/usermanual-*.xml src/hb*.cc src/hb*.{h,hh,cc} | sed 's/[^a-zA-Z ]/ /g' | tr ' ' '\n' | sort | uniq | grep . > perf/texts/en-words.txt
2019-12-16 17:48:07 -08:00
Ebrahim Byagowi
80762cc4d0
[ci] Speedup tsan bot
We don't expect fails thus expecting readable failure backtrace so let's speed it up instead
2019-12-15 23:21:10 +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
Evgeniy Reizner
b618e0ae13 Remove non-breaking spaces from comments.
`0xC2A0` was used, for some reasons. It's not really a problem, but Qt Creator
constatly trying to replace them with regular spaces, so I have to edit those
files separately.
2019-12-15 10:12:22 -08:00
Evgeniy Reizner
780d640c02 Remove unnecessary check in hb_buffer_t::set_masks.
Bounds are already checked by the caller.

Closes #2073
2019-12-15 10:08:38 -08:00
Evgeniy Reizner
34ed8e7218 Prefer _hb_glyph_info_is_unicode_mark where possible. 2019-12-13 08:55:34 +03:30
Ebrahim Byagowi
3e1a2632dc
[unscribe] fix leak issue
with no user_data provided, `free` will be called with `(0)` thus silently having a leak
2019-12-12 15:48:27 +03:30
Ebrahim Byagowi
e75d785b51
[doc] fix hb_blob_create call example
otherwise free(0) will be called that silently makes a leak
2019-12-12 15:42:37 +03:30
Daeren
4ef597e170 Fix unary minus operator applied to unsigned int
Applying unary minus operator to unsigned int causes the following error on MSVS: error C4146
This patch fixes the error.
2019-12-11 09:19:28 -06:00
Daeren
1770493cf5 Fix unary minus operator applied to unsigned int
Applying unary minus operator to unsigned int causes the following error on MSVS: error C4146
This patch fixes the error.
2019-12-11 09:19:19 -06:00
Behdad Esfahbod
a061e47fcc Change a few HB_INTERNAL static methods to static inline 2019-12-10 13:31:50 -06:00
Behdad Esfahbod
dd3972a364 [GSUB] Simplify Extension is_reverse()
We don't allow extension lookups to chain to another extension lookup.
Simplify code for that.
2019-12-10 13:28:39 -06:00
Behdad Esfahbod
858b627984 [machinery] Remove CastR<>() 2019-12-10 13:18:32 -06:00
Behdad Esfahbod
b84ceb2fcf [machinery] Remove CastP 2019-12-10 13:02:48 -06:00
Behdad Esfahbod
85574ec287 [machinery] Minor 2019-12-10 12:52:32 -06:00
Behdad Esfahbod
e101a67257 [perf] Add texts/fa-thelittleprince.txt 2019-12-10 12:46:14 -06:00
Behdad Esfahbod
2c781a6701 [perf] More rename 2019-12-10 12:43:42 -06:00
Behdad Esfahbod
d703392afe [perf] Adjust text/fa-monologue.txt 2019-12-10 12:42:29 -06:00
Behdad Esfahbod
19d1b9d4f3 [perf] Renames 2019-12-10 12:39:01 -06:00
Behdad Esfahbod
6a60ca117c [algs] Fold last other bsearch() in
Now truly have only one bsearch implementation.
2019-12-10 12:32:59 -06:00
Ebrahim Byagowi
53dc8d944f
Add initial shaping performance test and profiler 2019-12-10 21:53:30 +03:30
Behdad Esfahbod
39afe608b4 [algs] Fold one more custom bsearch() in
One more to go.
2019-12-10 12:13:40 -06:00
Behdad Esfahbod
b1dc676eaa [algs] Reduce one more bsearch() impl
Ouch, there were three more left.  Down one.  Two to go.
2019-12-10 12:13:40 -06: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
Ebrahim Byagowi
f3de3b6d3d
[ci] fix macOS 10.15 bot
Xcode 11.3.0 image is supposed to work per https://circleci.com/docs/2.0/testing-ios/
but isn't https://circleci.com/gh/harfbuzz/harfbuzz/118693 AFAICS

Let's try Xcode 11.2.1 image
2019-12-10 16:37:48 +03:30