Skip to content

Commit 0b8646b

Browse files
committed
Fix typos and some cleanup.
1 parent 2e647ca commit 0b8646b

File tree

4 files changed

+14
-16
lines changed

4 files changed

+14
-16
lines changed

ift/encoder/activation_condition.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ class ActivationCondition {
110110
// Returns true if any of the condition groups intersects with 'segments'.
111111
bool Intersects(const common::SegmentSet& segments) const;
112112

113-
// Generate a new condition which is a copy of this one but will all
113+
// Generate a new condition which is a copy of this one but with all
114114
// occurences of 'segments' replaced with base_segment. New condition will be
115-
// simplified to removed any resulting redundancy.
115+
// simplified to remove any resulting redundancy.
116116
ActivationCondition ReplaceSegments(segment_index_t base_segment,
117117
const common::SegmentSet& segments) const;
118118

ift/encoder/dependency_closure.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Status DependencyClosure::SegmentsMerged(segment_index_t base_segment,
8989
Status DependencyClosure::InitNodeConditionsCache() {
9090
node_conditions_with_segment_.clear();
9191
glyph_condition_cache_.clear();
92-
node_condition_cache_ = TRY(ExtractAllGlyphConditions());
92+
node_condition_cache_ = TRY(ExtractAllNodeConditions());
9393
for (const auto& [n, condition] : node_condition_cache_) {
9494
for (segment_index_t s : condition.TriggeringSegments()) {
9595
node_conditions_with_segment_[s].insert(n);
@@ -504,7 +504,7 @@ Status DependencyClosure::PropagateConditions(
504504
}
505505

506506
StatusOr<flat_hash_map<Node, ActivationCondition>>
507-
DependencyClosure::ExtractAllGlyphConditions() const {
507+
DependencyClosure::ExtractAllNodeConditions() const {
508508
auto conditions = InitializeConditions();
509509

510510
flat_hash_set<hb_tag_t> table_tags =

ift/encoder/dependency_closure.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class DependencyClosure {
9696
#endif
9797

9898
// This structure caches information derived from the segmentation info
99-
// segments. These two function signals that segmentation info segments have
99+
// segments. These two function signal that segmentation info segments have
100100
// changed and recomputes the internal cached information.
101101
absl::Status InitFontChanged(const ift::common::SegmentSet& segments);
102102
absl::Status SegmentsMerged(segment_index_t base_segment,
@@ -111,8 +111,6 @@ class DependencyClosure {
111111
//
112112
// Utilizes the dependency graph to make the determination, so it's possible
113113
// that the result may be overestimated.
114-
//
115-
// TODO XXXX can drop StatusOr<> from these.
116114
absl::StatusOr<ift::common::SegmentSet> SegmentsThatInteractWith(
117115
const common::GlyphSet& glyphs) const;
118116
absl::StatusOr<ift::common::SegmentSet> SegmentsThatInteractWith(
@@ -129,10 +127,10 @@ class DependencyClosure {
129127
#ifdef HB_DEPEND_API
130128

131129
// Extracts the full activations conditions (as specified by the dependency
132-
// graph) for all glyphs. In some cases may overestimate activation conditions
130+
// graph) for all graph nodes. In some cases may overestimate activation conditions
133131
// versus real subsetting closure due to reliance on the dependency graph.
134132
absl::StatusOr<absl::flat_hash_map<dep_graph::Node, ActivationCondition>>
135-
ExtractAllGlyphConditions() const;
133+
ExtractAllNodeConditions() const;
136134

137135
absl::flat_hash_map<dep_graph::Node, ActivationCondition>
138136
InitializeConditions() const;

ift/encoder/dependency_closure_disabled.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,29 @@ Status DependencyClosure::SegmentsMerged(segment_index_t base_segment,
1919
const SegmentSet& segments) {
2020
return absl::UnimplementedError(
2121
"Dependency graph functionality was disabled during compilation and is "
22-
"unvailable");
22+
"unavailable");
2323
}
2424

2525
StatusOr<DependencyClosure::AnalysisAccuracy> DependencyClosure::AnalyzeSegment(
2626
const SegmentSet& segments, GlyphSet& and_gids, GlyphSet& or_gids,
2727
GlyphSet& exclusive_gids) {
2828
return absl::UnimplementedError(
29-
"Depdency graph functionality was disabled during compilation and is "
30-
"unvailable");
29+
"Dependency graph functionality was disabled during compilation and is "
30+
"unavailable");
3131
}
3232

3333
StatusOr<SegmentSet> DependencyClosure::SegmentsThatInteractWith(
3434
const GlyphSet& glyphs) const {
3535
return absl::UnimplementedError(
36-
"Depdency graph functionality was disabled during compilation and is "
37-
"unvailable");
36+
"Dependency graph functionality was disabled during compilation and is "
37+
"unavailable");
3838
}
3939

4040
StatusOr<SegmentSet> DependencyClosure::SegmentsThatInteractWith(
4141
const SubsetDefinition& def) const {
4242
return absl::UnimplementedError(
43-
"Depdency graph functionality was disabled during compilation and is "
44-
"unvailable");
43+
"Dependency graph functionality was disabled during compilation and is "
44+
"unavailable");
4545
}
4646

4747
} // namespace ift::encoder

0 commit comments

Comments
 (0)