Comments (11)
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.
@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.
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.
@rvnath I'd be interested too to find a solution to this problem. Did you found something good at the end?
from opentype.js.
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.
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.
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.
Any solution so far? I'm interested too.
from opentype.js.
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.
is there any library to get middle skeleton path ( in JS ) ??
from opentype.js.
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)
- 'liga' should not support only latin words
- missing emoji substitutions HOT 9
- Character rendering issues occur when stroking text. HOT 11
- Detect and remove inner contours from path? HOT 5
- Naming Table Parsing seems buggy HOT 1
- Why isn't the fromSVG API included in the release version? HOT 1
- The variable font code uses Proxy, a non-polyfillable ES6 type. HOT 7
- Local build rules were deleted this should not have happened. HOT 13
- variable fonts: VariationManager set axes values for rendering HOT 12
- Proposal: API change freeze HOT 7
- SVG related y-Axis conversion differs in version 2.0.0
- Handling vertical advance; ascender / descender doesn't look correct for some fonts HOT 6
- `charToGlyph` throws error for missing glyph for fonts with default encoding HOT 1
- Gasp write support broken, opentype.js cannot read the fonts it creates
- `lowMemory` option causes glyphs to be skipped when writing font (with `toArrayBuffer`)
- `Uncaught (in promise) ReferenceError: exports is not defined` when using in Next.js HOT 3
- How can I create or obtain a single stroke line font using opentype.js? (and it can be used for japanese) HOT 2
- strange behavior when two contours overlap HOT 1
- Issues with Rendering Variable Fonts in opentype.js 2.0.0
- Fonts crafted from scratch always result in "not a valid font file" on Windows HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opentype.js.