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

We don't match fontmake for the test file WghtVar_Anchors.glyphs #530

Open
rsheeter opened this issue Oct 31, 2023 · 3 comments
Open

We don't match fontmake for the test file WghtVar_Anchors.glyphs #530

rsheeter opened this issue Oct 31, 2023 · 3 comments

Comments

@rsheeter
Copy link
Contributor

$ python resources/scripts/ttx_diff.py --compare default resources/testdata/glyphs3/WghtVar_Anchors.glyphs
COMPARISON
  Only fontmake produced 'MVAR'
  Identical 'GDEF'
  Identical 'GPOS'
  Identical 'GlyphOrder'
  Identical 'HVAR'
  DIFF 'OS_2', build/default/fontc.OS_2.ttx build/default/fontmake.OS_2.ttx
  Identical 'STAT'
  Identical 'cmap'
  Identical 'fvar'
  DIFF 'glyf', build/default/fontc.glyf.ttx build/default/fontmake.glyf.ttx
  DIFF 'gvar', build/default/fontc.gvar.ttx build/default/fontmake.gvar.ttx
  DIFF 'head', build/default/fontc.head.ttx build/default/fontmake.head.ttx
  DIFF 'hhea', build/default/fontc.hhea.ttx build/default/fontmake.hhea.ttx
  DIFF 'hmtx', build/default/fontc.hmtx.ttx build/default/fontmake.hmtx.ttx
  Identical 'loca'
  Identical 'maxp'
  Identical 'name'
  Identical 'post'

Rather more diffs than one might have expected.

@anthrotype
Copy link
Member

I don't get the same output as yours...
I checked out the PR branch #492 "back_when_mark_was_marky_mark" at the latest commit 01ad09c, then run the following command:

$ rm -rf build && python resources/scripts/ttx_diff.py resources/testdata/glyphs3/WghtVar_Anchors.glyphs
Compare default in build/default
  (cd build/default && cargo run -p fontc -- --no-production-names --source /usr/local/google/home/clupo/oss/fontc/resources/testdata/glyphs3/WghtVar_Anchors.glyphs --build-dir . > fontc.log 2>&1)
  (cd build/default && ttx -o font.ttx font.ttf > ttx.log 2>&1)
  (cd build/default && fontmake -o variable --output-dir WghtVar_Anchors.glyphs --drop-implied-oncurves --no-production-names --debug-feature-file debug.fea /usr/local/google/home/clupo/oss/fontc/resources/testdata/glyphs3/WghtVar_Anchors.glyphs > fontmake.log 2>&1)
  (cd build/default/WghtVar_Anchors.glyphs && ttx -o WghtVar_Anchors-VF.ttx WghtVar_Anchors-VF.ttf > ttx.log 2>&1)
TTX FILES
  fontc     build/default/fontc.ttx
  fontmake  build/default/fontmake.ttx
COMPARISON
  Only fontmake produced 'MVAR'
  Identical 'GDEF'
  Identical 'GPOS'
  Identical 'GlyphOrder'
  Identical 'HVAR'
  DIFF 'OS_2', build/default/fontc.OS_2.ttx build/default/fontmake.OS_2.ttx
  Identical 'STAT'
  Identical 'cmap'
  Identical 'fvar'
  Identical 'glyf'
  Identical 'gvar'
  DIFF 'head', build/default/fontc.head.ttx build/default/fontmake.head.ttx
  Identical 'hhea'
  Identical 'hmtx'
  Identical 'loca'
  Identical 'maxp'
  Identical 'name'
  Identical 'post'
Compare gftools in build/gftools
  (cd build/gftools && cargo run -p fontc -- --no-production-names --source /usr/local/google/home/clupo/oss/fontc/resources/testdata/glyphs3/WghtVar_Anchors.glyphs --build-dir . --flatten-components --decompose-transformed-components > fontc.log 2>&1)
  (cd build/gftools && ttx -o font.ttx font.ttf > ttx.log 2>&1)
  (cd build/gftools && fontmake -o variable --output-dir WghtVar_Anchors.glyphs --drop-implied-oncurves --no-production-names --debug-feature-file debug.fea --filter FlattenComponentsFilter --filter DecomposeTransformedComponentsFilter /usr/local/google/home/clupo/oss/fontc/resources/testdata/glyphs3/WghtVar_Anchors.glyphs > fontmake.log 2>&1)
  (cd build/gftools/WghtVar_Anchors.glyphs && ttx -o WghtVar_Anchors-VF.ttx WghtVar_Anchors-VF.ttf > ttx.log 2>&1)
TTX FILES
  fontc     build/gftools/fontc.ttx
  fontmake  build/gftools/fontmake.ttx
COMPARISON
  Only fontmake produced 'MVAR'
  Identical 'GDEF'
  Identical 'GPOS'
  Identical 'GlyphOrder'
  Identical 'HVAR'
  DIFF 'OS_2', build/gftools/fontc.OS_2.ttx build/gftools/fontmake.OS_2.ttx
  Identical 'STAT'
  Identical 'cmap'
  Identical 'fvar'
  Identical 'glyf'
  Identical 'gvar'
  DIFF 'head', build/gftools/fontc.head.ttx build/gftools/fontmake.head.ttx
  Identical 'hhea'
  Identical 'hmtx'
  Identical 'loca'
  Identical 'maxp'
  Identical 'name'
  Identical 'post'

This is inside a venv which which was initialised using resources/scripts/requirements.txt, which has fontmake pinned as 3.7.1. My fonttools is 4.43.1 (latest).

@rsheeter
Copy link
Contributor Author

I must have something python out of date where I tested then. I'll retry in a bit and probably close.

@rsheeter
Copy link
Contributor Author

OK cool, I think fonttools 4.43.0 => 4.43.1 helped. I still see different OS/2 and head so maybe we can fix that then close since MVAR has a ticket of it's own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants