Giter Club home page Giter Club logo

Comments (11)

MCTaylor17 avatar MCTaylor17 commented on August 30, 2024 1

Sorry for reviving this but I found a good resource regarding single line fonts. Maybe useful to somebody now or in the future.

from opentype.js.

davelab6 avatar davelab6 commented on August 30, 2024

@simon-budig demonstrated a way of doing this at LGM, using a kind of reverse voronoi algorithm or something like that

In Metapolator, we push this back on the user and require them to draw contours with pairs of points that when zipped produce the intended effect ;)

from opentype.js.

fdb avatar fdb commented on August 30, 2024

In short, no: opentype.js just gives you the font outlines as they are. There is no support for this kind of mathematical operation.

from opentype.js.

 avatar commented on August 30, 2024

@rvnath I'd be interested too to find a solution to this problem. Did you found something good at the end?

from opentype.js.

rvnath avatar rvnath commented on August 30, 2024

Hello seltziab,

Our business use case was may too much complex.
=> The use case was to develop electronic signboards billing site, where we determine the no. of LED glow bulbs within a set of letters.
=> we had to draw not just one middle path. but many paths would come within a letter's glyph depending upon the stroke width of the glyph.
=> Stroke width of even a single glyph varies at different points.
=> As a consequence, the no. of inner skeletal lines within a letter varies from portion to portion.

So, our approach was semi-automatic and semi-manual:
-- Keeping in mind all these complexities, we let the artist determine which and how mnany skeletal lines come in which part of the letter
-- these lines are drawn using Adobe photoshop / Inkscape
-- Our program takes these paths as SVG and renders them in our website.

Now this worked for us and we are happy :)

from opentype.js.

lgcc avatar lgcc commented on August 30, 2024

Wonder if anyone has a idea of this. I heard that Adobe's new project Faces for iPad can do such thing, yet it's not released

from opentype.js.

fdb avatar fdb commented on August 30, 2024

Sorry, this is outside of the scope of OpenType.js. We will give you the glyph outlines as they exist in the font: you'll probably want to use an additional library for this. (Although I have no idea if there is a JS library that does this?)

from opentype.js.

lmgonzalves avatar lmgonzalves commented on August 30, 2024

Any solution so far? I'm interested too.

from opentype.js.

Jolg42 avatar Jolg42 commented on August 30, 2024

Hi @lmgonzalves
You can look what Prototypo is doing -> https://www.prototypo.io/ & Metapolator too http://metapolator.com/home/ both projects are open source!

from opentype.js.

shubham4286 avatar shubham4286 commented on August 30, 2024

is there any library to get middle skeleton path ( in JS ) ??

from opentype.js.

axkibe avatar axkibe commented on August 30, 2024

You guys are mixing things up.

TrueType and OpenType fonts store the outlines, they don't know a middle path and for a general case there might be none (just think of outline doing a triangle shape for example). So in anyway this beyond the scope of opentype.js.

Single line fonts, are designed as single line to be stroked (that is a shape is moved along the line (like a pen) and the result is the font.. for cases you need the single line / stroking mechanism it surely is better to start with a font that has already been designed this way.

And then there is this situation of you got a font already as truetype and instead of recreating a font all by yourself, you want to find a middle path, as good a possilbe. Supposing it has been designed in a way that gives a feasible solution (like the original post). Don't know if there is a ready made solution for this, I have done something similar in the past but other way around as finding an outline, but contrary to standard stroking I wanted the edges to be cornered again (most graph solutions out there stroke the outline again as far I can tell). What I did was moving the individual path parts (being bezier curves at worst, lines in an ideal case) find their intersections and taking the intersections as new path, so I would go some similar way to find something mostly in the middle. BTW: unfornutally the outline of one bezier is not one bezier again but in the general case can only be approximated by a series of. I limited myself to a lines only problem.

But anyway, while this is one of the things one can certainly use opentype.js as basis for, because you'd need to know the font path.. it's not task of the library itself to be the solution at the same time for all possible applications.

from opentype.js.

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.