Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve subsetter #1

Merged
merged 272 commits into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
272 commits
Select commit Hold shift + click to select a range
a171edb
Update test logic
LaurenzV Feb 25, 2024
b2eebeb
Change structure
LaurenzV Feb 25, 2024
3b7b00e
Split up tests
LaurenzV Feb 25, 2024
e150e71
Generate tests with Python
LaurenzV Feb 25, 2024
46f5863
rename
LaurenzV Feb 25, 2024
5edb7bc
Add clicker script tests
LaurenzV Feb 25, 2024
2f5ca10
Add moar tests
LaurenzV Feb 25, 2024
c037d03
Add even more tests
LaurenzV Feb 25, 2024
ad86395
Refactor cmap structure
LaurenzV Feb 25, 2024
565ee5a
Added possibility to comment tests
LaurenzV Feb 25, 2024
fb96049
First attempt at implementing subtable 12
LaurenzV Feb 25, 2024
737528a
Fixed annoying bug in mapping logic
LaurenzV Feb 25, 2024
fb8f44f
Added todo comment
LaurenzV Feb 25, 2024
1eb3983
add mplus1p
LaurenzV Feb 25, 2024
1d9a6a6
Add another comment
LaurenzV Feb 25, 2024
81895f0
add otf font
LaurenzV Feb 25, 2024
656a98a
Remove inspect from stream
LaurenzV Feb 25, 2024
11fcf05
Streamline stream data structure a bit
LaurenzV Feb 25, 2024
12a1088
Clean up subtable 4
LaurenzV Feb 25, 2024
635cdd5
Clean up cmap
LaurenzV Feb 25, 2024
b81e13a
Clippy + fmt
LaurenzV Feb 25, 2024
ebe9feb
Clean up subtable 12
LaurenzV Feb 26, 2024
147566f
Remove Profile struct
LaurenzV Feb 26, 2024
b53563c
Introduce mapper struct
LaurenzV Feb 26, 2024
5ff30de
Fix path name
LaurenzV Feb 26, 2024
f1c195a
Change the way the mapper works
LaurenzV Feb 26, 2024
1b485c9
Refactor mapper
LaurenzV Feb 26, 2024
2e1f7d3
Update
LaurenzV Feb 29, 2024
00a335a
Added TODO note
LaurenzV Mar 1, 2024
d2e22c4
Start CFF
LaurenzV Mar 1, 2024
6f7285e
Add dict methods
LaurenzV Mar 2, 2024
0eb71e1
Add initial top dict
LaurenzV Mar 2, 2024
c8a420b
Attempt at encoding
LaurenzV Mar 2, 2024
3acdaaa
Add format2 charset
LaurenzV Mar 3, 2024
a15896e
Use options in reader instead of Result
LaurenzV Mar 3, 2024
c7e7b45
Extract Structure into two separate traits
LaurenzV Mar 3, 2024
99ab0d5
Cleanup
LaurenzV Mar 3, 2024
31e6db3
add const SIZE property
LaurenzV Mar 3, 2024
03cdf54
First attempt at reworking post
LaurenzV Mar 3, 2024
58ba19a
Finish rewriting post table handling
LaurenzV Mar 3, 2024
b9a8f68
Refactor name and post table
LaurenzV Mar 3, 2024
b8dfb34
Rename write to subset
LaurenzV Mar 3, 2024
2abfee2
Add Writer::with_capacity
LaurenzV Mar 3, 2024
fbc8fef
Progress CFF
LaurenzV Mar 4, 2024
eea9509
Add top dict
LaurenzV Mar 4, 2024
bff96b0
Add strings and global subroutines to struct
LaurenzV Mar 4, 2024
4e6942c
Add charset
LaurenzV Mar 4, 2024
10db41c
Start private dict
LaurenzV Mar 4, 2024
b0fc29a
Update font notices
LaurenzV Mar 7, 2024
61225b3
Start SID remapping
LaurenzV Mar 9, 2024
e455bfb
Start with subsetting charset and topdict
LaurenzV Mar 10, 2024
2a1a00c
Add charset subsetting
LaurenzV Mar 10, 2024
8289d09
Prepare charstrings
LaurenzV Mar 10, 2024
0cfac3f
Refactor sid remapper
LaurenzV Mar 10, 2024
b7ded0e
First steps toward adding private dict
LaurenzV Mar 10, 2024
fd48718
Fix top dict parsing
LaurenzV Mar 10, 2024
5f03181
Add private dict and local subrs to CID metadata
LaurenzV Mar 10, 2024
439a75f
Add font dict remapper
LaurenzV Mar 11, 2024
f037654
Progress charstring parsing
LaurenzV Mar 12, 2024
d30bf53
Add argstack
LaurenzV Mar 17, 2024
9594bc8
Align hmtx handling with fonttools
LaurenzV Mar 18, 2024
4460732
Make name subsetting consistent with fonttools
LaurenzV Mar 18, 2024
63efe53
Fix some bugs
LaurenzV Mar 18, 2024
36af02d
CHeckpoint
LaurenzV Mar 19, 2024
29c8b51
Update
LaurenzV Apr 4, 2024
3bdb74d
First attempt
LaurenzV May 10, 2024
cc348f6
Fix bug
LaurenzV May 10, 2024
8afe503
Fix test case
LaurenzV May 10, 2024
789fb48
Improve hmtx subsetting
LaurenzV May 10, 2024
ee21eff
minor cleanup
LaurenzV May 11, 2024
7e560da
Remove number of glyphs
LaurenzV May 11, 2024
673914a
Rework post table a bit
LaurenzV May 11, 2024
1f46c50
Pust post back into a single file
LaurenzV May 11, 2024
1478fd2
Prepare continuation on CFF subsetting
LaurenzV May 12, 2024
6035492
Remove comment from print
LaurenzV May 12, 2024
492fc67
Add parse integer method
LaurenzV May 14, 2024
d181a15
Fix tests
LaurenzV May 14, 2024
3a0c8b7
more changes
LaurenzV May 14, 2024
7c63214
Fix build
LaurenzV May 14, 2024
f3744bd
Fix bugs in dictionary parser
LaurenzV May 14, 2024
ca9292f
Store float in real number
LaurenzV May 14, 2024
cd1050a
CHeckpoint
LaurenzV May 15, 2024
9b14125
Checkpoint
LaurenzV May 15, 2024
073a177
Fix a bug
LaurenzV May 15, 2024
7c61fb3
Some successes
LaurenzV May 15, 2024
6e658bc
add double byte operand
LaurenzV May 15, 2024
1f38a07
Add hintmask
LaurenzV May 16, 2024
a16e8f5
Add debug function
LaurenzV May 16, 2024
0df418d
Finish decompiler
LaurenzV May 16, 2024
e012e75
Remove Rc
LaurenzV May 16, 2024
b7f8098
Add remapper for subroutines
LaurenzV May 16, 2024
0f27541
First demo
LaurenzV May 16, 2024
fc169e7
Add STRING handling
LaurenzV May 16, 2024
61fbff1
Get global subroutines to work
LaurenzV May 16, 2024
84dfadf
Add charset
LaurenzV May 16, 2024
7c41547
Failed attempt at charstrings
LaurenzV May 16, 2024
9af0a13
Fix subroutine bug
LaurenzV May 17, 2024
5687db3
Fix bug
LaurenzV May 17, 2024
ec8fbb0
Delete old cmap
LaurenzV May 17, 2024
562dc4b
Fix test
LaurenzV May 17, 2024
81bd5a5
Refactor number into own file
LaurenzV May 17, 2024
5ed5eb6
Rename number to types
LaurenzV May 17, 2024
fbb2cd0
Move string id into types
LaurenzV May 17, 2024
d44fe35
Move U24
LaurenzV May 17, 2024
006f826
Split write and read into two separate crates
LaurenzV May 17, 2024
dae42f6
Put subset at top of each file
LaurenzV May 17, 2024
b694216
First attempt at improving gid mapper situation
LaurenzV May 17, 2024
01cf80c
Add glyph closure method
LaurenzV May 17, 2024
3c1cd33
Further improvements
LaurenzV May 17, 2024
9123d80
Make gid mapper read only in Context
LaurenzV May 17, 2024
133ae5b
Make mapper return iterator instead
LaurenzV May 17, 2024
4baf835
Improve sid remapper
LaurenzV May 17, 2024
1f24187
Start refactoring dict
LaurenzV May 17, 2024
a1f956e
Refactor dict stuff
LaurenzV May 17, 2024
abd04bc
extract operator into custom module
LaurenzV May 17, 2024
1086912
Refactored charstring parsing
LaurenzV May 17, 2024
0945085
Add subroutine handler
LaurenzV May 17, 2024
ab74fc9
Add subroutine collection
LaurenzV May 17, 2024
49790fa
Make it compile again!
LaurenzV May 17, 2024
f9d0aab
Assume CID-keyed font for now.
LaurenzV May 17, 2024
e85ce7c
Update gid_to_sid method
LaurenzV May 17, 2024
144485b
Fix some warnings
LaurenzV May 17, 2024
ca166a5
Parsing works as expected now
LaurenzV May 17, 2024
0a34291
Fix bug in SID remapper
LaurenzV May 18, 2024
1cfb33c
First attempt
LaurenzV May 18, 2024
c6c87e6
Finish desubroutinizer
LaurenzV May 18, 2024
1f1edee
Revamped font dict parsing a bit
LaurenzV May 18, 2024
f9178e8
Create font dict file
LaurenzV May 18, 2024
356ae32
Write FDSelect
LaurenzV May 18, 2024
5282ae5
Fix SID remapper
LaurenzV May 18, 2024
ede357d
Fix SID remapper
LaurenzV May 18, 2024
40ea746
Add local subrs
LaurenzV May 18, 2024
b7b5e1b
Finish first iteration
LaurenzV May 18, 2024
09f3ca2
First seemingly working version!!
LaurenzV May 18, 2024
5397958
Fix CID bug
LaurenzV May 18, 2024
ba01579
Some more bug fixes
LaurenzV May 18, 2024
3316308
attempted fix
LaurenzV May 18, 2024
37add03
Fix annoying bug with private dict
LaurenzV May 18, 2024
8869b07
Revert not sorting by key
LaurenzV May 18, 2024
bef209f
Don't write local subroutines
LaurenzV May 19, 2024
2c10b33
update API a bit
LaurenzV May 19, 2024
7da4dda
Fix some warnings
LaurenzV May 19, 2024
35c379c
checkpoint
LaurenzV May 20, 2024
a4ba9c8
First attempt
LaurenzV May 20, 2024
0f0cd76
Fixed a bug.
LaurenzV May 20, 2024
5c123aa
Fix some warnings
LaurenzV May 20, 2024
d637a4e
Discovered and fixed bug in htmx
LaurenzV May 20, 2024
e48ccda
Add latin modern roman tests
LaurenzV May 20, 2024
9bc10b3
Update some comments
LaurenzV May 20, 2024
57b5682
Add skrifa tests
LaurenzV May 20, 2024
970c9f3
Fix sorting of tables
LaurenzV May 20, 2024
7adbc37
Fix instructions not being written in component glyphs.
LaurenzV May 20, 2024
abc12ca
Fix tests in skrifa
LaurenzV May 20, 2024
cc2ad2c
Remove freetype
LaurenzV May 21, 2024
4b7e77f
Rework test generation a bit
LaurenzV May 21, 2024
6687dc9
Add basics test
LaurenzV May 21, 2024
c6870bc
Update subset tests
LaurenzV May 21, 2024
ff71eac
Add some fonttools files
LaurenzV May 21, 2024
7863fc4
Finish fonttools test suite
LaurenzV May 21, 2024
b340ba0
Try new CI file
LaurenzV May 21, 2024
7680107
Next attempt
LaurenzV May 21, 2024
5bd5329
Update CI again
LaurenzV May 21, 2024
a736e6b
Fix some clippy lints
LaurenzV May 21, 2024
3ea569a
Add author
LaurenzV May 21, 2024
30aa3a2
Add some documentation
LaurenzV May 21, 2024
a5741aa
Readd gid from slice method
LaurenzV May 21, 2024
5ef1add
Remove write vector
LaurenzV May 21, 2024
8b83115
Rneame types to number
LaurenzV May 21, 2024
00ca25c
First attempt
LaurenzV May 21, 2024
b169ba9
fix one bug
LaurenzV May 21, 2024
8ee5ad3
Fix bug in Fixed writing...
LaurenzV May 21, 2024
93acb42
Only write once
LaurenzV May 22, 2024
5dfc0b5
Split up licenes
LaurenzV May 22, 2024
a7ebf12
Add freetype to the test suite
LaurenzV May 22, 2024
9910ab1
Update gitignore
LaurenzV May 22, 2024
c796c91
Add cargo.lock
LaurenzV May 22, 2024
d88983b
Rework remapper a bit.
LaurenzV May 22, 2024
46ff611
Add documentation to maxp and post
LaurenzV May 22, 2024
49253e9
Add some more documentation.
LaurenzV May 22, 2024
c37bfda
fix docs
LaurenzV May 22, 2024
d49bec3
Document font_dict a bit.
LaurenzV May 22, 2024
e9a3a26
Add more docs
LaurenzV May 22, 2024
1a78ff6
Change how top dict is passed to rewriter
LaurenzV May 22, 2024
c708481
Finalize top_dict
LaurenzV May 22, 2024
f3542bb
Rework charset a bit.
LaurenzV May 22, 2024
a9d3007
Update CID font
LaurenzV May 22, 2024
8237d7b
Add CMMath to tests
LaurenzV May 22, 2024
54331f5
Further polishing
LaurenzV May 22, 2024
ef2de72
Add acknowledgements
LaurenzV May 22, 2024
53761b1
Mostly finish refactoring.
LaurenzV May 22, 2024
23b37dd
Don't put name into it's own folder.
LaurenzV May 22, 2024
5de2ae5
FIx a bug
LaurenzV May 22, 2024
eb15e6f
Fix bug with component glyph handling
LaurenzV May 22, 2024
945d93e
Update fuzzer
LaurenzV May 23, 2024
e169945
Further improve the fuzzer
LaurenzV May 23, 2024
ca0a993
Improve name handling
LaurenzV May 23, 2024
07941e0
Final touches
LaurenzV May 23, 2024
88d708d
Final update
LaurenzV May 23, 2024
7ac747d
First step towards SID to CID
LaurenzV May 23, 2024
05d4166
Finish transition to converting to CID-keyed font.
LaurenzV May 23, 2024
ca306ce
Finish
LaurenzV May 23, 2024
34f9b9d
Change the API to take a mapper instead.
LaurenzV May 24, 2024
1fe03be
fix some stuff
LaurenzV May 24, 2024
d730858
Fix tests
LaurenzV May 25, 2024
2031d7d
CHange charset writing
LaurenzV May 25, 2024
dd156ce
Add comment
LaurenzV May 25, 2024
46e83fd
Remove charset parsing
LaurenzV May 26, 2024
5b60b63
Add comments
LaurenzV May 26, 2024
774ea81
Revert "Remove charset parsing"
LaurenzV May 26, 2024
74af2e1
Fix build
LaurenzV May 26, 2024
e33c003
Add workaround for Apple shenanigans
LaurenzV May 28, 2024
cae0c29
Remove OS, gasp and name from subset
LaurenzV May 28, 2024
2f63bec
Unify error handling a bit.
LaurenzV May 30, 2024
185fe4b
Revert "Remove OS, gasp and name from subset"
LaurenzV May 31, 2024
6f15e21
Don't subset name table away.
LaurenzV May 31, 2024
45eb7c4
First working attempt it seems.
LaurenzV May 31, 2024
6ae1b5b
Fix some tests
LaurenzV May 31, 2024
b17b6ae
Fix some smaller issues
LaurenzV May 31, 2024
3ec1ef5
Remove charset
LaurenzV Jun 1, 2024
e383515
Add freetype to fuzzer
LaurenzV Jun 1, 2024
b0e2322
Go through dict files
LaurenzV Jun 1, 2024
ba6bb5c
more
LaurenzV Jun 1, 2024
b7e443f
Tidy up some more.
LaurenzV Jun 1, 2024
bf858ea
More cleanup
LaurenzV Jun 1, 2024
e020766
Update docs a bit
LaurenzV Jun 1, 2024
8fd540b
Add README in testing
LaurenzV Jun 1, 2024
47e70b6
update README
LaurenzV Jun 1, 2024
b0d05b5
Update CI file
LaurenzV Jun 1, 2024
da4a616
Remove scripts and make clippy happy
LaurenzV Jun 1, 2024
27de0b1
fix CI
LaurenzV Jun 1, 2024
615432c
fix CI
LaurenzV Jun 1, 2024
fc9caa2
fix CI
LaurenzV Jun 1, 2024
c430177
More improvements
LaurenzV Jun 1, 2024
ef7c23f
change branch
LaurenzV Jun 1, 2024
50a5b9e
Fix never-ending test
LaurenzV Jun 1, 2024
8a2f02d
Fix bug in .ttc handling
LaurenzV Jun 2, 2024
aabe232
Add .ttc test case
LaurenzV Jun 2, 2024
2c8870a
Add font
LaurenzV Jun 2, 2024
66213b7
fix bug in private dict rewriting
LaurenzV Jun 5, 2024
13b4f20
fix same bug for sid fonts
LaurenzV Jun 5, 2024
7283542
Add fonts
LaurenzV Jun 5, 2024
eb3c312
Adapt NOTICE
LaurenzV Jun 6, 2024
368e934
Merge font licenses
LaurenzV Jun 6, 2024
ac5f68b
Extract fuzzer into custom crate
LaurenzV Jun 6, 2024
56fea8b
Extract cli into tests folder
LaurenzV Jun 6, 2024
1a7654f
Remove unnecessary dev dependencies
LaurenzV Jun 6, 2024
677d31d
Make remapper implement hash
LaurenzV Jun 7, 2024
5d99129
Try to fix build
LaurenzV Jun 11, 2024
b2288af
Write the font bbox as well
LaurenzV Jun 14, 2024
789239d
Workspacify
laurmaedje Jun 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,31 @@ name: Continuous integration
on: [push, pull_request]

jobs:
ci:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install fonttools
run: pip install fonttools==4.50
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --release
name: Build
- run: cargo test --release
name: Run tests

checks:
name: Check clippy, formatting, and documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-hack
- run: cargo clippy
- run: cargo fmt --check --all
- run: cargo doc --workspace --no-deps
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@ desktop.ini
# Rust
/target
bench/target
Cargo.lock
debug
.idea

# Tests
tests/subsets
tests/ttx/*.otf
tests/ttx/*_ref.ttx
Loading