xkcd-font icon indicating copy to clipboard operation
xkcd-font copied to clipboard

xkcd-Script: generate with FontForge official package

Open dummy-index opened this issue 5 years ago • 0 comments

Hello. I try to generate xkcd-script without installing any compiler, and it seems to almost succesful in sense of binary reproduction. But a mystery appears.

Procedure

pt1, pt2: run with Anaconda python (python 3.6)

  • install numpy, scipy, skimage by conda
  • install parse.py by pip

pt3, pt4, pt5: run with ffpython.exe in FontForgeBuilds (Windows Installer)

  • FontForgeBuilds bundle ffpython and potrace
  • install parse.py by hand (copy it into FontForgeBuilds/lib/python*.*/site-packages/)
  • I tested with FontForge-2016-10-04-Windows.exe, FontForge-2017-07-31-Windows-r2.exe, FontForge-2019-04-13-Windows.exe, FontForge-2020-03-14-Windows.exe

code fix needed: #35

Mystery

I generate fonts with 4 versions of FontForgeBuilds. xkcd-script-withffpython.zip Here *.otf are generated by pt5_gen_reprod_font.py with changes:

- ttf = os.path.join(base, 'xkcd-script.ttf') + ttf = os.path.join(base, 'xkcd-script.otf')

And I checked these fonts with ttx (fonttools), I found that most similar to the latest xkcd-script.ttf is xkcd-script-ff20161014.otf. ...Somehow the latest xkcd-script.ttf has CFF table (cubic outline), every ffpython output the ttf with glyf table (quadratic outline). I was convinced that font.generate('foobar.ttf') always makes outline quadratic... but why?

2020/10/25 To get ttf with CFF table, I want a modify: - font.generate(ttf) + otf = os.path.join(base, 'xkcd-script-ttf.otf') + font.generate(otf) + shutil.move(otf, ttf)

2020/12/5 Sorry, probably I had compared to xkcd-script.woff mistakenly. xkcd-script.ttf has quadratic outline.

dummy-index avatar Oct 22 '20 14:10 dummy-index