Comments (16)
@Pomax only if you are running
npm install
in the fontkit folder. If you are installing something that has fontkit as a dependency (e.g.npm install pdfkit
), devDependencies won't be installed.
@devongovett Is this statement strictly true? I thought it depended upon the value of NODE_ENV. Please see my previous comment
from fontkit.
The problem is that it's required for browserify builds. Moving it to devDependencies would require the user to know to install brfs along with fontkit, or whatever required fontkit.
from fontkit.
Perhaps it could be moved topeerDependencies
? That way npm will print a message.
from fontkit.
note that if it's in devDependencies, it will still get automatically installed during an npm install
run, unless the user explicitly runs npm install --production
, which most people never do (but heroku etc. do)
from fontkit.
@Pomax only if you are running npm install
in the fontkit folder. If you are installing something that has fontkit as a dependency (e.g. npm install pdfkit
), devDependencies won't be installed.
from fontkit.
ah, right.
from fontkit.
For brotli.js I managed to get rid of brfs by writing a base64 JS string version of the binary file and using require
instead of fs.readFileSync
. e.g. module.exports="base64";
. Maybe we can do something similar here. Currently the only file we need to read is the Unicode trie for the arabic shaper.
from fontkit.
Currently, not only brfs
but also browserify-optional
, from this module and also in restructure
, unicode-properties
. It would chop away 40% of node_modules.
from fontkit.
It would also help fix the npm audit
warnings about security vulnerabilities for pdfmake
. See also bpampuch/pdfmake#1639.
from fontkit.
All this talk about chopping off large chunks of depedencies makes me happy. It'd speed up Wakamai Fondue considerably. E.g. I'd only need Brotli to decompress fonts, not to compress them.
In other words, +1
from fontkit.
Unfortunately, all of those dependencies are still required. They are used for builds using browserify.
from fontkit.
@RoelN what part would it speed up, though? The runtime should not be noticably affected by the dependency.
from fontkit.
Having real touble with this, npm install pdfkit --only=prod is kicking this back as a vulnerbility. From what I understand this shouldn't even be installed. Am I doing something wrong? Same issue on linebreak too.
from fontkit.
@GBayliss https://docs.npmjs.com/cli/install
from fontkit.
@awerlang thanks, I read that and tried several permutations but I am still seeing this included when installing the downstream package (pdfkit). This fails npm audit
with a vulnerability due to brfs being a primary dependency of the fontkit package as has previously been debated.
from fontkit.
@Pomax I meant in package size, reducing download time. I don't expect any real difference in runtime.
from fontkit.
Related Issues (20)
- when i use fontkit to genetate the subset of ttf file,but can not open the subset file,shows โnot a valid font fileโ HOT 3
- [Performance] WOFF font format for CJK languages is 5x slower in Chrome and Unresponsive in Firefox HOT 1
- seac-like endchar compatibility syntax not handled HOT 1
- Cannot use Fontkit on CodeSandbox.io HOT 3
- How to extract individual TTF from a font collection (TTC) file?
- Missing initialisation for pts variable for glyphs HOT 1
- Trouble with Kerning / Letter Spacing HOT 1
- fontkit library installing on react js project while importing we have issue
- fonkit 2.0.0 create from ArrayBuffer returns empty `variationAxes` and null parameters HOT 1
- Newest version of restructure doesn't support all string encodings HOT 6
- Empty _table object
- Fontkit.Font to Buffer
- Question: How to lookup name record by nameID
- postscriptname null in some version of fontkit HOT 2
- OS/2 vs hhea font metrics for ascender/descender
- Due to a bug in vhea.js, the advanceHeight is not taken correctly.
- Problem with TTFGlyph caching for Arabic Presentation Forms
- Vulnerability - Malware in legacy-swc-helpers HOT 6
- Latest npm version (2.0.3) throws an error TypeError: (0 , $parcel$interopDefault(...)) is not a function HOT 4
- Issue with namedVariations in Variable Font (SourceSans3VF.otf)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fontkit.