fontello / ttf2woff Goto Github PK
View Code? Open in Web Editor NEWFont convertor, TTF to WOFF, for node.js
License: MIT License
Font convertor, TTF to WOFF, for node.js
License: MIT License
I am converting myRiadPro.ttf to woff file , It is converting but after when i adding this font in html then font not picking by browser . I got a console warning
CSS:
@font-face {
font-family: 'Myriad Pro';
src: url('../fonts/myRiadPro.woff') format('woff');
}
Error on Browser
Failed to decode downloaded font: http://site-url/myriadpro-regular.woff
(index):1 OTS parsing error: wrong font version for PostScript glyph data
woff mimeType is also set in IIS.
I may do it if you want.
When I use the module locally, it works just fine, but once I deploy to server, this error pops up
The array is the same in both working and crashing environment, and yet, it crashes on server
Any plan on supporting woff2 format, either here or in a separate project ?
Hi,
does this provide a way to convert a SVG color font to a WOFF/WOFF2 COLR font?
version 1.2.0 will cause TypeError: undefined is not a function\n at ttf2woff
in index.js:198:39. Because Uint8Array
does not have slice
function
the latest version in the repository fixes this, so can you update package version?
version 3.0.0 ,when i run :ttf2woff fontello.ttf fontello.woff,console error "arr.readUint16BE is not a function"。version 2.0.0 is ok
ttf2woff ./*.ttf ./*.woff
Please support WOFF 2.0.
...or document more prominently if in fact it is already supported.
(see ananthakumaran/webify#8 for context)
how
ttf2woff -f myText.txt fontello.ttf fontello.woff
cat myText.txt
测试
so
fontello.woff only have ‘测试’
Hi, trying to convert the attach font:
$ ttf2woff f.ttf f.woff
/usr/local/lib/node_modules/ttf2woff/index.js:161
throw 'Checksum error in ' + String.fromCharCode.apply(null, tableEntry.Tag);
^
Checksum error in cmap
(had to gzip to attach)
The file can be opened fine with GNOME font viewer on linux.
f.ttf.gz
(*) Probably, that can be moved to separate library.
Currently we use deflate from Imaya's zlib.js, but it seems that speed can be improved. Note, we need deflate with headers (see zlib spec), not raw deflate. Alternate ports to investigate:
Keep in mind, that all libs are ports of outdated zlib code. Need refresh.
can woff convert to ttf ??
In ttf2woff/index.js at line 203 you seem to be unsure whether the padding should be done with zero bytes. Here is the relavant part from the woff spec (only in v1.0, missing in v2.0):
Except for padding with a maximum of three null bytes in places where 4-byte alignment of a table length or block offset is specified
There you have it: Using 0 bytes for the padding is correct, you can remove the question mark in the comment.
ttf2woff hwxh.ttf hwxh.woff
/usr/local/lib/node_modules/ttf2woff/index.js:160
throw 'Checksum error in ' + tableEntry.Tag;
^
Checksum error in name
Our company mirrors npm registry to closed environment using Sonatype Nexus and some tricky replication. Replication requires package
folder inside tgz archive to work properly.
Looks like something went wrong during preparation of version 1.3.0: instead of package
folder it has fontello-ttf2woff-8e0d929
folder inside — so Nexus can't parse it properly. Could you please update npm package?
Examples:
http://registry.npmjs.org/ttf2woff/-/ttf2woff-1.2.0.tgz — package
in archive root,
http://registry.npmjs.org/ttf2woff/-/ttf2woff-1.3.0.tgz — archive with issue
(function (exports, require, module, __filename, __dirname) { var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath["normalize"](filename);var ret=node
RangeError: Array buffer allocation failed
at Object.<anonymous> (/opt/project/web/themes/project_patternlab/node_modules/ttf2woff2/jssrc/ttf2woff2.js:1:23296)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/opt/project/web/themes/project_patternlab/node_modules/ttf2woff2/jssrc/index.js:3:27)
at Module._compile (module.js:570:32)```
Hello !!! first forgive my poor english
Windows 7
i find some svg files which is from more then one vectorgraph cant change to woff files.
it`s my test project https://github.com/xxholly32/startNodejs/tree/gh-pages/demo/iconfont-svg-demo
i get svg form icomoon by three pic demo.(icomoon.svg)
and a single svg(single.svg) ande use gulp-iconfont to change ttf files
here is the trouble
E:\ideaworkspace\startNodejs\demo\iconfont-svg-demo\www\fonts>ttf2woff icomoon.t
tf icomoon.woff
C:\Users\xiangxiao3\AppData\Roaming\npm\node_modules\ttf2woff\index.js:168
throw 'Checksum error in ' + tableEntry.Tag.toString();
^
Checksum error in glyf
E:\ideaworkspace\startNodejs\demo\iconfont-svg-demo\www\fonts>ttf2woff single.tt
f single.woff
E:\ideaworkspace\startNodejs\demo\iconfont-svg-demo\www\fonts>
maybe is not a question
i am not learn svg deeply
my purpose is that change icomoon.svg to woff file.
ty !!!
The fonts converted by fontfacegen
are slightly smaller (~2kb for a 30kb file, which roughly corresponds to ~7%) than generated by ttf2woff
. Does the tool perform more optimization or is there an ttf2woff
option that could yield smaller files?
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.