Commit Graph
17664 Commits
Author SHA1 Message Date
Behdad Esfahbod 2dc6334133 [tests] Remove invalid tests from collections.tests
Previously we silently returned the empty face if face_index
was out of range. With util/ now using the new API
hb_font_face_create_from_file_or_fail(), that returns a nullptr
face now. So, adjust tests.
2024-10-15 14:58:13 -06:00
Behdad Esfahbod 734ba5ab48 [hb-info] Fix font face number recording for .dfont 2024-10-15 14:58:13 -06:00
Behdad Esfahbod 67591f8511 [util] Add --face-loader
Currently crashes with ft. Investigating.
2024-10-15 14:58:13 -06:00
Behdad Esfahbod 75d168cbf4 [util] Rename a variable 2024-10-15 14:58:13 -06:00
Behdad Esfahbod aa933abb76 [util] Use hb_face_create_from_file_or_fail() 2024-10-15 14:58:13 -06:00
Behdad Esfahbod 12fc715dd6 [ft] Add hb_ft_face_create_from_file_or_fail()
New API:
+hb_ft_face_create_from_file_or_fail()
2024-10-15 14:58:13 -06:00
Behdad Esfahbod 89c83b5b08 [coretext] Add hb_coretext_face_create_from_file_or_fail()
New API hb_coretext_face_create_from_file_or_fail()
2024-10-15 13:06:51 -06:00
Behdad Esfahbod b12acba494 [face] Add hb_face_create_from_file_or_fail()
New API:
+ hb_face_create_from_file_or_fail()
2024-10-13 13:04:29 -06:00
Behdad Esfahbod 2437fd883a [face] Add hb_face_create_or_fail()
New API:
+ hb_face_create_or_fail()
2024-10-13 13:04:29 -06:00
Behdad Esfahbod 2166a46ad3 [coretext] Don't set CoreText funcs on new CoreText fonts 2024-10-13 13:04:29 -06:00
Behdad Esfahbod 62ae9fbd6a [coretext-font] Implement get_glyph_from_name 2024-10-13 13:04:29 -06:00
Behdad Esfahbod b5e9f2cb2b [coretext-font] Implement get_glyph_extents 2024-10-13 13:04:29 -06:00
Behdad Esfahbod 8db2997e4e [coretext] Configure hb_coretext_font_create() with CT font funcs
Not sure if this is a good idea...
2024-10-13 13:04:29 -06:00
Behdad Esfahbod 8a805271a1 [coretext] Start implementing CoreText font-funcs
Does nominal glyph mapping, horiz advances, and draw so far.
2024-10-13 13:04:29 -06:00
Behdad Esfahbod 064b24177b [coretext] Rename hb-coretext.cc to hb-coretext-shape.cc 2024-10-13 13:04:29 -06:00
Behdad Esfahbod e1269215f9 Revert "Fix a compiler warning"
This reverts commit 377e3c67a4.

https://github.com/harfbuzz/harfbuzz/commit/377e3c67a435932f9da0e4f9baec1c34f4f45a15#commitcomment-147888850
2024-10-13 13:01:09 -06:00
Behdad Esfahbod 755929c48d Fix more compiler warnings
In case FreeType is not available.
2024-10-12 20:08:32 -06:00
Behdad Esfahbod 377e3c67a4 Fix a compiler warning 2024-10-12 20:06:54 -06:00
Behdad Esfahbod ab36089924 [CFF] Increase max op num limit
This actually counts operands too, not just operators.
In a big variable-font design-space, each blend can easily take
a dozen ops or more. I was sent a font for which this limit
was hit. Increase by 20x for now.
2024-10-10 14:47:57 -06:00
Behdad Esfahbod 1a4bdd699a [font] Change fallback y_advance sign
Ouch.
2024-10-10 14:16:14 -06:00
Khaled Hosny 9c00255b4a [ci] Fix Codecov upload
Setup a repository token and use it, this seems to be required now.
2024-10-10 14:20:26 +03:00
Khaled Hosny 6a25df24b0 [COLR] Add and use get_clip_list () 2024-10-09 10:23:12 -06:00
Khaled Hosny 5462978c90 [COLR] Lets see if this makes CIFUZZ any happier 2024-10-09 10:23:12 -06:00
Behdad Esfahbod 008505e1c4 [COLR] Pepper some hb_barrier()'s around
The version is a minor version (because uint16), as such
version > 1 should be considered as supporting version 1
data.
2024-10-08 09:31:29 -06:00
Khaled Hosny cec95a2d26 Try to fix heap-buffer-overflow 2024-10-07 13:24:14 -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
Behdad Esfahbod 4587e08a46 [VarStoreInstancer] Fix null deref
Should fix this hopefully:
https://github.com/harfbuzz/harfbuzz/actions/runs/11203732283/job/31141330056?pr=4885
2024-10-07 08:41:23 -06:00
Behdad Esfahbod e8de8d88df [CONFIG] Remove unused HB_NDEBUG 2024-10-07 06:11:25 -06:00
dependabot[bot] 50d67b202a Bump codecov/codecov-action from 4.5.0 to 4.6.0
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/e28ff129e5465c2c0dcc6f003fc735cb6ae0c673...b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 05:47:42 -06:00
dependabot[bot] d9c029755c Bump github/codeql-action from 3.26.9 to 3.26.11
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.9 to 3.26.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/461ef6c76dfe95d5c364de2f431ddbd31a417628...6db8d6351fd0be61f9ed8ebd12ccd35dcec51fea)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 05:47:29 -06:00
Julien Nabet e157205499 unused-parameter in test/fuzzing/hb-draw-fuzzer.cc
../test/fuzzing/hb-draw-fuzzer.cc:19:28: error: unused parameter 'dfuncs' [-Werror,-Wunused-parameter]
_move_to (hb_draw_funcs_t *dfuncs, void *draw_data_,
                           ^
../test/fuzzing/hb-draw-fuzzer.cc:22:10: error: unused parameter 'user_data' [-Werror,-Wunused-parameter]
          void *user_data)
                ^
../test/fuzzing/hb-draw-fuzzer.cc:31:28: error: unused parameter 'dfuncs' [-Werror,-Wunused-parameter]
_line_to (hb_draw_funcs_t *dfuncs, void *draw_data_,
                           ^
../test/fuzzing/hb-draw-fuzzer.cc:34:10: error: unused parameter 'user_data' [-Werror,-Wunused-parameter]
          void *user_data)
                ^
../test/fuzzing/hb-draw-fuzzer.cc:44:33: error: unused parameter 'dfuncs' [-Werror,-Wunused-parameter]
_quadratic_to (hb_draw_funcs_t *dfuncs, void *draw_data_,
                                ^
../test/fuzzing/hb-draw-fuzzer.cc:46:15: error: unused parameter 'control_x' [-Werror,-Wunused-parameter]
               float control_x, float control_y,
                     ^
../test/fuzzing/hb-draw-fuzzer.cc:46:32: error: unused parameter 'control_y' [-Werror,-Wunused-parameter]
               float control_x, float control_y,
                                      ^
../test/fuzzing/hb-draw-fuzzer.cc:48:15: error: unused parameter 'user_data' [-Werror,-Wunused-parameter]
               void *user_data)
                     ^
../test/fuzzing/hb-draw-fuzzer.cc:58:29: error: unused parameter 'dfuncs' [-Werror,-Wunused-parameter]
_cubic_to (hb_draw_funcs_t *dfuncs, void *draw_data_,
                            ^
../test/fuzzing/hb-draw-fuzzer.cc:60:11: error: unused parameter 'control1_x' [-Werror,-Wunused-parameter]
           float control1_x, float control1_y,
                 ^
../test/fuzzing/hb-draw-fuzzer.cc:60:29: error: unused parameter 'control1_y' [-Werror,-Wunused-parameter]
           float control1_x, float control1_y,
                                   ^
../test/fuzzing/hb-draw-fuzzer.cc:61:11: error: unused parameter 'control2_x' [-Werror,-Wunused-parameter]
           float control2_x, float control2_y,
                 ^
../test/fuzzing/hb-draw-fuzzer.cc:61:29: error: unused parameter 'control2_y' [-Werror,-Wunused-parameter]
           float control2_x, float control2_y,
                                   ^
../test/fuzzing/hb-draw-fuzzer.cc:63:11: error: unused parameter 'user_data' [-Werror,-Wunused-parameter]
           void *user_data)
                 ^
../test/fuzzing/hb-draw-fuzzer.cc:73:31: error: unused parameter 'dfuncs' [-Werror,-Wunused-parameter]
_close_path (hb_draw_funcs_t *dfuncs, void *draw_data_,
                              ^
../test/fuzzing/hb-draw-fuzzer.cc:75:13: error: unused parameter 'user_data' [-Werror,-Wunused-parameter]
             void *user_data)
                   ^
16 errors generated.
2024-10-06 22:48:37 +03: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 b6196986d7 [USE] Update the data files
This uses the data files from
<https://github.com/microsoft/font-tools/tree/e00698c07a0444647db84a7f8bf03d1081bd53b3/USE>.
2024-10-03 19:54:54 -06:00
David Corbett 31b22016a2 [ot-tags] Update IANA and OT language registries 2024-10-03 19:54:54 -06:00
Julien Nabet 5772f4ffce missing-field-initializers in main.cc
FAILED: src/main.p/main.cc.o
clang++ -Isrc/main.p -Isrc -I../src -I. -I.. -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6 -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 -pthread -Wno-non-virtual-dtor -UNDEBUG -MD -MQ src/main.p/main.cc.o -MF src/main.p/main.cc.o.d -o src/main.p/main.cc.o -c ../src/main.cc
../src/main.cc:220:33: error: missing field 'y_bearing' initializer [-Werror,-Wmissing-field-initializers]
        hb_glyph_extents_t extents = {0};
                                       ^
../src/main.cc:270:36: error: missing field 'y_bearing' initializer [-Werror,-Wmissing-field-initializers]
    hb_glyph_extents_t extents = {0};
                                   ^
2 errors generated.
2024-10-01 11:33:20 -06:00
Julien Nabet 18f1d9121e missing-field-initializers in hb-draw.h
With clang build, I got:
FAILED: test/api/test-draw.p/test-draw.c.o
clang -Itest/api/test-draw.p -Itest/api -I../test/api -I. -I.. -Isrc -I../src -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/freetype2 -I/usr/include/libpng16 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -DHAVE_CONFIG_H -Wall -Wextra -Werror -pthread -MD -MQ test/api/test-draw.p/test-draw.c.o -MF test/api/test-draw.p/test-draw.c.o.d -o test/api/test-draw.p/test-draw.c.o -c ../test/api/test-draw.c
../test/api/test-draw.c:920:26: error: missing field 'reserved4' initializer [-Werror,-Wmissing-field-initializers]
    hb_draw_state_t st = HB_DRAW_STATE_DEFAULT;
                         ^
../src/hb-draw.h:73:71: note: expanded from macro 'HB_DRAW_STATE_DEFAULT'
define HB_DRAW_STATE_DEFAULT {0, 0.f, 0.f, 0.f, 0.f, {0.}, {0.}, {0.}}
2024-10-01 11:11:10 -06:00
Behdad Esfahbod c1c0e82e3f Revert "Bump setuptools from 73.0.1 to 75.1.0 in /.ci"
This reverts commit a87fa89b4e.

Build was failing in linux-ci.
2024-09-30 09:46:27 -06:00
dependabot[bot] 4aad43c826 Bump github/codeql-action from 3.26.8 to 3.26.9
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.8 to 3.26.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/294a9d92911152fe08befb9ec03e240add280cb3...461ef6c76dfe95d5c364de2f431ddbd31a417628)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-30 09:43:53 -06:00
dependabot[bot] a891445449 Bump actions/checkout from 4.1.7 to 4.2.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.7 to 4.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/692973e3d937129bcbf40652eb9f2f61becf3332...d632683dd7b4114ad314bca15554477dd762a938)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-30 09:43:40 -06:00
dependabot[bot] a87fa89b4e Bump setuptools from 73.0.1 to 75.1.0 in /.ci
Bumps [setuptools](https://github.com/pypa/setuptools) from 73.0.1 to 75.1.0.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v73.0.1...v75.1.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-30 09:43:24 -06:00
dependabot[bot] fa79b51d13 Bump fonttools from 4.53.1 to 4.54.1 in /.ci
Bumps [fonttools](https://github.com/fonttools/fonttools) from 4.53.1 to 4.54.1.
- [Release notes](https://github.com/fonttools/fonttools/releases)
- [Changelog](https://github.com/fonttools/fonttools/blob/main/NEWS.rst)
- [Commits](https://github.com/fonttools/fonttools/compare/4.53.1...4.54.1)

---
updated-dependencies:
- dependency-name: fonttools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-30 09:43:11 -06:00
Behdad Esfahbod c7ef6a2ed5 Remove the hack re variation-selectors
Instead of abusing an unused Gen_Cat value, use existing facilities
to remember variation selectors.

Addresses
https://github.com/RazrFalcon/rustybuzz/pull/134#issuecomment-2374894164
2024-09-25 19:42:40 -06:00
Khaled Hosny a1d9bfe628 10.0.1 10.0.1 2024-09-24 19:52:43 +03:00
Behdad Esfahbod 527e60b015 [morx] Relax sanitizing
Ignore claimed ChainSubtable length and only sanitize against
the whole table.

Works around what seems to be a broken LookupFormat0 in a
Noncontextual subtable in GeezaPro on MacOS 15.0

Fixes https://github.com/harfbuzz/harfbuzz/issues/4873
2024-09-24 09:40:44 -06:00
Behdad Esfahbod 867366ccf1 [test] Add GeezaPro tests for MacOS 15.0 2024-09-24 09:40:44 -06:00
Behdad Esfahbod 70ca19dff3 Use hb_barrier() instead of longer name
No functional change.
2024-09-24 08:42:44 -06:00
Khaled Hosny d5261f7234 10.0.0 10.0.0 2024-09-23 23:07:55 +03:00
Khaled Hosny 667ce682a2 [hb-view] Support cairo script as output format
Can be handy for debugging the series of operations cairo performs.
2024-09-23 22:08:41 +03:00
Behdad Esfahbod 7a390b5095 [hb-view] Simplify background drawing
Works around a Firefox bug.

Fixes https://github.com/harfbuzz/harfbuzz/issues/4811
2024-09-23 12:16:05 -06:00
chitao1234 700ef11c9b [meson] Add back with_libstdcxx build option
Building harfbuzz when targeting Android API<=20 would need libstdc++
due to lack of uselocale and freelocale in C library but present in
libstdc++.

This reverts commit 0151da23d6.
2024-09-23 17:44:33 +03:00