Commit Graph

15560 Commits

Author SHA1 Message Date
Behdad Esfahbod 73046d53e5 [shaper] Disable dumber shaper if no AAT 2022-11-24 13:49:29 -07:00
Behdad Esfahbod e9f964c01a [ot-face] Declare more tables as core 2022-11-24 13:38:53 -07:00
Behdad Esfahbod 5bc27a128d [machinery] Comment 2022-11-24 13:30:12 -07:00
Behdad Esfahbod d21bfb0861 [normalize] Remove an unlikely
Keep unlikely for truely unlikely scenarios.
2022-11-24 13:14:05 -07:00
Behdad Esfahbod 9e1239f443 [config] Define HB_NO_VERTICAL in HB_LEAN and as such in HB_TINY 2022-11-24 13:00:47 -07:00
Behdad Esfahbod 6f133ccfde [glyf] Fix build with HB_NO_VERTICAL 2022-11-24 12:59:55 -07:00
Behdad Esfahbod 76420ef769 [machine.rl] Remove unlikely from what happens 1/16 of the time 2022-11-24 12:52:15 -07:00
Behdad Esfahbod 1248574454 [config] Disable Zawgyi shaper in HB_MINI/HB_TINY 2022-11-24 12:46:04 -07:00
Behdad Esfahbod 05aa084e67 [PairPos] Another attempt at fixing unsafe-to-break with ValueFormat2
Fixes https://github.com/harfbuzz/harfbuzz/issues/3888#issuecomment-1326781116

Test:
$ hb-shape XBRoya34.ttf  ' الأ' --show-flags --script=arab
2022-11-24 12:14:09 -07:00
Behdad Esfahbod 54ae3345b2 [buffer] Improve documentation of hb_buffer_add_codepoints()
Fixes https://github.com/harfbuzz/harfbuzz/issues/3889
2022-11-24 12:00:36 -07:00
Behdad Esfahbod a4a4078632
Merge pull request #3893 from googlefonts/preprocess_test
[subset] Fix testing of preprocess
2022-11-24 11:56:58 -07:00
Behdad Esfahbod 0c70bc7f32 [skippy-iter] Fix two logic errors
First, a signed underflow.

Second, a wrong condition.

Both were introduced in 42681bdb55
2022-11-24 11:48:48 -07:00
Garret Rieger 64e8707eca [subset] don't use hb repacker when generating test files from fonttools. 2022-11-24 18:24:50 +00:00
Behdad Esfahbod 3b43096ef3 [buffer] Whitespace 2022-11-23 22:04:02 -07:00
Behdad Esfahbod 094f80738a [buffer] Handle null buffer in set_message_func 2022-11-23 22:03:26 -07:00
Behdad Esfahbod 1fa64c0c23 [gsubgpos] Conditionalize skippy on unsafe-to-concat 2022-11-23 21:38:51 -07:00
Behdad Esfahbod 42681bdb55 [gsubgpos] No logic-change minor rewrite 2022-11-23 21:36:43 -07:00
Behdad Esfahbod c15efdec49 [gsubgpos] Comment 2022-11-23 21:14:28 -07:00
Behdad Esfahbod 7ec1c41a55 [gsubgpos] Skippy-iter: Prefer correctness to performance
Prefer unsafe-to-concat correctness, over performance.
2022-11-23 21:12:41 -07:00
Behdad Esfahbod b6df347137 [perf] Add Hindi test to benchmark-shape 2022-11-23 20:15:16 -07:00
Behdad Esfahbod dce3502e10 [array] Add commented-out static asserts
They don't work.
2022-11-23 18:34:54 -07:00
Behdad Esfahbod a7fee43cef [priority-queue] Minor micro-optimize 2022-11-23 17:46:32 -07:00
Garret Rieger ff3cac0ccd [subset] Fix unecessary trailing 0 bytes left by ContextFormat2 pruning.
Uneeded rules where beind removed from the count by the bytes for them was being left in the font.
2022-11-23 23:50:49 +00:00
Behdad Esfahbod f2851e4157 [test-map] Test has() getter with unique-ptr 2022-11-23 16:50:30 -07:00
Behdad Esfahbod 5f3a780614 [font] Protect against div-by-zero 2022-11-23 16:45:46 -07:00
Behdad Esfahbod 060ecac949 [font] Respect subfont slant setting in hb-draw
Fixes https://github.com/harfbuzz/harfbuzz/issues/3890
2022-11-23 16:31:37 -07:00
Behdad Esfahbod 2e9b270a49 [hb-view] Fix cairo slanting condition
hb-draw already does slanting. If NOT hb-draw, we should slant
through cairo path.  Donno why this was untested before.

This was double-slanting with hb-draw, and not slanting without it.
2022-11-23 16:18:39 -07:00
Garret Rieger 51028e63e6 [subset] Retain all glyphs in preprocessed face. 2022-11-23 22:51:16 +00:00
Behdad Esfahbod 404cb99d86 [buffer-diff] Fix check for glyph flag equality
I'm not sure if the old behavior was intentional, but it was checking
that the glyph flags were a subset of the reference buffer's glyph
flags.  I don't see why that is useful.  Fix that.

Then make the buffer-verify code ignore flag differences when verifying
buffers, since our unsafe-to-concat flag at least, is conservative and
not guaranteed to be produced the same in fragments.  See:

https://github.com/harfbuzz/harfbuzz/issues/3888
2022-11-23 15:37:03 -07:00
Garret Rieger 4c49daf7cd [subset] actually use the preprocessed face in hb-subset.
Tests weren't actually using the preprocessed face due to this typo in util/hb-subset.
2022-11-23 22:33:57 +00:00
Garret Rieger 2c0afde737 [subset] add an inprogress accelerator to plan.
This allows subset code to cache information into the accelerator during preprocess subset. Previously the accelerator was created at the end of subsetting.
2022-11-23 13:41:52 -07:00
Garret Rieger 81640fdffe [subset] fix leaked font in glyf::subset(...) 2022-11-23 13:41:52 -07:00
Behdad Esfahbod dcce53ddcb [cff] Micro-optimize fetch_op 2022-11-23 13:20:48 -07:00
Behdad Esfahbod 0bf7d9eb4d [subset-cff] Micro-optimize encode_byte 2022-11-23 13:20:48 -07:00
Behdad Esfahbod a23f820427 [subset-cff] Micro-optimize array access 2022-11-23 13:20:48 -07:00
Behdad Esfahbod 1e8f1ac677 [subset-glyf] Micro-optimize array access 2022-11-23 13:20:48 -07:00
Behdad Esfahbod 356d135ed6 [subset-glyf] Reduce roundf calls
Saves 7% on MPLUS1-Variable/6000 benchmark.
2022-11-23 13:20:48 -07:00
Garret Rieger 463ae07e99 [subset] In the preprocess subset call always use long loca.
Long loca is needed so that we can store the trimmed glyph bytes to allow us to safely skip trimming in the later subset.
2022-11-23 12:52:55 -07:00
Behdad Esfahbod 299ec902eb [glyf] Move instanciation to serialize() 2022-11-22 16:03:02 -07:00
Behdad Esfahbod d8d881f22d [subset-glyf] Don't create a second glyf accelerator 2022-11-22 15:24:16 -07:00
Behdad Esfahbod 7560930070 [glyf] Add _create_font_for_instancing 2022-11-22 15:22:25 -07:00
Behdad Esfahbod 40634ceeb0 [glyf] Adjust data types 2022-11-22 15:07:16 -07:00
Behdad Esfahbod ba0d28ea36 [glyf] Fix font error check 2022-11-22 15:01:48 -07:00
Behdad Esfahbod 04c525019c [glyf] Use a malloc instead of calloc 2022-11-22 14:54:55 -07:00
Behdad Esfahbod 024aa81805 [glyf] Micro-optimize encode_coord 2022-11-22 14:51:42 -07:00
Behdad Esfahbod b6694597f9 [glyf] Micro-optimize encode_flag() 2022-11-22 14:49:01 -07:00
Behdad Esfahbod d47cfe7936 [glyf] Minor use operator ++ 2022-11-22 14:45:04 -07:00
Behdad Esfahbod 03e6bde790 [glyf] Minor adjustment to lastflag handling
No logic change.
2022-11-22 14:40:50 -07:00
Behdad Esfahbod 0ca9fda889 [glyf] Remove misplaced comment 2022-11-22 14:39:10 -07:00
Behdad Esfahbod 44be8ef4ce [gvar] Skip degenerate all-untouched delta-sets 2022-11-22 14:21:25 -07:00