Behdad Esfahbod
7c74fc9631
[CFF] Remove unused member single_val
2023-02-19 14:43:31 -07:00
Matthias Clasen
9be01b6bff
[paint] Pass hb_paint_context_t along
...
Replace the font argument with a hb_paint_context_t
that carries the font, the palette index and the
foreground color.
The hb_font_paint_glyph() api now takes the palette
index and the foreground color as extra arguments.
Update all callers and regenerate test results.
2022-12-23 13:37:59 -07:00
Matthias Clasen
3e39dd492b
cff2: Implement paint_glyph
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
32dd9810cf
[subset-cff1] Cache glyph-to-sid-map in the accelerator
...
Benchmark Time CPU Time Old Time New CPU Old CPU New
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
BM_subset/subset_codepoints/SourceHanSans-Regular_subset.otf/nohinting/10 -0.0841 -0.0843 0 0 0 0
BM_subset/subset_codepoints/SourceHanSans-Regular_subset.otf/nohinting/64 -0.1305 -0.1305 0 0 0 0
BM_subset/subset_codepoints/SourceHanSans-Regular_subset.otf/nohinting/512 -0.1398 -0.1401 1 1 1 1
BM_subset/subset_codepoints/SourceHanSans-Regular_subset.otf/nohinting/4096 +0.0382 +0.0380 9 9 9 9
BM_subset/subset_codepoints/SourceHanSans-Regular_subset.otf/nohinting/10000 +0.0213 +0.0211 11 11 11 11
2022-11-30 14:00:33 -07:00
Garret Rieger
8d5c899b0f
[subset] In cff accelerator hold reference to CFF table instead of the whole font.
2022-11-25 20:53:20 +00:00
Behdad Esfahbod
59c45f6deb
Use hb_memcpy instead of memcpy consistently
2022-11-22 12:54:50 -07:00
Behdad Esfahbod
bff78e6515
[cff] Convert interpretation environment to use constructor
2022-05-10 16:50:38 -06:00
Behdad Esfahbod
8aa54aaca2
[cff] Replace byte_str_t with hb_bytes_t use
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
fe1d85a55a
[cff] Remove custom byte_str_t impl
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
370bec938b
[draw] Rename internal draw_session_t to hb_draw_session_t
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
c681331c3f
[draw] Rename internal draw_helper_t to draw_session_t
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
dd7b6e2c3f
[draw] Remove EXPERIMENTAL_API tag
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
a8b7f18804
[cff] Initialize accelerator members
2022-01-21 07:38:33 -07:00
Behdad Esfahbod
ac1bb3e39e
[machinery] Move accelerators to constructor/destructor
2022-01-20 12:10:05 -07:00
Behdad Esfahbod
e062376ef1
[machinery] Make accelerator lazy-loader call Xinit/Xfini
...
Instead of init/fini. To isolate those functions. To be turned into
constructor/destructors, ideally one per commit (after some SFINAE
foo.)
2022-01-19 17:09:34 -07:00
Behdad Esfahbod
4eb6e6ea16
[cff] Remove some more fini_deep()
2022-01-18 12:07:05 -07:00
Garret Rieger
7f358a55f4
[ENOMEM] unchecked resize in CFF2.
2020-07-31 02:04:06 +04:30
Ebrahim Byagowi
2be859d289
minor, replace nullptr checks with implicit ones
2020-04-21 00:30:34 +04:30
Ebrahim Byagowi
2dda6dd744
minor, tweak spacing
...
turn 8 spaces to tab, add space before Null/Crap
2020-04-20 16:18:29 +04:30
Ebrahim Byagowi
755a77d660
Move outline draw API behind HB_EXPERIMENTAL_API directive
2020-03-13 08:25:53 +03:30
ariza
0b29053864
removed unused code
2020-03-05 10:11:23 +03:30
ariza
e8f010d793
removed unused code & data; rename
2020-03-05 10:11:23 +03:30
ariza
c05458ec7f
update cff & cff2 subsetters
2020-03-05 01:22:51 +03:30
Ebrahim Byagowi
9fe0dc3464
[draw] Pass draw_helper_t itself around instead recreating it
...
Specially helpful if we want to change the design
2020-02-26 17:40:46 +03:30
Ebrahim Byagowi
25707e37e3
[cff] minor
2020-02-05 00:27:28 +03:30
ckitagawa
0d61926ca7
[subset] Keep head when no glyf table
2020-02-04 23:31:33 +03:30
ariza
2792fb8ba1
first rewrite of cff/cff2 _subset with _subset2
2020-02-04 21:20:43 +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
ec1fba1388
[ot-glyph] make hb_ot_glyph_decompose_funcs_t struct opaque
2020-01-14 15:55:23 +03:30
Ebrahim Byagowi
084a8182fb
[ot-glyphs] Move CFF glyph decompose logic to their tables
...
Thus making path decompose zero alloc on CFF/CFF2
2020-01-10 22:56:43 +03:30
Ebrahim Byagowi
04ac7fb1c9
[ot-glyph] Add cff2 support
2020-01-10 14:25:07 +03:30
Ebrahim Byagowi
9b853f755d
[cff] Use switch on multi-format structs ( #1762 )
2019-06-09 11:49:25 +04:30
Michiharu Ariza
be82a2fc0c
parenthesized cond-exp in CFF2FDSelect::sanitize
2019-06-03 15:52:23 -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
Behdad Esfahbod
6d042a18e7
[CFF] Use enum for tableTag
2019-01-22 10:51:20 +01:00
Behdad Esfahbod
b1152d5e66
Use NNOffsetTo<>
2019-01-17 18:17:04 -05:00
Michiharu Ariza
09fa536d89
fix lealk with cff2::accelerator_templ_t::topDict ( #1517 )
2018-12-27 11:33:09 -05:00
Behdad Esfahbod
d25a2f1496
Fix a few warnings
2018-12-23 20:34:24 -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
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
Ebrahim Byagowi
f95324a335
Merge pull request #1457 from harfbuzz/cff-varstore-sanitize
...
[CFF] oss-fuzz issue 11713 (CFF2VariationStore::serialize)
2018-12-06 08:33:44 +03:30
Michiharu Ariza
c31092ab34
sanitize variationStore in CFF2 against its size
2018-12-05 17:04:55 -08:00
Michiharu Ariza
6dcfda92c1
sanitize CFF1 & CFF2 global subrs
2018-12-05 15:07:46 -08:00
Michiharu Ariza
6ce8d10b45
add unlikely to error handling
2018-12-04 10:39:17 -08:00
Michiharu Ariza
0b952e6026
more leak fixes
2018-12-04 10:22:35 -08: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
0dfa584cb4
changed Adobe company name
2018-11-12 08:47:07 -08:00