See documentation on pluminjs.com.
Hacking
All you need is Git + Node. npm run help
to list all tasks
# License
MIT licensed, see LICENSE file.
Create and manipulate fonts like there's no tomorrow.
Home Page: http://www.pluminjs.com
License: MIT License
See documentation on pluminjs.com.
All you need is Git + Node. npm run help
to list all tasks
# License
MIT licensed, see LICENSE file.
The developers of paper.js are willing to see the Font and Glyph types be built right in paper-core: paperjs/paper.js#561
We need to find some time to rewrite those two types in paper.js styles and send a PR.
Having those two libs built-in is problematic: we need to build opentype.js with a special command:
npm install derequire
browserify src/opentype.js --bare --standalone opentype | derequire > dist/opentype.js
It's convenient right now because we use forks of those libs (we have some pending PRs in both projects), but when they stabilize, we should probably consider using https://www.npmjs.com/package/browserify-global-shim
and explain clearly that paper.setup() should be called first
When a font is no longer used, it should be possible to remove the associated font potentially added to the document. This cleanup can only be manual unfortunately.
When I try add some glyphs into a font after updateOTCommand. New glyphs are not apply to new font. I use safari 9.0 on Mac OS. My script as following:
(function(p) {
var font = new p.Font({
familyName: 'Demo',
ascender: 800,
descender: -100
}),
a = new p.Glyph({
name: 'a',
unicode: 'a',
advanceWidth: 496
}),
i = new p.Glyph({
name: 'i',
unicode: 'i',
advanceWidth: 268
}),
shape;
// a contour
shape = new p.Path.RegularPolygon({
center: [268, 124],
sides: 3,
radius: 248
});
shape.rotate(180, [268, 124]);
shape.scale(1, 1.4, [268, 0]);
a.addContour(shape);
// i contour
shape = new p.Path.Rectangle({
point: [60, 0],
size: [140, 500]
});
i.addContour(shape);
font.addGlyph(a);
font.updateOTCommands().addToFonts(); // It's OK.
font.addGlyph(i);
font.updateOTCommands().addToFonts(); // It's not OK. The font did not show glyph "i".
})(plumin.paper);
When I try the interpolation demo, I have this error
glyph.updateOTCommands is not a function.
It send me to this part of the code (line 20650)
this.ot.glyphs.glyphs = (
this.getGlyphSubset( args && args.set ).reduce(function(o, glyph, i) {
o[i] = args && args.shouldUpdateCommands ?
glyph.updateOTCommands( null, args && args.merged ) :
glyph.ot;
return o;
}, {})
);
It's probably a problem on Firefox's side : https://bugzilla.mozilla.org/show_bug.cgi?id=1100005
Not really an issue but I have drawn a monoline alphabet with paper.js
I'm now trying to export my glyphs but plumin.js seems to close all my paths.
Is there a way to get around this ?
In a case of trying to extract glyph drawings from a UFO to insert them in one of the PluminJS demos, I stumbled upon an apparent failure in some specific cases.
Generating a font from a subset of lowercase letters works fine, from a to z. But adding only one capital letter to the subset of glyphs is enough make the plugin demo fail silently. Same happens while trying to do the reverse, an all capital set will be generated, but one lowercase in the midst of it will cause the generation to fail.
Here’s the general process I went through:
– Open a UFO File in Robofont
– have a script generate a proper font and glyph declaration based on the selected glyphs in Robofont
– have the same script generate drawing instructions for each glyph
– use the PluminJS demo to quickly generate a functioning though incomplete webfont from the few glyphs extracted by Robofont and drawn as plumin.Glyphs.
because it'd be nice
When I download a font from http://byte-foundry.github.io/plumin.js/interpolate.html it won't open in FontForge:
And ots says,
$ ot-sanitise ~/Downloads/demo.otf
invalid version tag
Failed to sanitise file!
$
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.