Code Monkey home page Code Monkey logo

Comments (3)

anthrotype avatar anthrotype commented on May 23, 2024 1

FYI, the table__g_l_y_f class has a removeHinting method, which the subsetter is also using. I recommend you do the same
https://github.com/fonttools/fonttools/blob/197b36fef4a71fa967cb81ec20a63de1f34b6fd7/Lib/fontTools/ttLib/tables/_g_l_y_f.py#L1161

from dehinter.

chrissimpkins avatar chrissimpkins commented on May 23, 2024

hmmm. Did not know that this feature existed in the tool. Too late now :)

Will take a look.

from dehinter.

chrissimpkins avatar chrissimpkins commented on May 23, 2024

With default execution of pyftsubset using:

$ pyftsubset  Ubuntu-Regular.ttf --glyphs="*" --no-hinting

vs. dehinter with:

$ dehinter Ubuntu-Regular.ttf

I get a very large diff. pyftsubset appears to change glyph names, remove post table values, remove nameID records, and more by default. The docs state that that it performs optimizations in preparation for use in web font compiles. There is none of that in this project. This simply removes glyf table TrueType instruction set assembly and "hinting associated" tables. The latter is broadly defined and follows the approach used during the execution of ttfautohint -d [FONT].

I am also clearing bit 4 of the head table flags when LTSH and hdmx tables are removed which according to my read of the OT spec appears to follow guidance. Based on n=1 testing with pyftsubset I don't think that is happening. Likely a minor Microsoft only issue? I still need to add the source for VDMX table removals (#3) which will be in the next release. Once that is in place this project is nearly a reverse engineered ttfautohint -d in Python. There are a handful of head table flags bits outside of the bit 4 issue that are not perfect matches to what takes place with ttfautohint -d execution but otherwise there is a clean diff across a number of fonts that I've tested. Need to investigate further...

from dehinter.

Related Issues (10)

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.