Commit Graph

50 Commits

Author SHA1 Message Date
Ebrahim Byagowi 3f806673fb
Apply some minor improves on CFFIndex 2019-06-29 00:00:00 +04:30
Ebrahim Byagowi ddd29e5594
minor, reuse StructAtOffset logic in StructAtOffsetOrNull 2019-06-28 23:44:14 +04:30
Michiharu Ariza f3ee2bd020 add ops & methods to hb_bimap_t making it more like hb_map_t
moved has () to hb_bimap_t from hb_inc_bimap_t
moved identity () to hb_inc_bimap_t
removed forward()
2019-06-25 13:52:40 -07:00
Michiharu Ariza 094966959f add hb_bimap_t, subclass hb_inc_bimap_t replacing CFF::remap_t 2019-06-25 13:52:40 -07:00
Ebrahim Byagowi 9b853f755d
[cff] Use switch on multi-format structs (#1762) 2019-06-09 11:49:25 +04:30
Michiharu Ariza 12febd68d6 added parentheses to FDSelect::sanitize as well 2019-06-03 16:40:03 -07:00
Behdad Esfahbod 0ca7ad4352 [cff] Fix unlikely invocations 2019-05-20 11:39:07 -04:00
Behdad Esfahbod 0a01deb76f One more warning fix
No idea where these appear from...
2019-05-13 18:04:09 -07:00
Behdad Esfahbod 2fb3a8327a [vector] Simplify arrayZ
Was turned into function when we had static ones and wanted to be
move-safe...  Not the case anymore.
2019-05-10 18:43:48 -07:00
Maks Naumov a96d003d6e Fix MSVC C4138 warning (#1657) 2019-04-05 02:29:56 -07:00
Behdad Esfahbod b986c6a321 [C++11] Remove IntType::set() in favor of operator= 2019-03-29 20:21:21 -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
Behdad Esfahbod 0d2727f4fe
fix FDSelect fuzzing bug (#1539)
Rewrote struct FDSelect3_4.ranges as ArrayOf
Updated FDSelect3_4::sanitize () to call ranges.sanitize ()
nRanges now a function to return a reference to ranges.len
2019-01-14 18:23:17 -08:00
Behdad Esfahbod fa333e34d6 [vector] Remove static_array
Was good idea, but with C++ types with constructor/destructor, was getting in
the way as compiler was destructing those items where it was not desired.
Since C++ does not allow zero-sized arrays, just remove it...
2018-12-27 17:56:22 -05:00
Michiharu Ariza 29f0b6bce7 CFF renaming (#1507)
* reimplement ByteStr as byte_str_t based on hb_ubytes_t

Unuse start_embed<ByteStr>
Also renamed SubByteStr to byte_str_ref_t
More renaming to come

* substr renamed to str_ref in line with its type byte_str_ref_t

* uncamelize non-table struct names

* uncamelized non-struct types OpCode etc

* add byte_str_t copy ctor

* test

* test2

* undo tests

* fix bot failure

* undo the previous change

* fixed tabs, added inline

* Revert "fixed tabs, added inline"

This reverts commit 21163c30e9.

* fix tabs
2018-12-22 10:47:04 -05:00
Behdad Esfahbod 474a12058d [array/vector] Rename len to length 2018-12-21 18:53:01 -05:00
Ebrahim Byagowi e412008599 Remove redundant void from C++ sources (#1486) 2018-12-17 13:01:01 -05:00
Ebrahim Byagowi b2ebaa9afa Remove redundant 'inline' from methods (#1483) 2018-12-16 14:08:10 -05:00
Behdad Esfahbod 829b56b1a2 Whitespace 2018-12-15 16:20:13 -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 333586245c minimize use of assert: removed or changed to error handling (#1467) 2018-12-11 15:20:20 -05:00
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
Behdad Esfahbod e8860fdcaa Fix more warning 2018-11-30 23:38:24 -05:00
Behdad Esfahbod af349ee348 Fix warning 2018-11-30 23:20:50 -05:00
Behdad Esfahbod 825df6dbc7 [CFF] Change spaces to tabs 2018-11-30 23:04:59 -05:00
Behdad Esfahbod 592f39b3c4 [CFF] Whitespace 2018-11-30 22:54:57 -05:00
Michiharu Ariza 9d0231cfe7 fixed a subset bug when no font dicts reduce 2018-11-15 15:39:43 -08:00
Michiharu Ariza ecdb77f0ae fixed CFF1 subset of std encoding & non-std charset combo 2018-11-15 10:54:15 -08:00
Michiharu Ariza 892ab37e7c Merge branch 'master' into cff-subset 2018-11-14 13:54:07 -08:00
Michiharu Ariza 0dfa584cb4 changed Adobe company name 2018-11-12 08:47:07 -08:00
Michiharu Ariza 417963dd9f got rid of Remap::fullset() as incorrect, redundant, inefficient 2018-11-08 09:01:20 -08:00
Michiharu Ariza 0996c0ff62 implented no-desubroutinize with CFF2 along with API test
replaced AdobeVFPrototype.abc.otf with a hinted (maually) & subroutinized copy
replaced expected results as well
2018-11-07 14:48:37 -08:00
Michiharu Ariza b721fdae66 fixed leaks in CFF subr subset 2018-11-04 16:19:15 -08:00
Michiharu Ariza 191ca0f15b CFF1 no-desubr fixes
make sure charstring/subrs not ending with endchar/return handled correctly
if no local subrs, skip serializing Subrs op in Private
misc fixes
2018-11-03 22:42:22 -07:00
Michiharu Ariza 34b06d994a fixed FDSelect size calcluation 2018-11-02 16:40:20 -07:00
Michiharu Ariza 1bc710a8c9 added CFF1 desubr api test cases & bug fixes 2018-11-02 15:28:01 -07:00
Michiharu Ariza d56e338a90 CFF1 no-desubroutinize + no-hinting
no-desubroutinize option is disabled for now
code cleanup (esp. CFF1 width handling)
bug fixes & renaming
2018-10-31 22:30:34 -07:00
Michiharu Ariza 960267fc43 fix build attempt ^4 2018-10-22 16:37:39 -07:00
Michiharu Ariza b11032afae fix build attempt ^2 2018-10-22 15:52:37 -07:00
Michiharu Ariza 3d3df5575c fix build attempt 2018-10-22 15:23:39 -07:00
Michiharu Ariza 35b64dfb57 silence & fix new warnings 2018-10-02 14:13:36 -07:00
Michiharu Ariza ab16b24cc9 tweaked get_fd fix 2018-09-26 18:51:36 -07:00
Michiharu Ariza dac70f252a Added CFF1 J font subset to api test
Also fixed FDSelect3_4::get_fd
Fixed test_subset_cff1_strip_hints (wrong font names!)
2018-09-26 16:30:26 -07:00
Michiharu Ariza 0f159a38a6 fixed serialize_fdselect_3_4 2018-09-12 16:08:54 -07:00
Michiharu Ariza f45ac6296a fixed name mixup in Remap::reset
it was causing inconsistent Strings Index subset results
2018-09-11 22:41:50 -07:00
Michiharu Ariza 5b453f77f8 fixed off-by-one error with offSize 2018-09-11 16:20:39 -07:00
Michiharu Ariza 1666b89e30 subset CFF1 String Index
Repurposed FDMap as Remap then subclassed for remapping SIDs
misc code cleanup
2018-09-10 16:00:20 -07:00
Michiharu Ariza aca73c9df2 subset CFF1 Encoding & Charset
fixed misc Charset bugs
added source file hb-ot-cff1.table.cc
renamed things for clarity & consistency
2018-09-06 17:28:15 -07:00
Michiharu Ariza 1d1afddfd2 corrected preprocessor guards 2018-08-29 13:36:39 -07:00
Michiharu Ariza 8af9690ac7 Merge branch 'master' into cff-subset
Renamed cff "private" source/headers without the suffix
2018-08-29 13:26:17 -07:00