simoncozens / tensorfont Goto Github PK
View Code? Open in Web Editor NEWTurn font glyphs into numpy arrays
Turn font glyphs into numpy arrays
Please update the support for numpy version of the package. When I call the function as_matrix() for the glyph the numpy library broke the system for deprecated function.
Numpy no longer uses np.float, but float built-in
There are a couple of doc strings that I think are not as clear as they could be.
For example, in the Font
properties dealing with ascenders & descenders, the docs say things like "The font’s ascender height, in font units and pixels."
From a non–font-engineer's perspective, I worry that could be ambiguous as to whether it's referring to "baseline to the top of d/h/l/b", "x-height to the top of d/h/l/b", hheaAscender, typoAscender, or winAscent. So it'd be better to be explicit.
If I understand the intent of the Font
class, its properties are meant to capture "inherent" geometric/optical characteristics.
Assuming that's the case, I'd think there are a few additional ones to consider — such as stroke & aperture metrics. Certainly the width of vertical strokes. I would actually think that the width of n
would be more immediately useful than m
, but I may be misinterpreting the goal.
Essentially, what the set of valuable properties is could be an endless debate, but for classifying typefaces I've been trying to stick to the TypeNetwork parametric-axes model, and I think that works pretty well. So would it make sense to use that as a guide?
It'd essentially be adding horizontal & vertical stem measurements for capitals and lowercase, plus counter widths for capitals & lowercase. That gives you context-free way to measure weight and width (well, in Latin and sister scripts, anyway).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.