Skip to content

Commit b5aed5d

Browse files
committed
Remove remaining refs to iftb and update the documentation.
1 parent 7dbf16b commit b5aed5d

File tree

5 files changed

+27
-121
lines changed

5 files changed

+27
-121
lines changed

README.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,39 @@
1-
# patch-subset-incxfer
2-
Code repository for the incremental transfer (incxfer) approach to Progressive Font Enrichment ([INCXFER](https://github.com/w3c/patch-subset-incxfer)).
3-
See also ([PFE](https://github.com/w3c/PFE)).
1+
# Incremental Font Transfer Encoder
2+
3+
This code repository contains an implementation of an [incremental font transfer](https://w3c.github.io/IFT/Overview.html) encoder.
4+
5+
Currently this implements a "low level" encoder where a specific segmentation plan (how code points, features, and design space are
6+
split between patches) must be provided to generate the encoding. Eventually a higher level interface will be implemented which is
7+
capable of generating a segmentation plan.
8+
9+
The encoder functionality can either be accessed programmatically via ift/encoder.h or via a command line tool.
10+
11+
## Command Line
12+
13+
The font2ift command line tool can be used to convert a non incremental font into an incremental font and collection of associated
14+
patches. Example usage:
15+
16+
```sh
17+
bazel run util:font2ift -- --input_font=$(pwd)/myfont.ttf --config=$(pwd)/segmentation_plan.txtpb --output_path=$(pwd)/ --output_font="myfont.ift.ttf"
18+
```
19+
20+
Where segmentation_plan.textproto is a textproto file using the util/encoder_config.h schema. See the comments in that file for more details.
421

522
## Build
23+
624
This repository uses the bazel build system. You can build everything:
725

826
```sh
927
bazel build ...
1028
```
1129

1230
and run all of the tests:
31+
1332
```sh
1433
bazel test ...
1534
```
1635

1736
## Code Style
18-
The code follows the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html). Formatting is enforced by an automated check for new commits to this repo. You can auto-correct formatting for all files using the format.sh script.
37+
38+
The code follows the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html). Formatting is enforced by an automated check for new
39+
commits to this repo. You can auto-correct formatting for all files using the format.sh script.

docs/static-ift.md

Lines changed: 0 additions & 96 deletions
This file was deleted.

ift/proto/ift_table.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,7 @@ class IFTTable {
5454

5555
private:
5656
/*
57-
* Adds an encoded 'IFT ' table built from the supplied proto to font pointed
58-
* to by face. By default this will maintain the physical ordering of tables
59-
* already present in the font. If iftb_conversion is set any "IFTB" tables
60-
* if present will be be removed and tables in the final font will be ordered
61-
* according to IFTB ordering requirements.
57+
* Adds an the provided 'IFT ' (and optionally an 'IFTX') tables to by face.
6258
*/
6359
static absl::StatusOr<common::FontData> AddToFont(
6460
hb_face_t* face, absl::string_view ift_table,

ift/proto/ift_table_test.cc

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace ift::proto {
3737
class IFTTableTest : public ::testing::Test {
3838
protected:
3939
IFTTableTest()
40-
: roboto_ab(make_hb_face(nullptr)), iftb(make_hb_face(nullptr)) {
40+
: roboto_ab(make_hb_face(nullptr)) {
4141
sample.SetUrlTemplate("fonts/go/here");
4242
sample.SetId({1, 2, 3, 4});
4343
sample.GetPatchMap().AddEntry({30, 32}, 1, TABLE_KEYED_PARTIAL);
@@ -61,23 +61,9 @@ class IFTTableTest : public ::testing::Test {
6161
hb_blob_unique_ptr blob = make_hb_blob(
6262
hb_blob_create_from_file("common/testdata/Roboto-Regular.ab.ttf"));
6363
roboto_ab = make_hb_face(hb_face_create(blob.get(), 0));
64-
65-
blob = make_hb_blob(
66-
hb_blob_create_from_file("ift/testdata/NotoSansJP-Regular.iftb.ttf"));
67-
FontData font_data(std::move(blob));
68-
69-
std::string copy = font_data.string();
70-
copy[0] = 'O';
71-
copy[1] = 'T';
72-
copy[2] = 'T';
73-
copy[3] = 'O';
74-
75-
font_data.copy(copy);
76-
iftb = font_data.face();
7764
}
7865

7966
hb_face_unique_ptr roboto_ab;
80-
hb_face_unique_ptr iftb;
8167
IFTTable empty;
8268
IFTTable sample;
8369
IFTTable sample_with_extensions;

ift/testdata/README

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)