Commit graph

791 commits

Author SHA1 Message Date
David Corbett
0db136b1b0 [subset-cff] Shorten output of encode_num_tp 2024-05-12 09:04:02 -07: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 3ae2fe2084 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
Matthias Clasen
8d80d1dd18 [paint] Update expected test results
These tests were affected by recent fixes.
2023-01-25 19:06:51 -05:00
Andres Salomon
c622c6b883 [font] update the license url for TestGVAREight.ttf
The url in the exif data incorrectly links to a proprietary license. However,
permission was granted for distribution under Apache-2 as part of another project,
so link to that project's license instead.

fixes #4062
2023-01-25 09:27:49 -07:00
Matthias Clasen
eb0a025e49 Add a test for glyph names
This verifies that hb_font_get_glyph_name
returns false for nonexisting glyphs.
2023-01-24 21:35:04 -07:00
Matthias Clasen
dd64266ea4 Add a test for glyph extents
This verifies a recent fix for COLRv1 returning
0,0,-1,1 for extents of non-painting glyphs.
2023-01-24 18:08:22 -07:00
Khaled Hosny
c08e5d094a [hb-draw] Fix MSVC warning
warning C4305: 'initializing': truncation from 'double' to 'float'
2023-01-21 15:27:56 +02:00
Khaled Hosny
910adc7e92 [test-paint] Update expectations 2023-01-17 15:43:09 +02:00
Behdad Esfahbod
c86bab3fb4 [test-paint] Use G_GNUC_PRINTF 2023-01-17 06:29:17 -07:00
Behdad Esfahbod
f02c4ebb40 [test-paint] Adjust condition for enabling ft backend 2023-01-16 14:17:44 -07:00
Behdad Esfahbod
60a4f2e6f5 [test-paint] Detect FreeType COLRv1 from struct size 2023-01-12 19:12:46 -07:00
Behdad Esfahbod
b783967242 [test] Minor save glyph_count 2023-01-12 19:11:10 -07:00
Matthias Clasen
cca0ed9bcd test-paint: Add variable font tests
These needs freetype master to work.
2023-01-12 21:09:50 -05:00
Matthias Clasen
1cb5a87feb test-pain: Print out extend for color lines
Update all expected results to include this value.
2023-01-10 22:13:44 -05:00
Matthias Clasen
6648e6e3e5 Add one more paint test
Add a test for the clip_box_top_left_glyph,
since we've seen broken rendering with it.
2023-01-10 22:07:44 -05:00
Khaled Hosny
8460909e0c [build] Fix make dist 2023-01-10 09:04:35 -07:00
Garret Rieger
0f01a83622 [subset] add basic test for CFF2 subsetting.
FontTools does not yet support CFF2 subsetting so we can't add a comparison test. Instead add a golden file test.
2023-01-09 21:15:11 -07:00
Matthias Clasen
b20871322f test-paint: Fix use of g_test_skip 2023-01-09 16:30:42 -05:00
Matthias Clasen
eb0f0279d2 test-paint: Avoid g_test_skip_printf
This is relatively recent api we don't need.
2023-01-09 15:33:34 -05:00
Matthias Clasen
e61c2be41c test-paint: Skip tests if ft COLRv1 is missing 2023-01-09 15:25:29 -05:00
Matthias Clasen
1d662632d9 test-paint: More output for failures 2023-01-09 15:01:59 -05:00
Matthias Clasen
d0108d31a2 Add more paint tests
These tests compare the output of the ft and ot
implementations for all the glyphs in the test_glyphs
font.
2023-01-09 14:42:30 -05:00
Matthias Clasen
5f976d86a7 test-paint: Use %.3g for results
This produces more readable output.
2023-01-09 14:24:32 -05:00
Matthias Clasen
ec78a486bf Run paint tests at upem scale
This avoids problems with rouding.
2023-01-09 14:03:58 -05:00
Matthias Clasen
a085efa699 test-paint: Fix font setup for ft
We must call hb_ft_font_set_funcs after
setting the font scale.
2023-01-09 13:11:16 -05:00
Matthias Clasen
26f713a7f5 paint-test: Use larger scales
A scale of 20 is noise, so use 1000.
2023-01-09 12:54:06 -05:00
Behdad Esfahbod
e886b6b8a6 [test-draw] Use a larger scale
A scale of 20 is in the noise category for us. Using a larger
scale makes the test pass.
2023-01-09 10:31:28 -07:00
Matthias Clasen
347910fd4c Add a draw test
This test compares output between ft and ot
font funcs.
2023-01-09 10:31:28 -07:00
Matthias Clasen
42047070dd test-paint: More helpful output
No need to print ASCII chars as hex.
2023-01-08 16:08:16 -05:00
Behdad Esfahbod
3fd6c0d97a [test-paint] Remove unused FT_Library 2023-01-08 12:30:26 -07:00
Behdad Esfahbod
28be4f8805 [test-paint] Actually run against hb-ft 2023-01-08 12:19:41 -07:00
Matthias Clasen
ed7d0234e1 test-paint: Limit the precision of clip boxes
Update expected test results.
2023-01-08 11:57:43 -07:00