Skip to content

Commit 49b6d13

Browse files
committed
Update encoder to diff CFF if present.
1 parent b3d2187 commit 49b6d13

File tree

5 files changed

+37
-39
lines changed

5 files changed

+37
-39
lines changed

MODULE.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ http_archive(
7272
# Fontations
7373
http_archive(
7474
name = "fontations",
75-
urls = ["https://github.com/googlefonts/fontations/archive/13fefb967cd4ee176bf0730b2bea8cd3ade7646d.zip"],
76-
strip_prefix = "fontations-13fefb967cd4ee176bf0730b2bea8cd3ade7646d",
75+
urls = ["https://github.com/googlefonts/fontations/archive/94b307c0cafd7c01303512561adea12caf0b8448.zip"],
76+
strip_prefix = "fontations-94b307c0cafd7c01303512561adea12caf0b8448",
7777
build_file = "//third_party:fontations.BUILD",
78-
integrity = "sha256-AalVpu9w4cZwq8cbbk+I8XPVch3d3nxCGHq5YBTa3dY=",
78+
integrity = "sha256-wahAEZhicU9APfEV/eNmdzTxMDO1JV1KGZzCMw9wers=",
7979
)
8080

8181

fontations/Cargo.lock

Lines changed: 31 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ift/encoder/encoder.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ Status Encoder::EnsureGlyphKeyedPatchesPopulated(
314314
}
315315

316316
GlyphKeyedDiff differ(instance, compat_id,
317-
{FontHelper::kGlyf, FontHelper::kGvar});
317+
{FontHelper::kGlyf, FontHelper::kGvar, FontHelper::kCFF});
318318

319319
for (uint32_t index : reachable_segments) {
320320
auto e = glyph_data_patches_.find(index);

ift/encoder/encoder.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class Encoder {
211211

212212
static ift::TableKeyedDiff* MixedModeTableKeyedDiff(
213213
common::CompatId base_compat_id) {
214-
return new TableKeyedDiff(base_compat_id, {"IFTX", "glyf", "loca", "gvar"});
214+
return new TableKeyedDiff(base_compat_id, {"IFTX", "glyf", "loca", "gvar", "CFF "});
215215
}
216216

217217
static ift::TableKeyedDiff* ReplaceIftMapTableKeyedDiff(
@@ -220,7 +220,7 @@ class Encoder {
220220
// gvar and "IFT " are overwritten to be compatible with the new design
221221
// space. Glyph segment patches for all prev loaded glyphs will be
222222
// downloaded to repopulate variation data for any already loaded glyphs.
223-
return new TableKeyedDiff(base_compat_id, {"glyf", "loca"},
223+
return new TableKeyedDiff(base_compat_id, {"glyf", "loca", "CFF "},
224224
{"IFTX", "gvar"});
225225
}
226226

third_party/fontations.BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ rust_library(
4343
":klippa",
4444
"@fontations_deps//:data-encoding",
4545
"@fontations_deps//:data-encoding-macro",
46-
"@fontations_deps//:uri-template-system",
4746
],
4847
)
4948

0 commit comments

Comments
 (0)