Giter Club home page Giter Club logo

Comments (3)

Pomax avatar Pomax commented on August 21, 2024

Given that there is no guarantee that the font metrics would be even remotely similar, you'd probably have to do a fair bit of work based on getting the various metrics (both font global and specific to that glyph) for both fonts so you can match one to the other. This is something that might feel like it should be straight forward, but is actually a lot of work in terms of making sure the replacements look right =)

from fontkit.

kckern avatar kckern commented on August 21, 2024

Thanks for the response. Since posting, I've dug in a bit more. Seems like the best route might be to convert ttf to a SVG font, and add glyphs and adjust metrics as needed just with XML manipulation, then convert it back to ttf.

from fontkit.

Pomax avatar Pomax commented on August 21, 2024

That's an option, although you'll still need to perform the metrics matching there, too (so you don't end up with a full stop that's the size of a lowercase O, or positioned halfway up the main font's ascender because the two fonts have different baselines, for example).

Although at that point you're also just "creating a new font" by mashing two fonts together, rather than relying on font stack logic, so I guess the question is "what are you actually doing" (i.e. what kind of thing are you trying to implement, in which tech stack. Because useful as fontkit is, it might not actually be the right tool for the job)

from fontkit.

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.