Commit Graph

42 Commits

Author SHA1 Message Date
Behdad Esfahbod c8486b6301 [open-type] Add to_int to fixed types
To make sure we don't accidentally forget to_float().
As we did recently in COLRv1 code.
2023-01-07 14:15:17 -07:00
Behdad Esfahbod a0f999cd95 [config] Rename HB_NO_VARIATIONS2 to HB_NO_AVAR2 2022-10-29 11:13:40 -06:00
Behdad Esfahbod ee18ae3b76 [avar] Minor move code around 2022-08-02 12:56:06 -06:00
Behdad Esfahbod 32c85b8c8c [avar2] Fix mapping when coords length don't match
Ouch.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49407
2022-07-23 10:50:26 -06:00
Behdad Esfahbod 06c3ec0a19 [avar2] Minor sanitize rewrite 2022-07-23 10:45:28 -06:00
Behdad Esfahbod 17863bd16b [config/avar2] add HB_NO_VARIATIONS2 2022-07-22 22:38:08 -06:00
Behdad Esfahbod 5a9c7930ef Add HB_NO_BEYOND_64K 2022-07-22 21:33:31 -06:00
Behdad Esfahbod c76fd3c5f9 [avar2] Add link to "Spec". 2022-07-22 15:29:57 -06:00
Behdad Esfahbod edca52c3b6 [avar2] Use a varStore cache 2022-07-22 15:29:57 -06:00
Behdad Esfahbod 59f8afa73e [avar2] Remove XXX item 2022-07-22 15:29:57 -06:00
Behdad Esfahbod d6c4f757a4 [avar2] Clamp out values 2022-07-22 15:29:57 -06:00
Behdad Esfahbod d0e2ad9297 [avar] Pre-alloc vector 2022-07-22 15:29:57 -06:00
Behdad Esfahbod 2a877b554a [avar2] First stab at mapping v2 values 2022-07-22 15:29:57 -06:00
Behdad Esfahbod c3eb6713e9 [avar2] Add v2 structure and sanitize 2022-07-22 15:29:57 -06:00
Qunxin Liu 2a4773e43d add option "--instance", store axes_location in subset_plan and drop all
variation tables when all axes are pinned at default
2022-07-18 14:59:07 -06:00
Behdad Esfahbod 5639e253f9 Add Array16Of<> 2021-03-31 16:04:43 -06:00
Ebrahim Byagowi 818f109bde Use float in avar calculation instead ints and checking their overflows 2020-04-17 00:53:39 +04:30
Ebrahim Byagowi 9ffa50fe5d Add an appropriate fallback to hb_int_mul_overflows 2020-04-17 00:38:38 +04:30
Ebrahim Byagowi 96d792ae80 [avar] Prevent mul overflow
Fixes https://crbug.com/oss-fuzz/21350
2020-03-26 15:01:14 +00:00
Ebrahim Byagowi 0d729b4b72 [avar] Fix out-of-bound read when input is bigger than all the coords
'i' shouldn't become equal to array's length which as the increament
is happened at end of the loop, if the input is bigger than all the
table coords, it will be equal to array's length.

Fixes https://crbug.com/oss-fuzz/21092
2020-03-07 13:20:41 +03:30
Ebrahim Byagowi ce114d6b27 minor, tweak spaces 2019-12-31 15:53:02 +03: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
Behdad Esfahbod 5ee1e451cf Minor touch-up for recent change 2019-08-19 14:23:17 -07:00
Ebrahim Byagowi 3348992844 [avar] Implement inverse map, unmap 2019-08-19 14:22:15 -07:00
Behdad Esfahbod 41248cce0e Remove MIN/MAX in favor of hb_min/hb_max 2019-05-07 20:54:31 -07:00
Behdad Esfahbod ef00654962 Convert tag enum class consts to static constexpr
Part of https://github.com/harfbuzz/harfbuzz/issues/1553
2019-01-22 12:17:26 +01:00
Ebrahim Byagowi b2ebaa9afa Remove redundant 'inline' from methods (#1483) 2018-12-16 14:08:10 -05:00
Behdad Esfahbod 5c4fead734 Convert "static const hb_tag_t" constants to enum 2018-11-29 15:05:47 -05:00
Behdad Esfahbod 1d66cdcf77 Better fix for MSVC 2008
Follow up on b4c6113032

Fixes https://github.com/harfbuzz/harfbuzz/issues/1374
2018-11-10 19:57:51 -05:00
Behdad Esfahbod 9507b05a7a Simplify sanitize->check_array()
Fix a bug in CBDT sanitize, and redundant check in avar.
2018-09-10 23:18:23 +02:00
Behdad Esfahbod bc485a9812 Port some VAR arrays to UnsizedArrayOf<>
Fix avar sanitize().
2018-09-10 23:08:18 +02:00
Behdad Esfahbod c77ae40852 Rename hb-*private.hh to hb-*.hh
Sorry for the noise, downstream custom builders.  Please adjust.
2018-08-25 22:36:36 -07:00
Behdad Esfahbod 63f57f4dab Mark more unsized array's as arrayZ 2018-05-08 16:56:11 -07:00
Behdad Esfahbod 5b93f69169 Rename some X-terminated members to Z-terminated
X-terminated means don't access this, it's not located correctly.
Z-terminated means this is a C array with no bound checking.
2018-05-02 14:59:14 -04:00
Ebrahim Byagowi a02c3ee70f Add or update tables specifications links 2018-04-12 13:44:32 +04:30
Behdad Esfahbod 6b19178ee3 Prefix int types with HB
Such a headache that Windows defines UINT8, ...; Just prefix it.
2018-01-10 03:07:30 +01:00
Behdad Esfahbod 6f335ed1e5 Replace USHORT/SHORT/ULONG/etc with UINT16/INT16/UINT32/etc 2017-11-14 21:06:07 -08:00
Behdad Esfahbod 5dc30451b8 Two fixes to avar mapping
1. Handle segment with two entries correctly,

2. Fix rounding math.  Ouch!

Fixes https://github.com/behdad/harfbuzz/issues/521
2017-08-07 21:37:07 -07:00
Behdad Esfahbod 7b399f73ef [var] Start adding HVAR/VVAR 2017-01-23 11:41:43 -08:00
Behdad Esfahbod d6bdbbca30 [var] Remove HB_OT_TAG_fvar/avar
We're not going to define public macros for tags for tables.
There's little use to those and they are implementation detail.
2017-01-22 20:16:51 -08:00
Behdad Esfahbod a484e237b1 [var] Implement 'avar' table mapping
Untested!
2017-01-22 19:41:33 -08:00
Behdad Esfahbod 8a577aaa0d [var] Stub implementation of avar table 2017-01-22 18:22:40 -08:00