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

Built fonts lack git hash in version name IDs #234

Closed
thundernixon opened this issue Jan 21, 2020 · 7 comments
Closed

Built fonts lack git hash in version name IDs #234

thundernixon opened this issue Jan 21, 2020 · 7 comments

Comments

@thundernixon
Copy link
Contributor

Describe the bug

In #229, I related that I wasn't able to build the fonts. Luckily, the main issue was solved quite easily. However, I closed it before realizing that a smaller sub-issue wasn't yet solved:

The name IDs 3 & 5 of my built fonts lacked a git hash, as they do have in in the latest release, Inter-V.otf. In #202 from October, this is cited as an issue caused by a change in FontMake

I'm just realizing that this issue is still present in my builds: there is no git hash in versions. I get this:

    <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
      Inter:VF:2020:
    </namerecord>

...and this:

    <namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
      Version 3.012;git-
    </namerecord>

To Reproduce

I'm building with build.sh in
https://github.com/thundernixon/inter/tree/qa.

This is happening for both the variable and static fonts I build.

Expected behavior
I expect the version names to include the latest git hash.

Environment

  • OS: macOS 10.15.2
  • 06b1668 is the latest commit I have from @rsms.
  • I am currently at 07bd35a in my own branch

Additional context
Related to PR google/fonts#1908

@thundernixon
Copy link
Contributor Author

thundernixon commented Jan 22, 2020

I've made a simple FontTools patch for this:

thundernixon@3644302

(This is just a temporary solution, but useful for my PR.)

@rsms
Copy link
Owner

rsms commented Feb 2, 2020

I’m trying to reproduce this but whatever I do I get the git hash in the version as expected.

These are the steps I take to reproduce:

# remove any existing build products like UFOs and then build from scratch
$ misc/googlefonts/build.sh --clean

# dump output as ttx xml
$ (. init.sh ; ttx  -o build/googlefonts/Inter.var.ttf.ttx build/googlefonts/Inter.var.ttf)

# grep for name table record #3 and #5
$ grep -A2 'namerecord nameID="3"' build/googlefonts/Inter.var.ttf.ttx
    <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
      Inter:VF:2020:f93a4a705
    </namerecord>
$ grep -A2 'namerecord nameID="5"' build/googlefonts/Inter.var.ttf.ttx
    <namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
      Version 3.012;git-f93a4a705
    </namerecord>

Is it possible you are building without a .git directory present? That would certainly yield a missing git hash. Can you try running this:

$ git -C /absolute/path/to/repo rev-parse --short HEAD

@rsms
Copy link
Owner

rsms commented Feb 8, 2020

Friendly ping :–)

@thundernixon
Copy link
Contributor Author

thundernixon commented Feb 9, 2020

Hi Rasmus, thanks for taking the time to respond to this.

I just reproduced this again by:

  1. Making a fresh clone, within my local google-font-repos directory:
git clone git@github.com:rsms/inter.git inter3
  1. Running the googlefonts/build.sh script:
type-repos/google-font-repos/inter3  master ✔ 
▶ misc/googlefonts/build.sh
Full output (Click to expand)
using pip 19.2.3 from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip (python 3.7)
using virtualenv: /Library/Frameworks/Python.framework/Versions/3.7/bin/virtualenv
Setting up virtualenv in 'build/venv'
Using base prefix '/Library/Frameworks/Python.framework/Versions/3.7'
New python executable in /Users/stephennixon/type-repos/google-font-repos/inter3/build/venv/bin/python3
Also creating executable in /Users/stephennixon/type-repos/google-font-repos/inter3/build/venv/bin/python
Installing setuptools, pip, wheel...
done.
build/venv/lib/python -> python3.7
build/venv/bin/pip install -r ./requirements.txt
Collecting fonttools[lxml,ufo,unicode]==4.0.1
  Using cached fonttools-4.0.1-py3-none-any.whl (717 kB)
Collecting cu2qu==1.6.6
  Using cached cu2qu-1.6.6-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (249 kB)
Collecting glyphsLib==5.0.1
  Using cached glyphsLib-5.0.1-py3-none-any.whl (734 kB)
Collecting ufo2ft[pathops]==2.9.1
  Using cached ufo2ft-2.9.1-py2.py3-none-any.whl (69 kB)
Collecting defcon[lxml]==0.6.0
  Using cached defcon-0.6.0-py2.py3-none-any.whl (191 kB)
Collecting skia-pathops==0.2.0.post2
  Using cached skia_pathops-0.2.0.post2-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (827 kB)
Collecting MutatorMath==2.1.2
  Using cached MutatorMath-2.1.2-py2.py3-none-any.whl (31 kB)
Collecting brotli==1.0.7
  Using cached Brotli-1.0.7-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (796 kB)
Collecting lxml<5,>=4.0; extra == "lxml"
  Using cached lxml-4.5.0-cp37-cp37m-macosx_10_9_x86_64.whl (4.5 MB)
Collecting fs<3,>=2.2.0; extra == "ufo"
  Using cached fs-2.4.11-py2.py3-none-any.whl (127 kB)
Collecting unicodedata2>=12.0.0; (python_version < "3.8" and platform_python_implementation != "PyPy") and extra == "unicode"
  Using cached unicodedata2-12.1.0-cp37-cp37m-macosx_10_6_intel.whl (811 kB)
Collecting compreffor>=0.4.6
  Using cached compreffor-0.5.0-cp37-cp37m-macosx_10_6_intel.whl (123 kB)
Collecting booleanOperations>=0.8.2
  Using cached booleanOperations-0.9.0-py3-none-any.whl (18 kB)
Collecting fontMath>=0.4.8
  Using cached fontMath-0.5.2-py2.py3-none-any.whl (30 kB)
Collecting pytz
  Using cached pytz-2019.3-py2.py3-none-any.whl (509 kB)
Collecting appdirs~=1.4.3
  Using cached appdirs-1.4.3-py2.py3-none-any.whl (12 kB)
Requirement already satisfied: setuptools in ./build/venv/lib/python3.7/site-packages (from fs<3,>=2.2.0; extra == "ufo"->fonttools[lxml,ufo,unicode]==4.0.1->-r ./requirements.txt (line 1)) (45.2.0)
Collecting six~=1.10
  Using cached six-1.14.0-py2.py3-none-any.whl (10 kB)
Collecting pyclipper>=1.1.0.post1
  Using cached pyclipper-1.1.0.post3-cp37-cp37m-macosx_10_6_intel.whl (290 kB)
ERROR: booleanoperations 0.9.0 has requirement fonttools>=4.0.2, but you'll have fonttools 4.0.1 which is incompatible.
Installing collected packages: lxml, pytz, appdirs, six, fs, unicodedata2, fonttools, cu2qu, defcon, glyphsLib, compreffor, pyclipper, booleanOperations, skia-pathops, ufo2ft, fontMath, MutatorMath, brotli
Successfully installed MutatorMath-2.1.2 appdirs-1.4.3 booleanOperations-0.9.0 brotli-1.0.7 compreffor-0.5.0 cu2qu-1.6.6 defcon-0.6.0 fontMath-0.5.2 fonttools-4.0.1 fs-2.4.11 glyphsLib-5.0.1 lxml-4.5.0 pyclipper-1.1.0.post3 pytz-2019.3 six-1.14.0 skia-pathops-0.2.0.post2 ufo2ft-2.9.1 unicodedata2-12.1.0
Fetching woff2 from https://github.com/google/woff2.git
Cloning into 'build/deps/woff2'...
remote: Enumerating objects: 1126, done.
remote: Total 1126 (delta 0), reused 0 (delta 0), pack-reused 1126
Receiving objects: 100% (1126/1126), 3.45 MiB | 11.96 MiB/s, done.
Resolving deltas: 100% (678/678), done.
Submodule 'brotli' (https://github.com/google/brotli.git) registered for path 'brotli'
Cloning into '/Users/stephennixon/type-repos/google-font-repos/inter3/build/deps/woff2/brotli'...
remote: Enumerating objects: 6, done.        
remote: Counting objects: 100% (6/6), done.        
remote: Compressing objects: 100% (6/6), done.        
remote: Total 5973 (delta 0), reused 0 (delta 0), pack-reused 5967        
Receiving objects: 100% (5973/5973), 30.67 MiB | 21.48 MiB/s, done.
Resolving deltas: 100% (3833/3833), done.
Submodule path 'brotli': checked out '533843e3546cd24c8344eaa899c6b0b681c8d222'
Submodule 'research/esaxx' (https://github.com/hillbig/esaxx) registered for path 'brotli/research/esaxx'
Submodule 'research/libdivsufsort' (https://github.com/y-256/libdivsufsort.git) registered for path 'brotli/research/libdivsufsort'
Cloning into '/Users/stephennixon/type-repos/google-font-repos/inter3/build/deps/woff2/brotli/research/esaxx'...
remote: Enumerating objects: 32, done.        
remote: Total 32 (delta 0), reused 0 (delta 0), pack-reused 32        
Cloning into '/Users/stephennixon/type-repos/google-font-repos/inter3/build/deps/woff2/brotli/research/libdivsufsort'...
remote: Enumerating objects: 210, done.        
remote: Total 210 (delta 0), reused 0 (delta 0), pack-reused 210        
Receiving objects: 100% (210/210), 98.95 KiB | 2.06 MiB/s, done.
Resolving deltas: 100% (129/129), done.
Submodule path 'brotli/research/esaxx': checked out 'ca7cb332011ec37a8436487f210f396b84bd8273'
Submodule path 'brotli/research/libdivsufsort': checked out '5f60d6f026c30fb4ac296f696b3c8b0eb71bd428'
Note: checking out 'a0d0ed7da27b708c0a4e96ad7a998bddc933c06e'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at a0d0ed7 Merge pull request #114 from garretrieger/master
Building woff2
rm -f  src/font.o  src/glyph.o  src/normalize.o  src/table_tags.o  src/transform.o  src/woff2_dec.o  src/woff2_enc.o  src/woff2_common.o  src/woff2_out.o  src/variable_length.o  src/woff2_compress.o  src/woff2_decompress.o  src/woff2_info.o woff2_compress woff2_decompress woff2_info
/Library/Developer/CommandLineTools/usr/bin/make -C brotli clean
rm -rf bin libbrotli.a
c++ -fno-omit-frame-pointer -no-canonical-prefixes -DFONT_COMPRESSION_BIN -D __STDC_FORMAT_MACROS -std=c++11 -I./brotli/c/include/ -I./src -I./include -DOS_MACOSX  -c -o src/font.o src/font.cc
c++ -fno-omit-frame-pointer -no-canonical-prefixes -DFONT_COMPRESSION_BIN -D __STDC_FORMAT_MACROS -std=c++11 -I./brotli/c/include/ -I./src -I./include -DOS_MACOSX  -c -o src/glyph.o src/glyph.cc
c++ -fno-omit-frame-pointer -no-canonical-prefixes -DFONT_COMPRESSION_BIN -D __STDC_FORMAT_MACROS -std=c++11 -I./brotli/c/include/ -I./src -I./include -DOS_MACOSX  -c -o src/normalize.o src/normalize.cc
c++ -fno-omit-frame-pointer -no-canonical-prefixes -DFONT_COMPRESSION_BIN -D __STDC_FORMAT_MACROS -std=c++11 -I./brotli/c/include/ -I./src -I./include -DOS_MACOSX  -c -o src/table_tags.o src/table_tags.cc
c++ -fno-omit-frame-pointer -no-canonical-prefixes -DFONT_COMPRESSION_BIN -D __STDC_FORMAT_MACROS -std=c++11 -I./brotli/c/include/ -I./src -I./include -DOS_MACOSX  -c -o src/transform.o src/transform.cc
c++ -fno-omit-frame-pointer -no-canonical-prefixes -DFONT_COMPRESSION_BIN -D __STDC_FORMAT_MACROS -std=c++11 -I./brotli/c/include/ -I./src -I./include -DOS_MACOSX  -c -o src/woff2_dec.o src/woff2_dec.cc
c++ -fno-omit-frame-pointer -no-canonical-prefixes -DFONT_COMPRESSION_BIN -D __STDC_FORMAT_MACROS -std=c++11 -I./brotli/c/include/ -I./src -I./include -DOS_MACOSX  -c -o src/woff2_enc.o src/woff2_enc.cc
c++ -fno-omit-frame-pointer -no-canonical-prefixes -DFONT_COMPRESSION_BIN -D __STDC_FORMAT_MACROS -std=c++11 -I./brotli/c/include/ -I./src -I./include -DOS_MACOSX  -c -o src/woff2_common.o src/woff2_common.cc
c++ -fno-omit-frame-pointer -no-canonical-prefixes -DFONT_COMPRESSION_BIN -D __STDC_FORMAT_MACROS -std=c++11 -I./brotli/c/include/ -I./src -I./include -DOS_MACOSX  -c -o src/woff2_out.o src/woff2_out.cc
c++ -fno-omit-frame-pointer -no-canonical-prefixes -DFONT_COMPRESSION_BIN -D __STDC_FORMAT_MACROS -std=c++11 -I./brotli/c/include/ -I./src -I./include -DOS_MACOSX  -c -o src/variable_length.o src/variable_length.cc
c++ -fno-omit-frame-pointer -no-canonical-prefixes -DFONT_COMPRESSION_BIN -D __STDC_FORMAT_MACROS -std=c++11 -I./brotli/c/include/ -I./src -I./include -DOS_MACOSX  -c -o src/woff2_compress.o src/woff2_compress.cc
c++ -fno-omit-frame-pointer -no-canonical-prefixes -DFONT_COMPRESSION_BIN -D __STDC_FORMAT_MACROS -std=c++11 -I./brotli/c/include/ -I./src -I./include -DOS_MACOSX  -c -o src/woff2_decompress.o src/woff2_decompress.cc
c++ -fno-omit-frame-pointer -no-canonical-prefixes -DFONT_COMPRESSION_BIN -D __STDC_FORMAT_MACROS -std=c++11 -I./brotli/c/include/ -I./src -I./include -DOS_MACOSX  -c -o src/woff2_info.o src/woff2_info.cc
/Library/Developer/CommandLineTools/usr/bin/make -C brotli lib
mkdir -p bin/obj/c/common
mkdir -p bin/obj/c/dec
mkdir -p bin/obj/c/enc
mkdir -p bin/obj/c/tools
mkdir -p bin/tmp
cc -O2  -Ic/include \
        -c c/common/dictionary.c -o bin/obj/c/common/dictionary.o
cc -O2  -Ic/include \
        -c c/common/transform.c -o bin/obj/c/common/transform.o
cc -O2  -Ic/include \
        -c c/dec/bit_reader.c -o bin/obj/c/dec/bit_reader.o
c++ -fno-omit-frame-pointer -no-canonical-prefixes -DFONT_COMPRESSION_BIN -D __STDC_FORMAT_MACROS -std=c++11 -I./brotli/c/include/ -I./src -I./include -DOS_MACOSX  -c -o src/convert_woff2ttf_fuzzer.o src/convert_woff2ttf_fuzzer.cc
cc -O2  -Ic/include \
        -c c/dec/decode.c -o bin/obj/c/dec/decode.o
c++ -fno-omit-frame-pointer -no-canonical-prefixes -DFONT_COMPRESSION_BIN -D __STDC_FORMAT_MACROS -std=c++11 -I./brotli/c/include/ -I./src -I./include -DOS_MACOSX  -c -o src/convert_woff2ttf_fuzzer_new_entry.o src/convert_woff2ttf_fuzzer_new_entry.cc
cc -O2  -Ic/include \
        -c c/dec/huffman.c -o bin/obj/c/dec/huffman.o
cc -O2  -Ic/include \
        -c c/dec/state.c -o bin/obj/c/dec/state.o
cc -O2  -Ic/include \
        -c c/enc/backward_references.c -o bin/obj/c/enc/backward_references.o
cc -O2  -Ic/include \
        -c c/enc/backward_references_hq.c -o bin/obj/c/enc/backward_references_hq.o
cc -O2  -Ic/include \
        -c c/enc/bit_cost.c -o bin/obj/c/enc/bit_cost.o
cc -O2  -Ic/include \
        -c c/enc/block_splitter.c -o bin/obj/c/enc/block_splitter.o
cc -O2  -Ic/include \
        -c c/enc/brotli_bit_stream.c -o bin/obj/c/enc/brotli_bit_stream.o
cc -O2  -Ic/include \
        -c c/enc/cluster.c -o bin/obj/c/enc/cluster.o
cc -O2  -Ic/include \
        -c c/enc/compress_fragment.c -o bin/obj/c/enc/compress_fragment.o
cc -O2  -Ic/include \
        -c c/enc/compress_fragment_two_pass.c -o bin/obj/c/enc/compress_fragment_two_pass.o
cc -O2  -Ic/include \
        -c c/enc/dictionary_hash.c -o bin/obj/c/enc/dictionary_hash.o
cc -O2  -Ic/include \
        -c c/enc/encode.c -o bin/obj/c/enc/encode.o
cc -O2  -Ic/include \
        -c c/enc/encoder_dict.c -o bin/obj/c/enc/encoder_dict.o
cc -O2  -Ic/include \
        -c c/enc/entropy_encode.c -o bin/obj/c/enc/entropy_encode.o
cc -O2  -Ic/include \
        -c c/enc/histogram.c -o bin/obj/c/enc/histogram.o
cc -O2  -Ic/include \
        -c c/enc/literal_cost.c -o bin/obj/c/enc/literal_cost.o
cc -O2  -Ic/include \
        -c c/enc/memory.c -o bin/obj/c/enc/memory.o
cc -O2  -Ic/include \
        -c c/enc/metablock.c -o bin/obj/c/enc/metablock.o
cc -O2  -Ic/include \
        -c c/enc/static_dict.c -o bin/obj/c/enc/static_dict.o
cc -O2  -Ic/include \
        -c c/enc/utf8_util.c -o bin/obj/c/enc/utf8_util.o
rm -f libbrotli.a
ar -crs libbrotli.a bin/obj/c/common/dictionary.o bin/obj/c/common/transform.o bin/obj/c/dec/bit_reader.o bin/obj/c/dec/decode.o bin/obj/c/dec/huffman.o bin/obj/c/dec/state.o bin/obj/c/enc/backward_references.o bin/obj/c/enc/backward_references_hq.o bin/obj/c/enc/bit_cost.o bin/obj/c/enc/block_splitter.o bin/obj/c/enc/brotli_bit_stream.o bin/obj/c/enc/cluster.o bin/obj/c/enc/compress_fragment.o bin/obj/c/enc/compress_fragment_two_pass.o bin/obj/c/enc/dictionary_hash.o bin/obj/c/enc/encode.o bin/obj/c/enc/encoder_dict.o bin/obj/c/enc/entropy_encode.o bin/obj/c/enc/histogram.o bin/obj/c/enc/literal_cost.o bin/obj/c/enc/memory.o bin/obj/c/enc/metablock.o bin/obj/c/enc/static_dict.o bin/obj/c/enc/utf8_util.o
c++   src/font.o  src/glyph.o  src/normalize.o  src/table_tags.o  src/transform.o  src/woff2_dec.o  src/woff2_enc.o  src/woff2_common.o  src/woff2_out.o  src/variable_length.o brotli/bin/obj/c/common/*.o brotli/bin/obj/c/enc/*.o brotli/bin/obj/c/dec/*.o src/woff2_compress.o -o woff2_compress
c++   src/font.o  src/glyph.o  src/normalize.o  src/table_tags.o  src/transform.o  src/woff2_dec.o  src/woff2_enc.o  src/woff2_common.o  src/woff2_out.o  src/variable_length.o brotli/bin/obj/c/common/*.o brotli/bin/obj/c/enc/*.o brotli/bin/obj/c/dec/*.o src/woff2_decompress.o -o woff2_decompress
c++   src/font.o  src/glyph.o  src/normalize.o  src/table_tags.o  src/transform.o  src/woff2_dec.o  src/woff2_enc.o  src/woff2_common.o  src/woff2_out.o  src/variable_length.o brotli/bin/obj/c/common/*.o brotli/bin/obj/c/enc/*.o brotli/bin/obj/c/dec/*.o src/woff2_info.o -o woff2_info
ar cr src/convert_woff2ttf_fuzzer.a  src/font.o  src/glyph.o  src/normalize.o  src/table_tags.o  src/transform.o  src/woff2_dec.o  src/woff2_enc.o  src/woff2_common.o  src/woff2_out.o  src/variable_length.o \
              brotli/bin/obj/c/common/*.o brotli/bin/obj/c/enc/*.o brotli/bin/obj/c/dec/*.o src/convert_woff2ttf_fuzzer.o
ar cr src/convert_woff2ttf_fuzzer_new_entry.a  src/font.o  src/glyph.o  src/normalize.o  src/table_tags.o  src/transform.o  src/woff2_dec.o  src/woff2_enc.o  src/woff2_common.o  src/woff2_out.o  src/variable_length.o \
              brotli/bin/obj/c/common/*.o brotli/bin/obj/c/enc/*.o brotli/bin/obj/c/dec/*.o src/convert_woff2ttf_fuzzer_new_entry.o
build/venv/bin/woff2_compress -> ../../deps/woff2/woff2_compress
Fetching https://github.com/khaledhosny/ots/releases/download/v7.1.7/ots-7.1.7-osx.zip
#=#=-  #       #                                                                                                                                                                                                                                               #=O=#     #        #                                                                                                                                                                                                                                           -#O=- #      #          #                                                                                             ######################################################################################################################################################################################################################################################### 100.0%
Archive:  ots.zip
   creating: ots-7.1.7-osx/
  inflating: ots-7.1.7-osx/ots-idempotent  
  inflating: ots-7.1.7-osx/ots-perf  
  inflating: ots-7.1.7-osx/ots-sanitize  
  inflating: ots-7.1.7-osx/ots-validator-checker  
build/venv/bin/ots-idempotent -> ../../deps/ots-7.1.7/ots-idempotent
build/venv/bin/ots-perf -> ../../deps/ots-7.1.7/ots-perf
build/venv/bin/ots-sanitize -> ../../deps/ots-7.1.7/ots-sanitize
build/venv/bin/ots-validator-checker -> ../../deps/ots-7.1.7/ots-validator-checker
Fetching https://download.savannah.gnu.org/releases/freetype/ttfautohint-1.8.2-tty-osx.tar.gz
#=#=-  #       #                                                                                                                                                                                                                                               #=O=#     #        #                                                                                                                                                                                                                                           -#O=- #      #          #                                                                                                                                                                                                                                      -=O#-   #        #           #                                                                                                                                                                                                                                 -=O=-#      #         #           #                                                                                                                                                                                                                            -=O=-  #       #          #             #                                                                                                                                                                                                                      -=O=-     #        #            #       ######################################################################################################################################################################################################################################################### 100.0%
build/venv/bin/ttfautohint -> ../../deps/ttfautohint-1.8.2
Building ttf2woff
cc -O2 -g -DVERSION=0.14 -c ttf2woff.c
cc -O2 -g   -c -o readttf.o readttf.c
cc -O2 -g   -c -o readttc.o readttc.c
cc -O2 -g   -c -o readwoff.o readwoff.c
cc -O2 -g   -c -o genwoff.o genwoff.c
cc -O2 -g   -c -o genttf.o genttf.c
cc -O2 -g   -c -o optimize.o optimize.c
cc -O2 -g -c comp-zopfli.c
cc -o ttf2woff ttf2woff.o readttf.o readttc.o readwoff.o genwoff.o genttf.o optimize.o comp-zopfli.o -lm -lz
build/venv/bin/ttf2woff -> ../../../misc/ttf2woff/ttf2woff
Generating 'build/etc/generated.make'
misc/fontbuild glyphsync -o build/ufo src/Inter.glyphs
generating build/ufo/Inter.designspace from src/Inter.glyphs
Instance user-space location (400) redefined by 'Regular'
write build/ufo/Inter.designspace
write build/ufo/Inter-ThinItalic.ufo
write build/ufo/Inter-Italic.ufo
write build/ufo/Inter-BlackItalic.ufo
write build/ufo/Inter-Regular.ufo
write build/ufo/Inter-Black.ufo
write build/ufo/Inter-Thin.ufo
write build/ufo/Inter-roman.designspace
write build/ufo/Inter-italic.designspace
touch "build/ufo/Inter-Thin.ufo"
misc/fontbuild compile-var -o build/fonts/var/Inter.var.otf  build/ufo/Inter.designspace
write build/fonts/var/Inter.var.otf
  1. Getting the name table:

type-repos/google-font-repos/inter3  master ✔                                                                                                                                                                                                                                                                    16h10m  
▶ ttx -t name build/googlefonts/Inter.var.ttf
Dumping "build/googlefonts/Inter.var.ttf" to "build/googlefonts/Inter.var.ttx"...
Dumping 'name' table...

And finding nameIDs 3 & 5:

    <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
      Inter:VF:2020:
    </namerecord>
    <namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
      Inter
    </namerecord>
    <namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
      Version 3.012;git-
    </namerecord>

Just to be sure, I repeated this in the new clone with

$ misc/googlefonts/build.sh --clean

...but get the same result in names 3 & 5.

For my google/fonts PR, I ended up trying to solve/patch this with a specific script that detects the latest merged commit from master, and appends that to these names. It's not the cleanest solution, but I believe it is accurate. Of course, I suppose that it could be considered inaccurate if you want to have the commit hash not from your rsms/inter master, but from thundernixon/inter qa.

Have you been able to try reproducing this on a third computer, by any chance? We could ask someone like Katja for help in running this build. It's possible there is something particular in the Python / brew packages on one of our computers (most likely mine, I would guess) that is impacting this.


P.S.: Nice way to find something in an XML file with grep! I didn't know about the -A option and that it could be used like that. :)

@rsms
Copy link
Owner

rsms commented Apr 4, 2020

I got a repro! Investigating...

@rsms rsms closed this as completed in cd4e4bc Apr 4, 2020
@rsms
Copy link
Owner

rsms commented Apr 4, 2020

Found it! Oh man, it was a tricky one: So two different python files defined getGitHash() and one of their definitions was imported into the other file with an identical definition. It appears as Python is non-deterministic somehow when it comes to redeclaring identifiers local vs imported. So, when the local definition—which had a bug; an undefined variable—was choosen at runtime, then it would fail, but when the imported function was used it would succeed. (cd4e4bc#diff-10b79f1bbe637d66247c8af10d85a4f2L4-L9 if you’re curious. _enc_kwargs in the removed function was undefined.)

That was a tough bug to track down. Thank you!

@arrowtype
Copy link

Woah! Yeah, I tend to find that Python doesn't make it particularly easy to import things between files.

Glad you got it solved! Nice work.

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

No branches or pull requests

3 participants