Commit Graph

122 Commits

Author SHA1 Message Date
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
Ebrahim Byagowi 57b1534198
[glyf] minor, fix unlikely statements 2020-01-06 12:46:50 +03:30
Ebrahim Byagowi d67ba649a3 Rename hb_array_t::in_range to hb_array_t::check_range 2019-12-06 02:27:23 +00:00
Ebrahim Byagowi 3958f6fb23 Add in_range in hb_bytes_t to merge range_checker_t with it 2019-10-29 23:16:05 +03:30
Ebrahim Byagowi aa3831e295 [glyf] Use contour_bounds_t::empty to simplify get_extents logic 2019-10-29 22:34:14 +03:30
Ebrahim Byagowi d59ae5836d [glyf] Refactor contour_bounds_t use to make its fields protected 2019-10-29 22:34:14 +03:30
Ebrahim Byagowi 0efbda7a40 Remove contour_point_t so we won't need to zero its unused var 2019-10-29 21:03:26 +03:30
Ebrahim Byagowi b0b8551afc [glyf] Use range_checker_t in composite_iter_t 2019-10-13 07:17:03 +03:30
Ebrahim Byagowi 06e35ce052 [glyf] minor 2019-10-13 07:17:03 +03:30
Ebrahim Byagowi d13bb4bd94 [glyf] other cleanups 2019-10-13 07:17:03 +03:30
Ebrahim Byagowi e7aa8c5d22 [glyf] Introduce glyf::Glyph, a hb_bytes_t/GlyphHeader pair 2019-10-13 07:17:03 +03:30
Ebrahim Byagowi 546ffc9faf [glyf] minor 2019-10-13 07:17:03 +03:30
Ebrahim Byagowi 4299ea266e [glyf] Move get_contour_points to GlyphHeader 2019-10-13 07:17:03 +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 6961766db2 [glyf] fix scaling direction 2019-10-08 16:26:48 +03:30
Ebrahim Byagowi b2628f1a3e [glyf] Move glyph bytes drop hints logic to GlyphHeader 2019-10-08 15:40:29 +03:30
Ebrahim Byagowi 1fb9c3b646 [glyf] Implement depth limit for add_gid_and_children 2019-10-08 15:40:29 +03:30
Ebrahim Byagowi be0eddd418 [glyf] Move add_gid_and_children to glyf table 2019-10-08 15:40:29 +03:30
Ebrahim Byagowi ad86806dcb [glyf] Move subset related methods inside GlyphHeader 2019-10-08 15:40:29 +03:30
Ebrahim Byagowi 7839e23558 [glyf] minor 2019-10-08 15:40:29 +03:30
Ebrahim Byagowi cbefbb2439 [glyf] Move padding removal logic to GlyphHeader 2019-10-08 15:40:29 +03:30
Ebrahim Byagowi 1ab8f9aa7a [glyf] minor 2019-10-08 15:40:29 +03:30
Ebrahim Byagowi 13fb5612ad [glyf] Aggregate get_offsets uses 2019-10-08 15:40:29 +03:30
Ebrahim Byagowi d73cdcf361 [ot-font] Apply font scaling before turning to int 2019-10-08 11:11:18 +03:30
Ebrahim Byagowi f2339964b7 [glyf] minor, remove GlyphHeader::simple_* helpers 2019-10-06 16:58:38 +03:30
Ebrahim Byagowi 2d7ca6a76a [glyf] Move get_instruction_length inside GlyphHeader struct 2019-10-06 16:58:38 +03:30
Ebrahim Byagowi 50aef4d7f8 [glyf] cleanup 2019-10-06 16:58:38 +03:30
Ebrahim Byagowi ee3f4630d7 [glyf] Remove get_composite_iter and refactor bytes_for_glyph for shape uses 2019-10-06 16:58:38 +03:30
Ebrahim Byagowi 8378ab96e2
[glyf] Rewrite composite iterator to new iterators convention 2019-10-06 13:49:45 +03:30
Ebrahim Byagowi 5752863640 [glyf][gvar] Make HB_NO_VAR buildable 2019-10-06 08:59:12 +03:30
Ebrahim Byagowi b3afa81644 [glyf] Use common convention of other tables access, format 2019-10-06 08:59:12 +03:30
Ebrahim Byagowi 88bd342c0f [glyf] minor 2019-10-06 08:59:12 +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 cbc0646a6c Minor, normalize for each calls 2019-09-24 12:09:20 +03:30
Ebrahim Byagowi 6e42a418c8 Minor, turn more of hb_apply to for each 2019-09-21 17:52:01 +04:30
Ebrahim Byagowi d512087e4d Rename GlyphID to HBGlyphID
Avoid collision with macOS's ATSUnicodeTypes.h GlyphID
2019-09-14 11:55:53 +04:30
Ebrahim Byagowi dce42cef2b [glyf] Move GlyphHeader::from_bytes to hb_bytes_t, introduce .as<T> () 2019-08-27 17:38:09 +04:30
Ebrahim Byagowi 6e82d59b4f
[glyf] Revert the way indexToLocFormat is set 2019-08-27 12:33:42 +04:30
Ebrahim Byagowi 2f8e823331
[glyf] minor 2019-08-25 12:37:40 +04:30
Ebrahim Byagowi 07e467a30e [glyf] Move GlyphHeader size checking to a static method 2019-08-25 01:10:37 +04:30
Ebrahim Byagowi 139d14dc89 [glyf] Move GlyphHeader related logics to its, making its fields protected 2019-08-24 17:50:25 +04:30
Ebrahim Byagowi d57819cbdb [glyf] format source 2019-08-24 17:00:54 +04:30
Ebrahim Byagowi 2aef3013f3 [subset] Consider instruction length place itself
Now fixes https://crbug.com/oss-fuzz/16639 completely
2019-08-24 16:11:21 +04:30
Ebrahim Byagowi 385e436692 Minor, fix gcc maybe-uninitialized complain
I guess all of its field will be initialized anyway here but lets make it more defensive
2019-06-07 10:49:57 -07:00
rsheeter 49879adbfc [subset] Correct calculation of max offset; fixes bug where loca would erroneously be short 2019-05-31 19:43:30 -07:00
Rod Sheeter 1197bef26c [subset] Per code review, use hb_array to avoid duplicated type name 2019-05-24 10:52:49 -07:00
Rod Sheeter 13b3cd307e [subset] Address @behdad review feedback 2019-05-24 10:10:12 -07:00
Rod Sheeter 58ce477ac1 [subset] Report failure more often 2019-05-21 20:22:40 -07:00
Rod Sheeter 14e3b0cf41 [subset] Code review feedback 2019-05-21 20:09:36 -07:00