Giter VIP home page Giter VIP logo

counterspace's People

Contributors

simoncozens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

n8willis

counterspace's Issues

Notebook: Getting sample fonts raises FreeType errors

Just played around with the Jupyter notebook this afternoon, and the first cell dies reporting an error from FreeType when it hits the init for the FT_Face:
FT_Exception: FT_Exception: (unknown file format)

Same thing happens in a terminal repl (initially I wondered if it was a problem caused by my browser being run in a snap package, thus downloading the test font to a sandboxed location, but that doesn't seem to be it).

I realize this is rather old code at this point; is it possible that something has changed in the FT wrappers since last year?

FWIW, the CounterSpace func has no problem downloading the fonts. I did, however, notice that FontTools is not listed in the requirements.txt package list, and that also raised an error ... so perhaps the dependencies are still incomplete on my machine....

Catastrophic failure with Crimson

from CounterSpace import CounterSpace
c = CounterSpace("CrimsonRoman.otf",serif_smoothing=5)
c.bare_minimum = 5
c.determine_parameters()
# {'w_top': 16.908982103066425, 'w_bottom': 8.594197614184417, 'h_top': 10.0, 'h_bottom': 10.0, 'h_center': 21.062323710551453, 'w_center': 5.0, 'top_strength': 0.05, 'bottom_strength': 0.7939496853592103, 'center_strength': 3.4482610329952443}

print(c.space("n","n"))
# 38
print(c.space("n","o"))
# 490

autospace: script fails if input font has no `kern` table

Should be easy enough to just create a kern table if it doesn't exist.

But the font I threw at it (Noto Serif Regular) uses (and has) GPOS instead of kern; I'm not sure what the best practice is for that situation. E.g., for experimentation, it might be fun to include both tables and fiddle with the results of toggling between them....

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.