Commit Graph

142 Commits

Author SHA1 Message Date
Ebrahim Byagowi 5c03fbe7e0 [glyf] do a phantom only iteration when possible 2020-02-18 14:08:37 +03:30
Ebrahim Byagowi 11f3fca01d [glyf/gvar] Remove need of passing end points vector around 2020-02-18 14:08:37 +03:30
Ebrahim Byagowi 0f2c2d989b [glyf] Push consumer machine one more level further 2020-02-18 14:08:37 +03:30
Ebrahim Byagowi 11f5f7c59c [glyf] Adopt a state machine like style for the path builder
Toward making glyf path reader alloc free at least on gvar absence.
2020-02-18 00:49:09 +03:30
Ebrahim Byagowi 60f8f384f9 [glyf] Switch to ttf-parser's glyf to path algorithm
It consumes each point at a time and doesn't need to know contour size before hand
2020-02-18 00:49:09 +03:30
ariza 9c6499d9f4 rewrite read_points() to take lambda & consts args
replacing awkward x/y_setter_t structs
2020-02-16 00:56:31 -08:00
Ebrahim Byagowi 3a98c7fae1 [glyf] Skip empty contours
As https://savannah.nongnu.org/bugs/index.php?57701
2020-02-06 11:35:48 +03:30
Ebrahim Byagowi 7f9b2228a6 [glyf] minor
Improve using https://developer.blender.org/diffusion/B/browse/master/source/blender/blenlib/intern/freetypefont.c$572
2020-02-04 23:05:49 +03:30
Qunxin Liu 0216a96b0f [subset] Fix simple glyph trim_padding in glyf table
Detail: when numOfContours = 1 and flag = 0x31
xCoordinates and yCoordinates would be empty
2020-01-31 10:49:44 -08:00
Ebrahim Byagowi d106900bfd [draw][glyf] Implement quadratic to cubic call translation 2020-01-28 15:27:27 +03:30
Ebrahim Byagowi 74fdcdcac8 [draw] Rename conic_to to quadratic_to 2020-01-28 13:45:22 +03:30
Ebrahim Byagowi ac81e94016 Rename hb_outline_decompose to hb_font_draw_glyph and hb_outline_decompose_funcs_t to hb_draw_funcs_t 2020-01-28 13:24:49 +03:30
Ebrahim Byagowi 981125aa2a Rename hb_ot_glyph_* to hb_outline_* 2020-01-27 23:43:54 +03:30
Ebrahim Byagowi 02f324c949 [ot-glyph] remove open callback
Apparently it wasn't requested actually and can be detected easily
as paths are opened usually when move command is issued anyway.
2020-01-23 15:12:15 +03:30
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 42f4f1ea50 [ot-glyph] Add tests for hb_ot_glyph_decompose 2020-01-11 00:33:31 +03:30
Ebrahim Byagowi 6118523502 [ot-glyph] move glyph decompose logic of glyf to itself
One less vector allocation yet isn't zero alloc yet
which needs more work.
2020-01-10 21:08:26 +03:30
Ebrahim Byagowi fddf79fc37 [glyf] minor 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 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