GithubHelp home page GithubHelp logo

Freezing a stylistic set can cause other stylistic sets that replace overlapping glyphs to malfunction about fonttools-opentype-feature-freezer HOT 3 OPEN

twardoch avatar twardoch commented on July 23, 2024
Freezing a stylistic set can cause other stylistic sets that replace overlapping glyphs to malfunction

from fonttools-opentype-feature-freezer.

Comments (3)

twardoch avatar twardoch commented on July 23, 2024

If you have "a" and lookup1 associated with ss01 replaces "a" with "a.ss01", and lookup2 associated with ss02 replaces "a" with "a.ss02", then when you enable both features and you type U+0061, you get "a" which then gets replaced with "a.ss01" and the lookup associated with ss02 has nothing to replace.

If you "freeze" ss02, then U+0061 gets reassigned from "a" to "a.ss02" so it's the direct input. The lookup associated with ss01 then has no effect because it still expects "a" as input.

The tool is simple — it only reassigns the Unicode to another glyph (the one that is the result of a 1:1 replacement). It doesn't change the way other features work. That would be arcane and unpredictable (esp. in contextual subs). The tool is deliberately simple and works as designed.

from fonttools-opentype-feature-freezer.

twardoch avatar twardoch commented on July 23, 2024

PS. The tool does not remove any glyphs, because a glyph from which it "steals" the Unicode may (or may not) be also used as an output glyph in some feature. So it's safer to "orphan" the glyph. (Because the tool is deliberately simple and does not try to be overly clever).

But you may use pyftsubset to remove these orphaned glyphs afterwards at your discretion.

from fonttools-opentype-feature-freezer.

twardoch avatar twardoch commented on July 23, 2024

In the end, it really depends how the features are written in the font, on the order of the original lookups. The tool only changes the entry points to the OT features maze (reassigns the Unicode codepoints), but it keeps the maze untouched.

from fonttools-opentype-feature-freezer.

Related Issues (20)

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.