dotcore64 / fontfacegen Goto Github PK
View Code? Open in Web Editor NEWBrowser font-face generator for creating browser usable fonts from ttf's or otf's
License: MIT License
Browser font-face generator for creating browser usable fonts from ttf's or otf's
License: MIT License
FontFaceException: We are missing some required font packages.
That can be installed with:
brew install fontforge
but fontforge already installed in my system macOS 10.12,
MacOS X 10.10.3
Task:
gulp.task 'fonts', ->
fontfacegen = require('fontfacegen')
fs = require('fs')
path = require('path')
concat = require('concat-files')
fonts = fs.readdirSync('src/fonts/')
cssFiles = []
for font in fonts
extension = path.extname(font)
fontname = path.basename(font, extension)
fontfacegen
source: path.join('src/fonts/', font),
dest: 'build/fonts/',
collate: true
css: "build/fonts/#{fontname}.css"
css_fontpath: "../fonts/"
Results in:
โ eot is empty =(
Deps are installed:
$ brew install fontforge ttf2eot batik
Warning: fontforge-20120731_1 already installed
Warning: ttf2eot-0.0.2-2 already installed
Warning: batik-1.7 already installed
As the title says, If I try to install
npm install -g ttf2svg
I get that error. If not I get
which: no ttf2svg in (/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
Any clue? Thanks in advance
Found the issue but I need @agentk or @sgen to fix this. These two lines are causing the issue. In fact on NPM we still have the 0.1.8 version which is anyway broken because is asking for
createDestinationDirectory(path.dirname(config.less));
which is not there in the config
dictionary. Please fix this asap otherwise a lot of projects, including mine will be affected and we're literally on our bare feet because of this issue.
Thanks in advance!
I propose the airbnb eslint config. Should be rather easy to implement since there is not a lot of code. We will also need to transpile using babel.
Can you consider the switch to sync-exec instead? See mgutz/execSync#38
Thanks in advice :)
I don't have any experience developing on windows, and I don't know how to install fontforge
there inside the CI...
If anyone got any ideas I will give it a try
In languages like Japanese fonts can be several megs big. It would be really useful to have a feature akin to fontsquirrel subset here. Would be able to automatically generate fonts with the characters required and only those characters. For your consideration :)
batik-ttf2svg may not be necessary and is causing a few headaches.
Test removing / replacing it with ttf2svg.
Having this error:
(node:16832) V8: /home/andrey/Git/_www/parcel/node_modules/fontfacegen/node_modules/ttf2woff2/jssrc/ttf2woff2.js:3 Invalid asm.js: Invalid member of stdlib
Please upgrade ttf2woff2 dependence to v4
I'm using fontfacegen in one of my projects, and it's been incredibly helpful. There's just a small issue/bug you may or may not be aware of. Version 0.1.8 on npm doesn't install ttf2woff2 as a dependency. The package.json
for [email protected] lists ttf2woff2 as a devDependency rather than an actual dependency. From the looks of the repo here, it looks like there's been pretty significant code restructuring, but would it be possible to patch this bug in the current release?
At least it does on Ubuntu 15.10.
This creates a where getFontName(),
getFontWeight(),
getFontStyle(), return false, and errors thrown by fontforge are not properly handled.
We should look into automating the installation of our dependencies (ttf2svg, batik-ttf2svg etc)
We need someone to test releases on Linux.
Can we have support for local() syntax?
We need someone to test patches on Mac OS prior to their release.
There is a problem with the "ttf2svg" method on Mac OS.
In commands.js you have defined ttf2svg
command for Linux and batik-ttf2svg
for Mac.
Then in ttf2svg.js you use only ttf2svg without check the operating system.
Running into qdsang/ttf2svg#8. Bumping ttf2svg to the latest version (1.1.0) resolves this.
We need someone to test patches on Windows prior to release.
Preferable Windows 7, 8.x, 10?
Hi.
Tried to create font-face from font 28kb weight, ttf format (also tried another fonts).
this is task in gulpfile.js
gulp.task(
'fonts', ['del-fonts'], function(){
return gulp.src(path.src.fonts)
.pipe(plumber({errorHandler: onError})) // plumber
.pipe(gulpfontgen({
/collate: true,
css_fontpath: path.src.fontface,/
dest: path.build.fonts
}))
.pipe(gulp.dest(path.build.fonts))
.pipe(browserSync.reload({ stream:true }))
.pipe(notify({message: 'FONTS task complete', onLast: true}));
});
task start to run and no finishing until I break it, tried to wait about 30mins.
[11:23:14] Starting 'del-fonts'...
[11:23:14] Finished 'del-fonts' after 8.47 ms
[11:23:14] Starting 'fonts'...
[11:23:14] Finished 'fonts' after 19 ms
no fonts created, no errors in console
CPU is Intel I5 so it seems to be fast enough.
Is there a CLI for this library, so I can use it in a npm script?
We need more than the rudimentary test suite we have now.
We should integrate Appveyor and find out if there are any issues with Windows.
Downloading fontfacegen with npm results in a version pre Linux compatibility commit.
To replicate:
npm install fontfacegen
cat fontfacegen.js
No isLinux check etc.
Just in case its me:
OS: Ubuntu 15.10
fontfacegen: 1.7
NPM: 3.6.0
The OpenSans font used in test.js has a weight of 'book' which is not in the weight table.
This appears to be equivalent to 300 weight: http://www.webtype.com/info/articles/fonts-weights/
We should push for a 1.0.0 release soon so we can take full advantage of semantic versioning.
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.