Skip to content

Commit c388dee

Browse files
committed
Update to latest dep graph branch.
Matching harfbuzz/harfbuzz#5733
1 parent e023792 commit c388dee

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

MODULE.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ http_archive(
3737
http_archive(
3838
name = "harfbuzz",
3939
build_file = "//third_party:harfbuzz.BUILD",
40-
integrity = "sha256-EJmqQvym4jTexScKym4P+XXOAkxO/GQ1jfFmTtNzT2Y=",
41-
strip_prefix = "harfbuzz-bc83b8239b017eac4b75fdac1a07ad34811e90eb",
42-
urls = ["https://github.com/harfbuzz/harfbuzz/archive/bc83b8239b017eac4b75fdac1a07ad34811e90eb.zip"],
40+
integrity = "sha256-ftMlBdqwAaWHMKvcB/9TioX3rSxwLCNCDtI8Q+mI9Eo=",
41+
strip_prefix = "harfbuzz-898173f2771734d694e12c91b0c4aabbe689dd5c",
42+
urls = ["https://github.com/harfbuzz/harfbuzz/archive/898173f2771734d694e12c91b0c4aabbe689dd5c.zip"],
4343
)
4444

4545
# Base 32 Hex

ift/dep_graph/dependency_graph.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ Status DependencyGraph::HandleGlyphOutgoingEdges(
677677
hb_codepoint_t context_set = HB_CODEPOINT_INVALID;
678678

679679
while (hb_depend_get_glyph_entry(dependency_graph_.get(), gid, index++, &table_tag,
680-
&dep_gid, &layout_tag, &ligature_set, &context_set)) {
680+
&dep_gid, &layout_tag, &ligature_set, &context_set, nullptr /* flags */)) {
681681
Node dest = Node::Glyph(dep_gid);
682682
if (table_tag == HB_TAG('G', 'S', 'U', 'B')) {
683683
if (context_set != HB_CODEPOINT_INVALID) {
@@ -807,7 +807,7 @@ flat_hash_map<hb_codepoint_t, std::vector<DependencyGraph::VariationSelectorEdge
807807
hb_codepoint_t ligature_set = HB_CODEPOINT_INVALID;
808808
hb_codepoint_t context_set = HB_CODEPOINT_INVALID;
809809
while (hb_depend_get_glyph_entry(dependency_graph_.get(), gid, index++, &table_tag,
810-
&dep_gid, &variation_selector, &ligature_set, &context_set)) {
810+
&dep_gid, &variation_selector, &ligature_set, &context_set, nullptr /* flags */)) {
811811
if (table_tag != cmap) {
812812
continue;
813813
}

ift/dep_graph/dependency_graph.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ class DependencyGraph {
3838
hb_face_t* face) {
3939
auto full_feature_set = TRY(FullFeatureSet(segmentation_info, face));
4040
auto init_font_feature_set = TRY(InitFeatureSet(segmentation_info, face));
41-
return DependencyGraph(segmentation_info, face, full_feature_set);
41+
hb_depend_t* depend = hb_depend_from_face_or_fail(face);
42+
if (!depend) {
43+
return absl::InternalError("Call to hb_depend_from_face_or_fail() failed.");
44+
}
45+
return DependencyGraph(segmentation_info, depend, face, full_feature_set);
4246
}
4347

4448
// Traverse the full dependency graph (segments, unicodes, and gids), starting at one or more
@@ -68,12 +72,13 @@ class DependencyGraph {
6872
private:
6973

7074
DependencyGraph(const ift::encoder::RequestedSegmentationInformation* segmentation_info,
75+
hb_depend_t* depend,
7176
hb_face_t* face, absl::flat_hash_set<hb_tag_t> full_feature_set)
7277
: segmentation_info_(segmentation_info),
7378
original_face_(common::make_hb_face(hb_face_reference(face))),
7479
full_feature_set_(full_feature_set),
7580
unicode_to_gid_(UnicodeToGid(face)),
76-
dependency_graph_(hb_depend_from_face(face), &hb_depend_destroy),
81+
dependency_graph_(depend, &hb_depend_destroy),
7782
variation_selector_implied_edges_(ComputeUVSEdges()) {}
7883

7984
absl::StatusOr<Traversal> TraverseGraph(

0 commit comments

Comments
 (0)