Commit Graph

12367 Commits

Author SHA1 Message Date
Khaled Hosny c08e5d094a [hb-draw] Fix MSVC warning
warning C4305: 'initializing': truncation from 'double' to 'float'
2023-01-21 15:27:56 +02:00
Matthias Clasen 32f9b467d6
Merge pull request #4045 from harfbuzz/custom-palette-cairo
Custom palette cairo
2023-01-21 02:20:39 -05:00
Matthias Clasen 47baa1da6b [hb-cairo] Fixes for sweep gradients
Make reversed angles not infloop, and
cap the number of interval repetitions
at 1000.

Fixes: https://github.com/harfbuzz/harfbuzz/issues/4055
2023-01-20 23:38:22 -05:00
Behdad Esfahbod 7f59bed528 [hb-cairo] Round foreground color 2023-01-20 16:42:55 -07:00
Behdad Esfahbod 76b059cadb [hb-cairo] Simplify foreground color fetching 2023-01-20 16:41:47 -07:00
Behdad Esfahbod f70f7194de [hb-cairo] Remove unused prototype 2023-01-20 16:30:59 -07:00
Behdad Esfahbod 61719a8350 [hb-view] Support specifying color indices again 2023-01-20 15:52:09 -07:00
Qunxin Liu 30058f489a [instancer] trim .notdef outline data after recalc bounds
If outline data present, we use it to recalc bounds and then trim it
accordingly
2023-01-20 14:50:03 -08:00
Qunxin Liu 0de7f83a9f [instancer] update maxp table 2023-01-20 14:50:03 -08:00
Qunxin Liu 94c390d078 [instancer] update head table 2023-01-20 14:50:03 -08:00
Qunxin Liu 2ecb1c31e9 [instancer] always recalculate bounds when --instance option enabled
But don't recompile glyph bytes if pinned at default
2023-01-20 14:50:03 -08:00
Qunxin Liu 1f948e7fd5 [instancer] store recalculated head/maxp info in subset plan 2023-01-20 14:49:54 -08:00
Qunxin Liu 92122421c9 [instancer] update vhea/hhea tables 2023-01-20 14:48:53 -08:00
Behdad Esfahbod ab7c914425 [hb-cairo] Macro shuffle again 2023-01-20 15:43:01 -07:00
Behdad Esfahbod 4759932bcf [hb-cairo] Round colors 2023-01-20 15:33:38 -07:00
Behdad Esfahbod 876675e090 [hb-cairo] Macro shuffling 2023-01-20 15:31:43 -07:00
Behdad Esfahbod 68a73e436a [hb-cairo] Macro hygiene 2023-01-20 15:30:07 -07:00
Khaled Hosny fcb5111cc6 [doc] Fix gtk-doc warning 2023-01-21 00:24:50 +02:00
Behdad Esfahbod 574d9344dc [hb-cairo] Fix build with old cairo 2023-01-20 15:22:50 -07:00
Behdad Esfahbod 4f19c3b3be [hb-cairo] Move color-cache to scaled-font 2023-01-20 15:15:52 -07:00
Behdad Esfahbod beba43eebe [hb-cairo] Fix color cache on not-found 2023-01-20 15:02:24 -07:00
Behdad Esfahbod cc9b55c794 [hb-cairo] Add a color cache 2023-01-20 14:57:57 -07:00
Behdad Esfahbod eb00088bcf [paint] Docs 2023-01-20 13:57:39 -07:00
Behdad Esfahbod f21b15dcc3 [hb-view] Update to alternative cairo custom-palette API 2023-01-20 13:57:39 -07:00
Behdad Esfahbod 638e0ed4fd [paint] Overlay custom-palette on top of chosen palette
Got to agree this is more ergonomic.
2023-01-20 13:57:39 -07:00
Matthias Clasen b81db8d3d8 Avoid a compiler warning 2023-01-20 13:57:39 -07:00
Behdad Esfahbod 4fe6ece425 [cairo] Don't fallback to CPAL if cairo doesn't support custom palette 2023-01-20 13:57:39 -07:00
Matthias Clasen ab37ade7e4 Hook up custom palettes for cairo 2023-01-20 13:57:39 -07:00
Behdad Esfahbod edec8946ed New API: hb_ot_layout_script_select_language2()
Variant that outputs chosen_language.

Not sure why the original API didn't have this. The script
counterpart has.
2023-01-20 09:28:59 -07:00
Behdad Esfahbod 2fd8e36ea5 [layout] Fix return value of chosen_script when matching fails 2023-01-20 09:09:14 -07:00
Behdad Esfahbod d06976e68f [glyf] Add an edge-count limit
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55246
2023-01-20 08:21:43 -07:00
Behdad Esfahbod 0b32cf9023 [COLR] Rename a variable 2023-01-18 21:16:38 -07:00
Behdad Esfahbod 1d58c8fb0e [paint] Typo 2023-01-18 21:14:24 -07:00
Behdad Esfahbod 7aca3b5090 [COLRv1] Hook up custom palette colors 2023-01-18 21:01:44 -07:00
Behdad Esfahbod 53bd9039e7 [paint] Doc 2023-01-18 20:44:05 -07:00
Behdad Esfahbod 8afd3ccb10 [paint] Add HB_PAINT_PALETTE_INDEX_CUSTOM 2023-01-18 20:43:10 -07:00
Behdad Esfahbod 9a2f2b593e [font] Rename palette to palette_index 2023-01-18 20:39:36 -07:00
Behdad Esfahbod bd73314616 [paint] Add API for custom palettes 2023-01-18 20:37:21 -07:00
Behdad Esfahbod 13c70066de Shut up gcc 13 -Wdangling-reference
Fixes https://github.com/harfbuzz/harfbuzz/issues/4043
2023-01-18 17:29:26 -07:00
Behdad Esfahbod eed5d5efdd [VarComposite] Implement RESET_UNSPECIFIED_AXES
Fixes https://github.com/harfbuzz/boring-expansion-spec/issues/79
2023-01-18 14:13:12 -07:00
Behdad Esfahbod 4300a18b85 [arabic-fallback] Fix ligature code
Fixes https://github.com/harfbuzz/harfbuzz/issues/4042

This was broken in 20e9f0b.
2023-01-18 10:44:57 -07:00
Behdad Esfahbod 4d86c65c7a [hb-cairo] Fix linear-gradient reduce_anchors 2023-01-17 07:35:01 -07:00
Behdad Esfahbod 92d5ec2f16 [bit-page] Mark len() function static 2023-01-17 05:59:55 -07:00
Behdad Esfahbod f38e35ebc3 [cairo] Internal function renames 2023-01-16 18:07:39 -07:00
Behdad Esfahbod e4a41f5e16 [COLRv1] Implement recursive clip boxes
Tests need update.

hb-view test_glyphs-glyf_colr_1_variable.ttf -u f0c00
2023-01-16 16:27:04 -07:00
Behdad Esfahbod f11271cc03 [cairo] Version-check the variations code 2023-01-16 13:14:58 -07:00
Behdad Esfahbod a180ae43ce [bit-set] Use for loop instead of memset for page clear
Produces faster code.
2023-01-16 13:06:30 -07:00
Behdad Esfahbod ca1de29e0a [set] Adjust hb_set_copy() 2023-01-16 12:08:11 -07:00
Behdad Esfahbod b7f1c30c20 [map] Adjust hb_map_copy() 2023-01-16 12:07:15 -07:00
Behdad Esfahbod e0883d60e4 Whitespace 2023-01-16 12:02:21 -07:00
Behdad Esfahbod d769e8ae7c [hb-shape/view] Add --named-instance 2023-01-15 10:58:15 -07:00
Behdad Esfahbod 99838770ab [font] Add hb_font_get_var_named_instance()
Two new API:
+HB_FONT_NO_VAR_NAMED_INSTANCE
+hb_font_get_var_named_instance
2023-01-15 10:54:01 -07:00
Behdad Esfahbod d195e077e9 [font] Remember named_instance index
Specially, in hb_font_set_variations() default to the named_instance
for unspecified axes.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1883
2023-01-15 10:44:04 -07:00
Behdad Esfahbod d015e9016c [ms-features] Comment 2023-01-15 09:46:32 -07:00
Garret Rieger ea1ee0d4b6 [instance] drop and don't collect lookups from feature variations when fully instancing.
This previously incorrectly collected lookups that could be reached via feature variations that are dropped and not activated by the current instance position.
2023-01-14 18:04:24 -07:00
Behdad Esfahbod 81b942e363 [os2] Comment 2023-01-12 18:42:22 -07:00
Behdad Esfahbod 9fb9be8d43 [os2] Rewrite a loop 2023-01-12 18:37:45 -07:00
Behdad Esfahbod 082e5c5def [os2] Minor add a cast 2023-01-12 18:37:07 -07:00
Behdad Esfahbod 45fe897e89 [os2] Rename a couple of variables 2023-01-12 18:36:16 -07:00
Behdad Esfahbod 2dcbf3bd07 [os2] Inline a trivial function 2023-01-12 18:29:16 -07:00
Behdad Esfahbod 075fe33446 Enable -Wunsafe-loop-optimizations
I don't get any.
2023-01-12 17:14:42 -07:00
Behdad Esfahbod ed023f66df Enable -Wformat-signedness
And fix the codebase.
2023-01-12 17:04:24 -07:00
Behdad Esfahbod 7b5f0dd3a8 Move hb-ot-name-language-static.hh out of hb-static.cc
Since hb-static.cc is used by libharfbuzz-cairo as well.
2023-01-12 15:05:19 -07:00
Behdad Esfahbod 449f6df762 [mutex] Add constructor/destructor
Use in one place.
2023-01-12 14:52:00 -07:00
Behdad Esfahbod 8e71f7e8ed [subset-accelerator] Streamline constructor/destructor 2023-01-12 14:46:44 -07:00
Behdad Esfahbod c4c646280f [unicode] Adjust error message 2023-01-12 13:58:46 -07:00
Behdad Esfahbod 0d66529135 [bit-page] Minor simplify bit-page specification 2023-01-12 13:14:24 -07:00
Behdad Esfahbod 32866a331e [subset-input] Simplify destruction 2023-01-12 13:03:26 -07:00
Behdad Esfahbod d5b826fd09 [subset-input] Fix leak 2023-01-12 12:55:47 -07:00
Behdad Esfahbod c52810529e [subset-plan] Move construction to constructor 2023-01-12 12:53:46 -07:00
Behdad Esfahbod 26d69e059d [subset-input] Move constructor to .cc file 2023-01-12 12:46:44 -07:00
Behdad Esfahbod a916ad9ea9 [subset-input] Move initialization to constructor 2023-01-12 12:44:16 -07:00
Behdad Esfahbod 875f9f6f22 [subset-input] Use shared_ptr for sets 2023-01-12 12:37:48 -07:00
Behdad Esfahbod ef005bc82a [subset-input] Fix destruction
Ouch! Object was already destroyed at that point before.
2023-01-12 12:09:50 -07:00
Behdad Esfahbod c60c5995bb
Merge pull request #4028 from harfbuzz/mvar-instancing
[instancer] Add MVAR values to OS/2
2023-01-12 11:59:51 -07:00
Behdad Esfahbod cfb672f1e5 [glyf] Revert sign of advance widths back 2023-01-12 11:59:18 -07:00
Behdad Esfahbod 8c83de1396 [aat] Initialize values 2023-01-12 10:44:08 -07:00
Behdad Esfahbod ca19091549 [hhea/vhea] Add MVAR during instancing 2023-01-11 15:36:22 -07:00
Behdad Esfahbod f455000138 [post] Add MVAR to subsetting 2023-01-11 15:36:22 -07:00
Behdad Esfahbod 9dc3e785aa [instancer] Add MVAR values to OS/2 2023-01-11 15:36:22 -07:00
Behdad Esfahbod e78a68bf46 [subset-input] Don't RETAIN_GIDs in keep-everything 2023-01-11 15:34:11 -07:00
Behdad Esfahbod d675f0d4f2
Merge pull request #4023 from harfbuzz/aat-features2
[aat] Support feature ranges
2023-01-11 15:06:31 -07:00
Behdad Esfahbod 1135f0b8cc Another try at fixing arm build 2023-01-11 13:45:16 -07:00
Behdad Esfahbod 527e2d7ce2 [gobject] Add another value type hb_ot_var_axis_info 2023-01-11 13:41:44 -07:00
Behdad Esfahbod 8206569d63 [map] Remove hashmap create/destroy/vtable
Unused now.
2023-01-11 13:24:50 -07:00
Behdad Esfahbod 1426f1c8ea [subset-plan] Simplify name_table_overrides allocation 2023-01-11 13:23:34 -07:00
Behdad Esfahbod 5cab4a55d2 [subset-input] Simplify axes_location allocation 2023-01-11 13:21:57 -07:00
Behdad Esfahbod df721e0562 [gobject] Add draw/paint value types 2023-01-11 12:50:52 -07:00
Behdad Esfahbod 41352c08b8 [hmtx] Fix types 2023-01-11 12:42:14 -07:00
Behdad Esfahbod 4e7c803969 [subset-plan] Simplify name_table_overrides allocation 2023-01-11 12:38:26 -07:00
Behdad Esfahbod 65d3db375c [subset-plan] Simplify user_axes_location allocation 2023-01-11 12:36:54 -07:00
Behdad Esfahbod 60418fcb95 [subset-plan] Simplify axes_index_map allocation 2023-01-11 12:33:25 -07:00
Behdad Esfahbod 8265277c2e [subset-plan] Simplify axes_location allocation 2023-01-11 12:32:04 -07:00
Behdad Esfahbod d54902c659 [subset-plan] Simplify axes_old_index_tag_map allocation 2023-01-11 12:29:25 -07:00
Behdad Esfahbod 9f4c8fb700 [subset-plan] Minor move code around 2023-01-11 12:28:18 -07:00
Behdad Esfahbod a34a204bf7 [subset-plan] Simplify unicodes allocation 2023-01-11 12:27:19 -07:00
Behdad Esfahbod 75b33cb04b [subset-plan] Simplify hmtx_map / vmtx_map allocation 2023-01-11 12:24:35 -07:00
Behdad Esfahbod 33ce3a0d44 [subset] Minor adjust a couple types 2023-01-11 12:21:26 -07:00
Behdad Esfahbod 67eefebf8d [subset-plan] Simplify user_axes_location destruction 2023-01-11 11:44:09 -07:00
Behdad Esfahbod b2007abff7 [subset-plan] Simplify glyph_map_gsub allocation 2023-01-11 11:27:22 -07:00
Behdad Esfahbod bd4b040e7f [shape-plan] Simplify glyphs_requested allocation 2023-01-11 11:23:48 -07:00
Behdad Esfahbod c51d33685d [subset-plan] Simplify no_subset_tables allocation 2023-01-11 11:22:22 -07:00
Behdad Esfahbod 999be72135 [subset-plan] Simplify drop_tables allocation 2023-01-11 11:21:17 -07:00
Behdad Esfahbod b33eb9ecfc [subset-plan] Simplify layout_variation_idx_delta_map allocation 2023-01-11 11:20:04 -07:00
Behdad Esfahbod 9c45d98f73 [subset-plan] Simplify colr_palettes allocation 2023-01-11 11:16:18 -07:00
Behdad Esfahbod b74a265196 [subset-plan] Simplify colrv1_layers allocation 2023-01-11 11:15:15 -07:00
Behdad Esfahbod 89905368ca [subset-plan] Simplify sanitized_table_cache allocation 2023-01-11 11:13:49 -07:00
Behdad Esfahbod 9e24873c1e [subset-plan] Simplify gsub/gpos_feature_substitutes_map allocation 2023-01-11 11:12:07 -07:00
Behdad Esfahbod 01208c7c02 [subset-plan] Simplify gsub/gpos_feature_record_cond_idx_map allocation 2023-01-11 11:10:28 -07:00
Behdad Esfahbod 06039db080 [subset-plan] Simplify gsub_langsys and gpos_langsys allocation 2023-01-11 11:07:31 -07:00
Behdad Esfahbod 5fc91de2c0 [shape-plan] Simplify _glyphset_colred allocation 2023-01-11 11:04:17 -07:00
Behdad Esfahbod efafe7aa3b [subset-plan] Simplify _glyphset_mathed allocation 2023-01-11 11:03:19 -07:00
Behdad Esfahbod 113a1700df [subset-plan] Simplify _glyphset_gsub allocation 2023-01-11 11:01:11 -07:00
Behdad Esfahbod 4a9268f280 [subset-plan] Simplify _glyphset allocation 2023-01-11 11:00:02 -07:00
Behdad Esfahbod 1a00ab69ec [subset-plan] Simplify gsub_lookups and gpos_lookups allocation 2023-01-11 10:56:16 -07:00
Behdad Esfahbod 1a716bad03 [subset-plan] Simplify gsub_features and gpos_features allocation 2023-01-11 10:51:48 -07:00
Behdad Esfahbod 78aa9f1e9c [subset-plan] Simplify name_ids allocation 2023-01-11 10:47:40 -07:00
Behdad Esfahbod cfb48f91da [subset-plan] Simplify name_languages allocation 2023-01-11 10:45:26 -07:00
Behdad Esfahbod e4ca0fe436 [subset-plan] Simplify layout_features allocation 2023-01-11 10:43:01 -07:00
Behdad Esfahbod 4de66eec57 [subset-plan] Simplify layout_scripts allocation 2023-01-11 10:40:54 -07:00
Behdad Esfahbod 5f51dd276b [ft-colr] Minor use false instead of 0 2023-01-10 22:57:07 -07:00
Behdad Esfahbod f84a8e3289 [ft-colr] Comment 2023-01-10 22:43:42 -07:00
Behdad Esfahbod bf16dad55a [paint-extents] Return unbounded on memory allocation failure 2023-01-10 17:29:25 -07:00
Behdad Esfahbod 3e1c524e64 [bit-page] Comment 2023-01-10 17:18:34 -07:00
Behdad Esfahbod 626def03f8 [hmtx] Remove TODO items 2023-01-10 17:12:50 -07:00
Behdad Esfahbod adf0bd6dcd [test-map] Add a test 2023-01-10 17:05:19 -07:00
Behdad Esfahbod 4fd0354067 [font] Docs 2023-01-10 14:32:08 -07:00
Behdad Esfahbod bfd7548e24 [aat] Optimize feature-range application 2023-01-10 13:31:58 -07:00
Behdad Esfahbod dd42939e31 [aat] Reduce unsafe_to_concat calls 2023-01-10 13:23:19 -07:00
Behdad Esfahbod fecce62a45 [ft] Docs 2023-01-10 13:13:43 -07:00
Behdad Esfahbod cb509d9c89 [face] Docs 2023-01-10 13:11:48 -07:00
Behdad Esfahbod 8a2efbd8a1 [upem] More docs 2023-01-10 13:10:36 -07:00
Behdad Esfahbod ccffce58cc [scale] More docs 2023-01-10 13:09:30 -07:00
Behdad Esfahbod c4580d8670 [scale] More docs 2023-01-10 12:56:02 -07:00
Behdad Esfahbod f0e695a3a9 [scale] Comment 2023-01-10 12:55:17 -07:00
Behdad Esfahbod 8c47580ac8 [scale] Document 2023-01-10 12:53:54 -07:00
Behdad Esfahbod 8b17c6ca30 [aat] Comment 2023-01-10 12:17:38 -07:00
Behdad Esfahbod 0e11d317ee [aat] Optimize feature application 2023-01-10 12:16:04 -07:00
Behdad Esfahbod a70543daf3 [aat] Always unsafe-to-concat in state machine 2023-01-10 11:49:48 -07:00
Behdad Esfahbod 62383315fa [aat] Try fix leak on memory allocation failure 2023-01-10 11:29:04 -07:00
Behdad Esfahbod e122fe2acf [aat] Adjust last range
Otherwise a user cluster value of -1 would have tripped us.
2023-01-10 11:08:21 -07:00
Behdad Esfahbod e28c158c35 [aat] Run subtable across ranges if flags match 2023-01-10 11:08:21 -07:00
Behdad Esfahbod 2c9c49fd32 [aat] Support ranges in NonContextual subtable as well 2023-01-10 11:08:21 -07:00
Behdad Esfahbod c08308a83c [aat] Always generate a feature range 2023-01-10 11:08:21 -07:00
Behdad Esfahbod db4c874758 Revert "Revert "[aat] Support feature ranges""
This reverts commit 6a7a38521f.
2023-01-10 11:08:21 -07:00
Behdad Esfahbod 0728098e45 [Coverage] Speed up subset for too-large Coverage tables
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54980
2023-01-10 10:19:00 -07:00
Behdad Esfahbod 6a7a38521f Revert "[aat] Support feature ranges"
This reverts commit 1b7994cb3a.

Broke Zapfino with partial ligature disabling. Debugging.
2023-01-09 21:29:39 -07:00
Behdad Esfahbod adfd5dd7a9 Fix TINY build 2023-01-09 21:18:12 -07:00
Behdad Esfahbod 1b7994cb3a [aat] Support feature ranges
The hard way...

A bit uglier than I liked it to be, but is proper at least.

Fixes https://github.com/harfbuzz/harfbuzz/issues/4020
2023-01-09 21:16:20 -07:00
Behdad Esfahbod 622a686952 Revert "Revert "Revert "[aat] Allow disable feature ranges"""
This reverts commit 5202053c2c.
2023-01-09 21:16:20 -07:00
Behdad Esfahbod 5202053c2c Revert "Revert "[aat] Allow disable feature ranges""
This reverts commit 82b3e8af69.

Another try.

Fixes https://github.com/harfbuzz/harfbuzz/issues/4020
2023-01-09 17:59:09 -07:00
Behdad Esfahbod 82b3e8af69 Revert "[aat] Allow disable feature ranges"
This reverts commit 24a4d397ba.

This was broken.
2023-01-09 17:28:52 -07:00
Behdad Esfahbod 24a4d397ba [aat] Allow disable feature ranges
Fixes https://github.com/harfbuzz/harfbuzz/issues/4020

This is a hack.

To implement this properly we need to treat runs with different features
as independent runs for running the state machine, as the subtable flags
might be different. That would be a significant change to our internal
implementation.
2023-01-09 17:26:48 -07:00
Behdad Esfahbod 3ff713ab80 [coretext] Remove unused variable 2023-01-09 14:19:25 -07:00
Behdad Esfahbod 4148487556 [ft] Comment 2023-01-09 13:47:59 -07:00
Behdad Esfahbod d2aa2397ba Optimize non-slant extents code 2023-01-09 13:44:44 -07:00
Behdad Esfahbod 73dab7f784 [ft] Fix slanting code 2023-01-09 13:44:44 -07:00
Behdad Esfahbod 0275151490 [paint] Align deptch/edge count conditions across two backends 2023-01-09 12:27:09 -07:00
Behdad Esfahbod 839f4b6494 [ft] Fix slanting clip box 2023-01-09 12:01:46 -07:00
Behdad Esfahbod 30adbc22d9 hb-font: Fix scale_glyph_extents() again
And better fix this time.
2023-01-09 11:54:44 -07:00
Behdad Esfahbod 6c1a4bed4a Better rounding clip boxes 2023-01-09 11:37:39 -07:00
Behdad Esfahbod f46dcf147b [paint/COLR] Fix clip transform
Sigh. So complicated.
2023-01-08 14:35:42 -07:00
Behdad Esfahbod f283d4d366 [paint] Try to adjust both renderers to use same clip order 2023-01-08 12:42:34 -07:00
Behdad Esfahbod 5d94eb61b8 [hb-cairo] Fix hb_cairo_glyphs_from_buffer() when utf8 missing
Fixes https://github.com/harfbuzz/harfbuzz/issues/4016
2023-01-08 11:56:01 -07:00
Behdad Esfahbod 5bd6fc1ace Comment 2023-01-07 16:32:50 -07:00
Behdad Esfahbod 432afa9dff [paint] Fix paint_extents usage
It was broken all this time :(.

The two backends do this slightly differently...
2023-01-07 16:25:30 -07:00
Behdad Esfahbod a63d329261 [paint-extents] Simplify transform_extents 2023-01-07 16:05:24 -07:00
Behdad Esfahbod e062f98260 [paint-extents] Fix transform_extents
Ouch!
2023-01-07 16:02:21 -07:00
Behdad Esfahbod 823a9b18d9 [cairo] Return COMPOSITE mode CLEAR for unknown values
As per the spec.
2023-01-07 14:50:30 -07:00
Behdad Esfahbod 65c3cde5da [COLRv1] Fix scale variation 2023-01-07 14:29:18 -07:00
Behdad Esfahbod 004cdc10f8 [open-type] More tweaks to fixed types
Add set_int().
2023-01-07 14:27:15 -07:00
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 dfd9bf8a50 [COLRv1] Fix a couple of missing to_float() calls
Ouch!
2023-01-07 14:05:02 -07:00
Behdad Esfahbod d045de78c1 [paint] Optimize PAINT_COMPOSITE
At the start of each paint call the current group is clear.
So we don't need to start a new group for the backdrop paint.

A paint composite really needs one group push, not two.
2023-01-07 13:56:43 -07:00
Behdad Esfahbod 5ea5aacda9 [ft-colr] Adjust for FreeType master color-stop change
Part of https://github.com/harfbuzz/harfbuzz/issues/4013
2023-01-07 13:25:11 -07:00
Qunxin Liu 1eb5445e75 [subset] Fix issue in hb_subset_input_override_name_table()
If a nameRecord with provided name_id/platform_id/encoding_id/lang_id
is not retained after subsetting, create it and insert it to
the name table. So we need to check against retained name_records
rather than name_record in the original name table.
2023-01-06 19:17:14 -07:00
Khaled Hosny 02948263f9 [subset] Document that CFF2 instancing is now supported 2023-01-06 13:58:29 -07:00
Behdad Esfahbod 82c863a50b Whitespace 2023-01-06 12:51:58 -07:00
Behdad Esfahbod 76879c5763 [subset-cff] Minor hide num_coords again 2023-01-06 11:47:04 -07:00
Behdad Esfahbod 576b36a31b [cff2] Undo rounding change in draw() codepath 2023-01-06 11:40:21 -07:00
Behdad Esfahbod 4867e0b192 [subset-cff2] Faster instancing
Instantiate blends during parsing. Dedups code as well.
2023-01-06 11:39:13 -07:00
Behdad Esfahbod 3757baab2c [subset-cff2] Better condition
Previous condition wasn't working for dropping axes.
2023-01-06 11:23:37 -07:00
Behdad Esfahbod acc6c13f05 [subset-cff] Round numbers when instancing 2023-01-06 11:20:41 -07:00
Behdad Esfahbod 2f174f23c3 Rename 2023-01-06 11:11:14 -07:00
Behdad Esfahbod a59116cd8f Oops 2023-01-06 11:09:09 -07:00
Behdad Esfahbod c632a164b9 [subset/cff] Support instancing 2023-01-06 11:01:25 -07:00
Behdad Esfahbod 5153218b41 [set] Add hb_set_is_inverted() 2023-01-05 16:26:41 -07:00
Behdad Esfahbod e8ac0ef2fd [face] Minor rename a variable 2023-01-05 16:20:59 -07:00
Behdad Esfahbod 14ff747024 [set] Add tests for inverted set range iteration 2023-01-05 16:20:59 -07:00
Matthias Clasen 381ac2fd78 docs: Fix a typo 2023-01-05 15:55:57 -07:00
Behdad Esfahbod 2764a61691 Revert "[gsubgpos] Use swap instead of move"
This reverts commit 8a17cc4ecf.
2023-01-05 15:14:54 -07:00
Behdad Esfahbod 167b7c6046 Revert "[gsubgpos] Reduce hb_set_t allocations"
This reverts commit 0b7f6d6cf0.

Not much benefit as the main allocations come from other places.
2023-01-05 14:48:20 -07:00
Behdad Esfahbod 3947cedd09 Revert "[gsubgpos] Cache pos_glyphs allocation in closure"
This reverts commit 3961cc46bf.

This was wrong...
2023-01-05 14:47:47 -07:00
Behdad Esfahbod 097fb8b8aa [priority-queue] Use resize instead of shrink
To avoid reallocation of smaller array. Not desirable here.
2023-01-05 14:38:10 -07:00
Behdad Esfahbod 8a17cc4ecf [gsubgpos] Use swap instead of move
Move is wrong when we want to reuse the object.
2023-01-05 14:15:38 -07:00
Behdad Esfahbod 4401dd2482 [gsubgpos] Minor use ->clear() directly 2023-01-05 14:13:57 -07:00
Behdad Esfahbod 207ae11ab9 [set] Allocate first page exact 2023-01-05 14:08:47 -07:00
Behdad Esfahbod 0b7f6d6cf0 [gsubgpos] Reduce hb_set_t allocations 2023-01-05 14:05:11 -07:00
Behdad Esfahbod 3961cc46bf [gsubgpos] Cache pos_glyphs allocation in closure
Saves some 3% in Gulzar-Regular subsetting.
2023-01-05 13:58:57 -07:00
Behdad Esfahbod a90f149e1b [gsubgpos] Minor drop an allocation 2023-01-05 13:52:11 -07:00