Commit Graph
821 Commits
Author SHA1 Message Date
Behdad Esfahbod 7f5fac7c87 [test-buffer] Fix unintionally merged change 2025-02-04 23:35:34 +00:00
Behdad Esfahbod f0ead85283 [aat] Implement set filtering for Noncontextual chains as well 2025-02-04 23:30:30 +00:00
Khaled Hosny 4825e5e2b4 [face] Add fallback implementation to hb_face_reference_blob
If referencing the face blob is not possible (e.g. not implemented by
the font functions), use face builder to create a blob out of
individual table blobs.

Fixes https://github.com/harfbuzz/harfbuzz/issues/5036
2025-02-04 15:45:22 +02:00
Behdad Esfahbod b394ab39e9 [test-buffer] Add code for testing end_ptr 2025-02-01 14:26:32 +00:00
Garret Rieger bdb50f1c6e [repacker] Also rename api method from hb_subset_repack_or_fail -> hb_subset_serialize_or_fail. 2025-01-07 13:39:51 -07:00
Garret Rieger 056504168c [repacker] rename hb-subset-repacker -> hb-subset-serialize.
Also hb_link_t and hb_object_t to hb_subset_serialize_link_t and hb_subset_serialize_object_t.
2025-01-07 13:39:51 -07:00
Garret Rieger b0d52abe97 [subset] consider variation selectors subsetting cmap14
cmap14 subsetting code was not considering variation selectors in the input unicode set when deciding which variant glyphs to keep. This updates subsetting to only keeps variant glyphs if their variation selector code point is in the input unicodes set.

For https://github.com/harfbuzz/harfbuzz/issues/4911
2024-11-11 13:45:08 -07:00
Behdad Esfahbod 755929c48d Fix more compiler warnings
In case FreeType is not available.
2024-10-12 20:08:32 -06:00
Khaled Hosny 4d1f6e049c [COLR] Enable COLRv0 support in get_extents()
paint_glyph() supports COLRv0 but this code is never reached because of
the early return if version is not 1. This early return seems to be from
before COLRv0 extents were supported.
2024-10-07 13:24:14 -06:00
Julien Nabet 8de0d91166 missing-field-initializers in test/api/test-ot-face.c
FAILED: test/fuzzing/hb-shape-fuzzer.p/hb-shape-fuzzer.cc.o clang++ -Itest/fuzzing/hb-shape-fuzzer.p -Itest/fuzzing -I../test/fuzzing -I. -I.. -Isrc -I../src -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -fno-exceptions -O3 -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -DHAVE_CONFIG_H -Wall -Wextra -Werror -MD -MQ test/fuzzing/hb-shape-fuzzer.p/hb-shape-fuzzer.cc.o -MF test/fuzzing/hb-shape-fuzzer.p/hb-shape-fuzzer.cc.o.d -o test/fuzzing/hb-shape-fuzzer.p/hb-shape-fuzzer.cc.o -c ../test/fuzzing/hb-shape-fuzzer.cc In file included from ../test/fuzzing/hb-shape-fuzzer.cc:9: ../test/fuzzing/../api/test-ot-face.c:47:34: error: missing field 'y_bearing' initializer [-Werror,-Wmissing-field-initializers]
hb_glyph_extents_t extents = {0};
^
../test/fuzzing/../api/test-ot-face.c:85:55: error: missing field 'enable' initializer [-Werror,-Wmissing-field-initializers]
hb_aat_layout_feature_selector_info_t setting = {0};
^
2 errors generated.
2024-10-06 12:47:27 -06:00
David Corbett e30dedbb42 [Unicode 16] Add tests 2024-09-14 12:06:08 -04:00
Behdad Esfahbod 59a97ac02e [test] More get_table_tags test 2024-08-06 14:53:36 -06:00
Behdad Esfahbod a55b007144 [test] Add get_table_tags test for hb-coretext 2024-08-06 14:42:37 -06:00
Behdad Esfahbod bd79bfb653 [test] Add get_table_tags test for hb-ft 2024-08-06 13:40:06 -06:00
Behdad Esfahbod a459753ef9 [test] Test get_table_tags of face_builder 2024-08-06 13:31:24 -06:00
Behdad Esfahbod 8896b1d57a [test] Add test for get_table_tags
So far just tests the default implementation.
2024-08-06 12:34:15 -06:00
Behdad Esfahbod 84f165646e [test] Move code around 2024-08-06 12:21:02 -06:00
Behdad Esfahbod 22e1a5a785 [test-paint] Fix warnings 2024-08-06 12:20:34 -06:00
Behdad Esfahbod 191c6eedf3 Fix Linux bot 2024-08-06 06:59:32 -06:00
Behdad Esfahbod e0c3cbf16c [subset] Fail if source face has no glyphs
Also return nullptr if any of the input pointers are nullptr.
Before we were returning the empty face.

Fixes https://github.com/harfbuzz/harfbuzz/issues/4824
2024-08-06 06:50:54 -06:00
Khaled Hosny cf1fdf1632 Drop autotools build
Fixes https://github.com/harfbuzz/harfbuzz/issues/4720
2024-06-27 15:28:38 +03:00
Behdad Esfahbod 49c8493f5c [test] Build with HB_MINI
Also add CONFIG.md instructions for building configs with meson.

Fixes https://github.com/harfbuzz/harfbuzz/issues/4760
2024-06-20 11:17:10 -07:00
ssmid 106e4068b9 HB_SCRIPT_CANADIAN_ABORIGINAL removed, as deprecated 2024-06-20 09:11:12 -07:00
ssmid 8de7e9fdb1 deprecation cleanup: HB_BUFFER_FLAGS_DEFAULT removed 2024-06-20 09:11:12 -07:00
Behdad Esfahbod 9456f6bdfa [test] Fix a few compiler warnings 2024-06-02 10:32:07 -06:00
David Corbett c2b5b7b9ca [ot-tags] Update IANA and OT language registries 2024-06-01 12:07:54 -07:00
Khaled Hosny 135d6537d9 test-draw-varc.c: Fix “warning: unused function” 2024-05-31 03:28:13 +03:00
Behdad Esfahbod 0037ee281f Merge pull request #4578 from harfbuzz/varc-table
`VARC` table
2024-05-24 08:10:15 -07:00
David Corbett 0db136b1b0 [subset-cff] Shorten output of encode_num_tp 2024-05-12 09:04:02 -07:00
Behdad Esfahbod 6129c72619 [varc] Use Condition instead of ConditionSet
With more Condition formats.

https://github.com/harfbuzz/boring-expansion-spec/commit/df7dcc4618b9dc003740d25c53afe30a8fc03fe2
https://github.com/harfbuzz/boring-expansion-spec/issues/147
2024-04-22 14:52:58 -06:00
Behdad Esfahbod d07d70aef1 [varc] Add test 2024-04-16 17:10:46 -06:00
Ozkan Sezer dbecddb41c tests, hb-test.h: define g_assert_false && g_assert_nonnull for old glib
Reference issue: https://github.com/harfbuzz/harfbuzz/issues/4577
Reference issue: https://github.com/harfbuzz/harfbuzz/issues/4624
2024-03-21 15:54:53 +02:00
Lie Yan 2da79f70a1 fix(test-ot-math.c): remove redundant lines 2024-03-09 09:34:55 -07:00
Christer Sandberg 1ab8822b41 Fixed some errors in STAT table implementation 2024-02-10 07:08:18 -07:00
Lie Yan c17d67467f [ot-math] Fix a bug in MathKern::get_value()
Fixes https://github.com/harfbuzz/harfbuzz/issues/4542
2024-01-07 16:10:10 +02:00
Garret Rieger 9701b0024e [subset] Always place CFF1/2 char strings at the end of the packed table.
Makes the behaviour from HB_SUBSET_FLAGS_IFTB_REQUIREMENTS the default.
2023-11-06 16:49:09 -07:00
Garret Rieger c6884377ec [subset] Add HB_SUBSET_FLAGS_IFTB_REQUIREMENTS flag.
When enabled the output subset conforms to the requirements for a base font to be patched by IFTB patches. IFTB is a proposed incremental font transfer patch. This new flag is set as experimental. Currently, setting this flag causes the output subset to also use long offsets for outline data in loca/glyf, gvar, CFF, and CFF2.

This change is a version of https://github.com/skef/harfbuzz/commit/3ae2fe2084d96f61d8ad1bbe42a6ef4e62ec830a rebased onto head w/ tests added.
2023-11-06 16:49:09 -07:00
Khaled Hosny 6e06a193b3 Add some tests for hb_feature_[from|to]_string() 2023-09-29 18:22:44 -06:00
David Corbett c459b8a51a [Unicode 15.1] Add tests 2023-09-16 10:27:07 -04:00
Behdad Esfahbod 0c80aec10b [COLR] Move cycle-detection to the renderer instead of cairo
Alternative fix for https://github.com/harfbuzz/harfbuzz/issues/4375
2023-08-15 10:30:38 -06:00
Behdad Esfahbod 7d7541e35d [test-paint] Print paint-color-glyph 2023-08-14 17:55:09 -06:00
Behdad Esfahbod 47231bdc70 [COLR/cairo/ft] Fixups to paint-color-glyph and implement for hb-ft 2023-08-14 16:55:21 -06:00
Behdad Esfahbod 58effbcc4f . 2023-08-14 16:47:36 -06:00
Behdad Esfahbod c8f6ae1df7 [subset/hvar/retaingids] Synthesize a DeltaSetIndexMap if needed
Before we were emitting the entire VarStore rows if advMap
was Null. Instead, synthesize an advMap.

20% speed up in subset_glyphs/SourceHanSans-VF.otf/retaingids benchmark.
2023-07-08 20:23:20 -06:00
Khaled Hosny afe0910295 [font] Actually deprecate get_glyph_shape()
We previously marked it as deprecated in the documentation but didn’t
actually deprecate it in code. Now the only known users have migrated to
draw_glyph(), lets deprecate o=it for good.
2023-07-09 03:20:27 +03:00
Khaled Hosny 0d354e0442 [layout] Add tests for baseline 2 APIs 2023-05-21 19:01:04 +03:00
Behdad Esfahbod 132391ad62 [layout] Add test for font_extents 2023-05-19 16:10:21 -06:00
Behdad Esfahbod 4a735b30c4 [cff2-subset] Update test 2023-02-19 20:39:01 -07:00
Behdad Esfahbod 474b99d122 [test-paint] Fix build without FreeType
Fixes https://github.com/harfbuzz/harfbuzz/issues/4103
2023-02-04 10:16:11 -07:00
Behdad Esfahbod e377888990 [ft-colr] Conditionalize on (unreleased0 FreeType 2.13.0
That's the version that the color API is called stable, and
includes changes that we rely on.
2023-01-26 13:27:55 -07:00