Git Product home page Git Product logo

ttf2woff's Issues

OTS parsing error: wrong font version for PostScript glyph data

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.

TypeError: arr.readUint16BE is not a function

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

Question : woff2

Any plan on supporting woff2 format, either here or in a separate project ?

update version

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?

throw 'Checksum error in ' + String.fromCharCode.apply

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

Investigate if we can improve zlib speed

(*) 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.

Litte clarification for table alignment

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.

Checksum error in name

ttf2woff hwxh.ttf hwxh.woff

/usr/local/lib/node_modules/ttf2woff/index.js:160
throw 'Checksum error in ' + tableEntry.Tag;
^
Checksum error in name

Broken npm package

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.tgzpackage in archive root,
http://registry.npmjs.org/ttf2woff/-/ttf2woff-1.3.0.tgz — archive with issue

RangeError: Array buffer allocation failed

(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)```

some svg files cant change to woff

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 !!!

Slightly larger filesize than fontfacegen

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?

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.