fontello / ttf2eot Goto Github PK
View Code? Open in Web Editor NEWFont convertor, TTF to EOT, for node.js
License: MIT License
Font convertor, TTF to EOT, for node.js
License: MIT License
The eot fonts do work when i use them on a webpage that i open in ie8 via file but when i open them via http, they dont! When i convert the ttf via weft and enter the urls of the sites where i want to use the fonts, the problem is solved.
So it would be really great if i could enter there allowed urls in ttf2eot so i can use the fonts that are converted with ttf2eot as well.
I've recently encountered issues with a font that did not specify ulCodePageRange1
and ulCodePageRange2
, which conflicts with this part of ttf2eot and gives me the following error:
internal/buffer.js:81 throw new ERR_OUT_OF_RANGE(type || 'offset',
RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 74. Received 78
at boundsError (internal/buffer.js:81:9) at Buffer.readUInt32BE (internal/buffer.js:304:5)
at ttf2eot (/usr/local/lib/node_modules/ttf2eot/index.js:157:34)
at Object.<anonymous> (/usr/local/lib/node_modules/ttf2eot/ttf2eot.js:63:11)
at Module._compile (internal/modules/cjs/loader.js:1015:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Module.load (internal/modules/cjs/loader.js:879:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47
{ code: 'ERR_OUT_OF_RANGE' }
I've seen that version 0 of OS/2 tables doesn't specify these 2 parameters, would it be suitable to wrap this loop in a statement that checks the table version? (I can submit a PR for that if this is out of the the use cases you currently have for this project)
Due to bug in IE, font FullName MUST begin with FamilyName. For example, if FamilyName is fontello, then FullName should be fontello regular and so on.
How to set it?
config : Windows 7
font : Roboto TTF font, subsetted with pyftsubset (from fonttools)
I got this bug with node packages using ttf2eot as dependency.
node version 6.10.0 (I'm currently trying updating node, I'll keep you informed)
WORKSPACE\node_modules\microbuffer\index.js:170
buffer.set(data, offset);
^
TypeError: Cannot read property 'length' of undefined
at Uint8Array.set (native)
at MicroBuffer.writeBytes (WORKSPACE\node_modules\microbuffer\index.js:170:12)
at ttf2eot (WORKSPACE\node_modules\ttf2eot\index.js:229:7)
at Object.<anonymous> (WORKSPACE\node_modules\ttf2eot\ttf2eot.js:58:22)
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.runMain (module.js:604:10)
I may do it if you want. (sorry for the triplet :)
We are using this module in https://github.com/agentk/fontfacegen, but unfortunately, without a programmatic API, it is a bit hard to integrate. I think it should be a simple matter of adding a main
field to package.json
, as follows:
{
...
main: 'index.js'
...
}
Helps solve dotcore64/fontfacegen#32
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.