Comparing version 0.5.3 to 0.6.0-dev.1
@@ -0,1 +1,9 @@ | ||
# 0.6.0 | ||
- Adds node v12 and v14 support | ||
- Adds `fontnik.composite` | ||
- Drops `libprotobuf` dependency, uses `protozero` instead | ||
- Requires c++14 compatible compiler | ||
- Binaries are published using clang++ 10.0.0 | ||
# 0.5.2 | ||
@@ -2,0 +10,0 @@ |
{ | ||
"name": "fontnik", | ||
"version": "0.5.3", | ||
"version": "0.6.0-dev.1", | ||
"description": "A library that delivers a range of glyphs rendered as SDFs (signed distance fields) in a protobuf.", | ||
@@ -26,7 +26,7 @@ "keywords": [ | ||
"dependencies": { | ||
"glob": "^7.1.1", | ||
"minimist": "^0.2.0", | ||
"nan": "~2.10.0", | ||
"node-pre-gyp": "^0.12.0", | ||
"queue-async": "^1.0.7" | ||
"glob": "^7.1.6", | ||
"minimist": "^1.2.5", | ||
"nan": "^2.14.1", | ||
"node-pre-gyp": "^0.14.0", | ||
"queue-async": "^1.2.1" | ||
}, | ||
@@ -39,2 +39,3 @@ "devDependencies": { | ||
"pbf": "^1.3.5", | ||
"protocol-buffers": "^4.1.0", | ||
"tape": "^4.2.2" | ||
@@ -48,4 +49,3 @@ }, | ||
"install": "node-pre-gyp install --fallback-to-build=true", | ||
"test": "./node_modules/.bin/tape test/**/*.test.js", | ||
"prepublishOnly": "npm ls" | ||
"test": "./node_modules/.bin/tape test/**/*.test.js" | ||
}, | ||
@@ -52,0 +52,0 @@ "binary": { |
@@ -7,6 +7,8 @@ # node-fontnik | ||
A library that delivers a range of glyphs rendered as SDFs (signed distance fields) in a protocol buffer. We use these encoded glyphs as the basic blocks of font rendering in [Mapbox GL](https://github.com/mapbox/mapbox-gl-js). SDF encoding is superior to traditional fonts for our usecase terms of scaling, rotation, and quickly deriving halos - WebGL doesn't have built-in font rendering, so the decision is between vectorization, which tends to be slow, and SDF generation. | ||
A library that delivers a range of glyphs rendered as SDFs (signed distance fields) in a protocol buffer. We use these encoded glyphs as the basic blocks of font rendering in [Mapbox GL](https://github.com/mapbox/mapbox-gl-js). SDF encoding is superior to traditional fonts for our usecase in terms of scaling, rotation, and quickly deriving halos - WebGL doesn't have built-in font rendering, so the decision is between vectorization, which tends to be slow, and SDF generation. | ||
The approach this library takes is to parse and rasterize the font with Freetype (hence the C++ requirement), and then generate a distance field from that rasterized image. | ||
See also [TinySDF](https://github.com/mapbox/tiny-sdf), which is a faster but less precise approach to generating SDFs for fonts. | ||
## [API](API.md) | ||
@@ -19,3 +21,3 @@ | ||
- 64 bit OS X or 64 bit Linux | ||
- Node.js v0.10.x, v0.12.x, v4.x or v6.x | ||
- Node.js v8-v14 | ||
@@ -35,4 +37,20 @@ Just run: | ||
``` | ||
Building from source should automatically install `boost`, `freetype` and `protobuf` locally using [mason](https://github.com/mapbox/mason). These dependencies can be installed manually by running `./scripts/install_mason.sh`. | ||
Building from source should automatically install `boost`, `freetype` and `protozero` locally using [mason](https://github.com/mapbox/mason). These dependencies can be installed manually by running `./scripts/install_deps.sh`. | ||
## Local testing | ||
Run tests with | ||
``` | ||
npm test | ||
``` | ||
If you make any changes to the C++ files in the `src/` directory, you'll need to recompile the node bindings (`fontnik.node`) before testing locally: | ||
``` | ||
make | ||
``` | ||
See the `Makefile` for additional tasks you can run, such as `make coverage`. | ||
## Background reading | ||
@@ -39,0 +57,0 @@ - [Drawing Text with Signed Distance Fields in Mapbox GL](https://www.mapbox.com/blog/text-signed-distance-fields/) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
466486
282
37
58
7
+ Addednan@2.22.2(transitive)
+ Addednode-pre-gyp@0.14.0(transitive)
- Removedminimist@0.2.4(transitive)
- Removednan@2.10.0(transitive)
- Removednode-pre-gyp@0.12.0(transitive)
Updatedglob@^7.1.6
Updatedminimist@^1.2.5
Updatednan@^2.14.1
Updatednode-pre-gyp@^0.14.0
Updatedqueue-async@^1.2.1