Giter Site home page Giter Site logo

Comments (11)

justvanrossum avatar justvanrossum commented on June 4, 2024

While I see this as a useful feature, it is a bit of a slippery slope, UI-wise, as it would make it go into the direction of rich text formatting. Your suggestion at #43 takes this indeed a step further.

But before I break my head and think of what the user interface for this could possibly be like: I don't think uharfbuzz exposes this at the moment. Or am I missing something?

from fontgoggles.

khaledhosny avatar khaledhosny commented on June 4, 2024

In uharfbuzz that would be the value of the feature (in other types of lookups non-zero value means enable, here it selects the alternate, 1 for 1st, 2 for 2nd etc.)

from fontgoggles.

justvanrossum avatar justvanrossum commented on June 4, 2024

I mean the range thing, as in:

"aalt[3:5]=2" 2 3 5 # Turn 2nd alternate on for range

from fontgoggles.

khaledhosny avatar khaledhosny commented on June 4, 2024

I’m OK if this and #43 are out of scope, it just happens that the fonts I do right now are full of character-level alternates.

from fontgoggles.

khaledhosny avatar khaledhosny commented on June 4, 2024

The range would be for #43 not this one, and apparently it isn’t supported.

from fontgoggles.

justvanrossum avatar justvanrossum commented on June 4, 2024

But wouldn't you want to choose an alternate on a per-character basis?

Btw. I didn't know about the extended meaning of the feature value: thanks, that's very useful.

from fontgoggles.

justvanrossum avatar justvanrossum commented on June 4, 2024

But if this feature is already useful with one value for the entire string, then I see a UI possibility: perhaps control-click on the feature tag box could bring up a menu with alt indices.

from fontgoggles.

khaledhosny avatar khaledhosny commented on June 4, 2024

But wouldn't you want to choose an alternate on a per-character basis?

Usually, but that wouldn’t be a requirement (I might want to test, e.g, a ssty feature in a math font, and so applying it to all charters would be fine or even what I really want).

from fontgoggles.

justvanrossum avatar justvanrossum commented on June 4, 2024

I have implemented this with a contextual menu for GSUB feature tags. It allows selection of an alternate number regardless of whether the feature actually uses alternates, as (u)harfbuzz doesn't expose an API to find this out quickly, and I don't want to parse GSUB with fontTools just to get this info.

TODO: document this on the website. Will do that when I'm closer to release (which should be soon anyway).

from fontgoggles.

justvanrossum avatar justvanrossum commented on June 4, 2024

FG v1.1 just landed containing this feature, and I wrote a note about it on the website.

from fontgoggles.

khaledhosny avatar khaledhosny commented on June 4, 2024

Thanks!

from fontgoggles.

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.