Git Product home page Git Product logo

ttf2woff's Introduction

Fontello - icon font scissors

CI Gitter

website: fontello.com, help: wiki

This tool lets you combine icon webfonts for your own project. With fontello you can:

  1. shrink glyph collections, minimizing font size
  2. merge symbols from several fonts into a single file
  3. access large sets of professional-grade open source icons

Developers API

Fontello allows easy scripting, to implement different convenient features:

  1. Open site from command line, with your configuration, and import edited project
    • Makefile example. That's a live working code, used for development of fontello itself.
  2. Writing website plugins, to import/export icons via admin panel.

When more examples available, those will be added here.

API methods

  1. POST https://fontello.com/ creates a session with your config and return you session_id. You can use it later to open fontello with your configuration and to automatically download your font. Session is stored for 24h. POST params (form-encoded):
    • config - (Required) content of config.json for your font
    • url - (Optional) if used, download button will link to your admin panel, where you can run importing script.
  2. https://fontello.com/[session_id] - opening fontello with your config preloaded. When you edit font, your config is automatically sent to server
  3. https://fontello.com/[session_id]/get - download your font.

Note. When you open site via API url, download button will have another text.

Examples

  • Makefile - quick load iconic font from your project via CLI & save result back.
  • fontello-cli - the same, as above, but written in node.js. If you don't like make utility, then fontello-cli is for you :)
  • fontello_rails_converter - Ruby CLI gem for interacting with the API. Additional features (Sass conversion) for Rails integration, but should work for every project.
  • grunt-fontello - lightweight integration with grunt

Authors

Thanks to:

License

Fontello's code (all files, except fonts) is distributed under MIT license. See LICENSE file for details.

Embedded fonts are distributed under their primary licenses (SIL OFL / CC BY / CC BY-SA). See fonts info on fontello website for credits & links to homepages. This info is also included in generated font archives for your convenience (see LICENSE.txt file).

Generated fonts are intended for web usage, and should not be considered/distributed as independent artwork. Consider fontello a "font archiver" and credit original font creators according to their respective license.

Crediting fontello is not required :)

ttf2woff's People

Contributors

rlidwka avatar snb2013 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ttf2woff's Issues

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

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.

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

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

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?

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

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

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

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.

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?

Question : woff2

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

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.

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.