src/hb-face.cc


Log

Author Commit Date CI Message
Behdad Esfahbod 290063c6 2025-07-28T03:18:44 [face] Fix a potential crasher if not enough font data In hb_face_count(). Fixes https://github.com/memononen/Skribidi/pull/67
Caolán McNamara 1a804b0f 2025-07-13T20:40:53 const up modifier_combining_marks and supported_face_loaders, etc. move these symbols out of the .data section
Behdad Esfahbod a3d626b4 2025-04-06T19:16:43 [test-object] Hopefully last ubsan fix API change: - hb_face_is_immutable() now takes `hb_face_t *` instead of previous `const hb_face_t *`. This should not pose any problem for any clients in our belief.
Khaled Hosny ea6a172f 2025-03-24T00:33:53 11.0.0
Behdad Esfahbod 1e9d101e 2025-03-14T02:13:32 [directwrite] Add hb_directwrite_face_create_from_file_or_fail() Just loads the blob from file and creates a face from it. New API: +hb_directwrite_face_create_from_file_or_fail()
Behdad Esfahbod 344915c9 2025-03-13T14:30:09 [face] Hook up directwrite face loader
Behdad Esfahbod 4807a021 2025-03-12T18:27:27 [atomic] Kill hb_atomic_ptr_t<T> Use hb_atomic_t<T *> instead.
Behdad Esfahbod 8e8a9f6f 2025-03-10T21:48:36 [face] Add hb_face_create_or_fail_using() Fixes https://github.com/harfbuzz/harfbuzz/issues/5117 Untested. New API: +hb_face_create_or_fail_using
Behdad Esfahbod cbc205c2 2025-03-10T21:41:54 [font/face] Refactor some code
Behdad Esfahbod b1c50eb9 2025-03-10T21:35:46 [face] Rename a variable
Behdad Esfahbod 8ca9fe76 2025-03-10T21:13:07 [face] Avoid edit-sanitizing in hb_face_count()
Behdad Esfahbod 9e639e67 2025-03-09T05:10:50 [face] Review
Behdad Esfahbod 402f89cb 2025-03-09T01:52:03 [face] Rename a variable
Behdad Esfahbod 2ecc68c1 2025-03-09T01:46:07 [face] Fix HB_LEAN build
Behdad Esfahbod 6b9d9f72 2025-03-09T01:40:23 [face] Add HB_FACE_LOADER env var
Behdad Esfahbod 39ade99d 2025-03-09T01:25:52 [face] Two new APIs: + hb_face_create_from_file_or_fail_using() + hb_face_list_loaders()
Behdad Esfahbod 4d3642c1 2025-02-26T14:20:45 [face] Fix a malloc fail infinite-loop error
Behdad Esfahbod 6fbd6bb3 2025-02-26T14:06:35 [face] Avoid infinite-loop in building a face blob
Behdad Esfahbod f0d6a366 2025-02-06T02:51:50 [face] Use a macro
Behdad Esfahbod 7392f32e 2025-02-05T19:16:08 [face] Tweak stack again Let's go with one loop iteration. It's cheap.
Behdad Esfahbod 515b6a58 2025-02-05T19:13:19 [face] Minor stack var size change
Behdad Esfahbod 601dd1a7 2025-02-05T19:10:41 [face-builder] Fix an OOM issue Fixes https://oss-fuzz.com/testcase-detail/5721476158521344
Khaled Hosny a315d43b 2025-02-04T20:41:01 [doc] Update hb_face_reference_blob() and hb_reference_table_func_t
Khaled Hosny 4825e5e2 2025-02-04T00:54:58 [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
Behdad Esfahbod 3a7ebc32 2025-01-13T14:53:16 [config] Fix build with HB_LEAN Fixes https://github.com/harfbuzz/harfbuzz/issues/4997
Khaled Hosny 524e0f0a 2024-12-19T11:53:37 [doc] Improve hb_face_reference_table() docs
Khaled Hosny 9ef44a2d 2024-11-05T08:01:56 10.1.0
Behdad Esfahbod b12acba4 2024-10-12T19:29:02 [face] Add hb_face_create_from_file_or_fail() New API: + hb_face_create_from_file_or_fail()
Behdad Esfahbod 2437fd88 2024-10-12T19:24:42 [face] Add hb_face_create_or_fail() New API: + hb_face_create_or_fail()
Khaled Hosny d5261f72 2024-09-23T23:07:55 10.0.0
Behdad Esfahbod 3894b1c9 2024-08-07T09:04:25 [face] Update docs for get_table_tags
Behdad Esfahbod ff04f28b 2024-08-06T07:22:04 [face] Add get_table_tags callback New API: +hb_get_table_tags_func_t +hb_face_set_get_table_tags_func() Towards fixing https://github.com/harfbuzz/harfbuzz/issues/4821 To be implemented by face-builder, FreeType, and CoreText backends.
Behdad Esfahbod 48f8ed7e 2023-04-22T10:11:22 Docs
Josef Friedrich ac4c3b3e 2023-04-17T20:13:43 Fix typos in the source code docs
Khaled Hosny 8bdaeddf 2023-02-11T23:44:58 7.0.0
Khaled Hosny 0ea8bbd9 2023-02-11T20:01:06 [doc] Use XSince for REPLACEME/EXPERIMENTAL To hide them from gtk-doc so that we can finally enable gtkdoc-check.
Khaled Hosny fcb5111c 2023-01-21T00:24:50 [doc] Fix gtk-doc warning
Behdad Esfahbod cb509d9c 2023-01-10T13:11:48 [face] Docs
Behdad Esfahbod 8a2efbd8 2023-01-10T13:10:36 [upem] More docs
Behdad Esfahbod e8ac0ef2 2023-01-05T16:20:43 [face] Minor rename a variable
Matthias Clasen 381ac2fd 2023-01-05T17:48:09 docs: Fix a typo
Behdad Esfahbod c54debc7 2023-01-05T11:54:06 [face] Add hb_face_collect_nominal_glyph_mapping Fixes https://github.com/harfbuzz/harfbuzz/issues/3973
Behdad Esfahbod 8b12c195 2023-01-05T11:42:21 [face] Split hb-face-builder.cc
Behdad Esfahbod 1a5c7495 2022-12-04T15:20:51 [config] Flesh out HB_NO_SHAPER a bit more
Behdad Esfahbod 765a3551 2022-12-04T14:48:32 [face-builder] Minor cast
Behdad Esfahbod 3fff6d90 2022-12-04T14:47:38 [face-builder] Initialize face orders to -1
Behdad Esfahbod 805ce9ad 2022-12-04T14:43:17 [face-builer] Protect against wrong face In hb_face_builder_sort_tables.
Behdad Esfahbod a73137d1 2022-10-17T12:18:16 [face] Fix annotation
Khaled Hosny 3ce4b8f5 2022-10-08T19:10:07 5.3.0
Garret Rieger 8cd7d1c3 2022-09-20T22:04:39 [subset] Allow table ordering on the face builder to be overriden.
Behdad Esfahbod f73c15ca 2022-08-03T12:54:03 [atomic-int] Add operators for relaxed ops
Behdad Esfahbod 1945b400 2022-07-25T10:45:55 [cpluscplus] Wrap hb-subset types as well Also changes signature of get_user_data of hb.h types to take const object. This is safe.
Khaled Hosny 98e90cc6 2022-06-30T08:43:57 [docs] Reduce warnings Use markdown syntax for inline code blocks instead of %true, %false, and %NULL.
Behdad Esfahbod f78a2509 2022-06-05T00:55:35 [gi] Remove Xconstructor annotations
Behdad Esfahbod c88a6a9e 2022-06-01T09:46:41 [face] Remove const from get_user_data prototype This was done by mistake. Since the returned user_data can be changed, face should not be marked const. Other object types follow this parttern.
Behdad Esfahbod 2d42fc9f 2022-01-02T07:45:10 [font] Load named-instance if face index top bits are set This matches FreeType behavior. Fixes https://github.com/harfbuzz/harfbuzz/issues/3348
Behdad Esfahbod da7dba00 2022-01-01T11:20:20 [face] Clarify face_index handling Fixes https://github.com/harfbuzz/harfbuzz/issues/3347
Garret Rieger 8c0c217b 2021-08-06T10:45:38 [subset] fail reference blob in face builder if allocation for table sorting fails. Fixes https://oss-fuzz.com/testcase-detail/5041767803125760
Garret Rieger e5bfd49a 2021-08-05T14:03:25 [subset] don't allow table adds for tag == -1.
Garret Rieger 222b74f0 2021-08-05T11:39:26 [subset] don't leak memory for duplicate tables.
Behdad Esfahbod 2cb8c928 2021-08-05T12:27:22 [face] Let hashmap derive invalid key/value types Works now with the previous two fixes.
Behdad Esfahbod 74ad5ddc 2021-08-05T11:51:54 [face] Minor cleaning of previous commit
Garret Rieger c2ee1fdd 2021-08-04T16:42:49 [subset] remove unsed table_entry struct.
Garret Rieger dea0fe57 2021-08-04T16:36:20 [subset] discard extra copies of a table in face builder. Fixes #2361. Stores tables in the builder in a hashmap so you end up with at most one copy of each table. Table serialization order is now based on tag sort order instead of order of insertion into the builder.
Behdad Esfahbod 2337f0d0 2021-07-08T10:58:50 Internally use hb_malloc/.../hb_free instead of malloc/.../free Redefining those stock names as macros was conflicting with gcc 10 headers. Fixes https://github.com/harfbuzz/harfbuzz/issues/3044
Khaled Hosny 4811e8f5 2021-06-07T10:54:36 Trigger doc rebuild
Behdad Esfahbod 140797d4 2020-06-29T03:51:09 [constexpr] hb_atomic_int_t
Behdad Esfahbod d7e2a51d 2021-02-11T10:55:03 [minor] Add unlikely() when checking for error
Khaled Hosny 9936490c 2020-12-31T00:19:29 [docs] Invalid use of "optional" annotation It is valid only for out and inout parameters. Fixes https://github.com/harfbuzz/harfbuzz/issues/1787
Khaled Hosny 3d7a3616 2020-12-30T23:58:37 [docs] Miscellaneous missing docs
Khaled Hosny a8e72ee7 2020-12-30T23:08:40 [docs] Use %true and %false consistently
Khaled Hosny f88e845f 2020-12-24T21:28:37 [docs] Minor fixes
Khaled Hosny cc7b3a1a 2020-09-26T10:22:39 [Docs] Address review comments
n8willis 41b46a3c 2020-04-26T16:01:31 Update hb-face.cc
n8willis 726e320e 2020-04-26T15:56:57 Update inline doc for hb_face_create: explain index
Nathan Willis 3e72febd 2019-04-22T19:21:27 [Docs] Add GTK-Doc comments for hb-face.
Garret Rieger dae32b4f 2020-07-28T18:31:46 [subset] bail out of subsetting if plan allocation fails.
Sebastian Rasmussen 12a9d572 2020-06-24T03:25:43 [face] Destroy blob if face closure can not be created (#2490) This fixes issue #2489.
Ebrahim Byagowi 2dda6dd7 2020-04-20T14:12:45 minor, tweak spacing turn 8 spaces to tab, add space before Null/Crap
Michiharu Ariza 5ab50eeb 2020-02-29T01:32:29 collect_unicodes() with clamp, calling add_range() Use add_range instead an inner loop, clamp its input number by number of glyphs a face has. Even the face cmap12 and 13 have 32-bit hb_codepoint_t, which is here used to make timeout, face's maxp has 16-bit gid limitation at least for now, using that makes sure we both fix and the timeout and don't need to change much things here also in order to support 32-bit gids also someday. Fixes #2204
Ebrahim Byagowi e9021386 2020-02-28T21:24:27 Revert "collect_unicodes() to check gid < num_glyphs with cmap 12" Didn't fix the case actually, making bots to fail. This reverts commit 15b43a410400c74a32d40f4b89dbea02fa7cd6e1.
Michiharu Ariza 15b43a41 2020-02-28T08:45:39 collect_unicodes() to check gid < num_glyphs with cmap 12 fixes #2204
Ebrahim Byagowi f441a7c0 2019-09-01T02:18:09 Don't allow reference blob be accessed using empty tag in hb_face_reference_table (#1947)
Behdad Esfahbod 27de7c44 2019-06-19T20:07:02 [config] Add HB_NO_FACE_COLLECT_UNICODES Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Behdad Esfahbod fa333e34 2018-12-27T17:56:22 [vector] Remove static_array Was good idea, but with C++ types with constructor/destructor, was getting in the way as compiler was destructing those items where it was not desired. Since C++ does not allow zero-sized arrays, just remove it...
Behdad Esfahbod 474a1205 2018-12-21T18:46:51 [array/vector] Rename len to length
Behdad Esfahbod f1e95e40 2018-12-18T16:49:08 [arrays] Remove hb_supplier_t<>
Behdad Esfahbod f9417af2 2018-12-18T13:23:32 [serialize] Propagate error from hb-face
Behdad Esfahbod cf39c242 2018-12-17T22:36:23 [arrays] Rename Supplier to hb_supplier_t
Ebrahim Byagowi e4120085 2018-12-17T21:31:01 Remove redundant void from C++ sources (#1486)
Behdad Esfahbod 0d0fe9df 2018-12-16T22:29:40 [arrays] Remove need of stride in Supplier<>
Ebrahim Byagowi b2ebaa9a 2018-12-16T22:38:10 Remove redundant 'inline' from methods (#1483)
Behdad Esfahbod fb059082 2018-11-30T20:45:40 Revert ugly fixes Now that we have 6daf45e0, revert cryptic hacks... This reverts commit abd81ed4f5cbc5a94171747909bc6b77551cb929. This reverts commit 9c6921c08c905a0cf45ba0182134e6ff910fac51. This reverts commit d39760cabfe4007cefdfc45231e85e93fababac2. This reverts commit fedd8e6c176dea85194693399e50243eb1c117c4. Fixes https://github.com/harfbuzz/harfbuzz/issues/1374
Behdad Esfahbod abd81ed4 2018-11-30T11:51:26 Umm. Cryptic, yes In file included from hb-face.cc:35: hb-ot-cmap-table.hh: In member function 'void OT::CmapSubtableFormat4::_compiles_assertion_on_line_388() const': hb-ot-cmap-table.hh:388: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-open-type.hh:354: note: candidate 1: const Type& OT::UnsizedArrayOf<Type>::operator[](unsigned int) const [with Type = OT::IntType<short unsigned int, 2u>] hb-ot-cmap-table.hh:388: note: candidate 2: operator[](const T*, int) <built-in> hb-ot-cmap-table.hh: In member function 'void OT::CmapSubtableFormat4::_instance_assertion_on_line_388() const': hb-ot-cmap-table.hh:388: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-open-type.hh:354: note: candidate 1: const Type& OT::UnsizedArrayOf<Type>::operator[](unsigned int) const [with Type = OT::IntType<short unsigned int, 2u>] hb-ot-cmap-table.hh:388: note: candidate 2: operator[](const T*, int) <built-in> hb-face.cc: In function 'hb_blob_t* _hb_face_builder_data_reference_blob(hb_face_builder_data_t*)': hb-face.cc:650: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u] hb-face.cc:650: note: candidate 2: operator[](T*, int) <built-in> hb-face.cc:650: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u] hb-face.cc:650: note: candidate 2: operator[](const T*, int) <built-in> hb-face.cc:651: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u] hb-face.cc:651: note: candidate 2: operator[](T*, int) <built-in> hb-face.cc:651: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u] hb-face.cc:651: note: candidate 2: operator[](const T*, int) <built-in>
Behdad Esfahbod ae79fdaa 2018-11-30T11:51:26 Umm. Cryptic, yes hb-face.cc:650: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u] hb-face.cc:650: note: candidate 2: operator[](T*, int) <built-in>
Behdad Esfahbod 0f32c95e 2018-11-30T11:31:39 Fix a few more sizeof(vector[0]) errors with weird compilers
Behdad Esfahbod 96cf0889 2018-11-24T01:07:15 [arrays] More
Behdad Esfahbod ce5da0f3 2018-11-16T02:29:13 [shaper] Rewrite shaper data code to be more template-driven than macro-driven
Behdad Esfahbod fc44dea3 2018-11-13T11:54:33 Use atomic ints for upem and num_glyphs on face
Behdad Esfahbod e88d47b7 2018-11-11T16:25:43 Minor