Bot releases are hidden (Show)
Add support for Windows 32bit.
Full Changelog: https://github.com/ericfreese/node-freetype2/compare/v1.0.5...v1.0.6
Published by aminya almost 4 years ago
Fix prebuilds were not N-api
Full Changelog: https://github.com/ericfreese/node-freetype2/compare/v1.0.4...v1.0.5
Published by aminya almost 4 years ago
Bump freetype to 2.10.4 #26
Add script for automatic freetype downloading #25
Full Changelog: https://github.com/ericfreese/node-freetype2/compare/v1.0.2...v1.0.3
Published by aminya almost 4 years ago
Fix the prebuild-install command which resulted in building the package from scratch.
See https://github.com/ericfreese/node-freetype2/releases/tag/v1.0.0 for the changes of v1.0.0
Full Changelog: https://github.com/ericfreese/node-freetype2/compare/v1.0.1...v1.0.2
Published by aminya almost 4 years ago
Node 13, 14, 15 support for the old API of node-freetype2
Full Changelog: https://github.com/ericfreese/node-freetype2/compare/v0.4.0...v0.5.0
Published by aminya almost 4 years ago
Add prebuilt binaries
See https://github.com/ericfreese/node-freetype2/releases/tag/v1.0.0 for the changes of v1.0.0
Full Changelog: https://github.com/ericfreese/node-freetype2/compare/v1.0.0...v1.0.1
Published by aminya almost 4 years ago
The package is rewritten #18.
Closes #17
This is a very large overhaul of the library. I did this as a rewrite using the existing code mostly for inspiration and as a reference, so not a lot of it is the same. I shall try and summaries the key differences below:
Rewrite using napi instead of nan
This makes the binaries more cross-version and reduces the maintenance needed when newer versions of node are released (as long as they support the napi version we use, it will work)
Major api changes
The main reason for this was the library was propagating a very c-like way of doing things.
eg ft.Load_Char(face, ch, ft.LOAD_DEFAULT);
would populate the glyph field on face
. This is not a js way of working, and so is likely to cause confusion or error, especially if mixed with async code. Instead, it is done as const glyph = face.loadChar(ch, {...})
. With this, a lot of the functions now belong to a class rather than expecting an object as the first parameter, the Load_Char to loadChar change also demonstrates this.
Additionally, various function input types have been changed from bitmasks when appropriate, to make it easier to understand what the possible options are.
The methods have all been renamed too, to be more js like. (I have a feeling the original naming was upsetting some linters)
Fix many possible segfaults
At various points the native code was assuming that the custom type was being passed back in. I think ft.Load_Char(face, ch, ft.LOAD_DEFAULT)
was assuming face would be the correct type. If it was not then it would segfault and crash node, rather than throw an exception which could be handled. This was true of many places.
Add more unit tests
Add typescript definitions
This will make the library easier to work with, as the IDE will give correct type hinting, and anyone using typescript will have proper type-safety.
Publish prebuilds, to avoid need to compile lib during install
This reduces install time, and removes the need to have a compiler for almost all installs
Switch CI to github-actions instead of travis
Personal preference thing really, but fixes the broken ci too
I think this example shows the api changes quite well master...Julusian:master
#diff-8e25c8e559
I haven't checked how much of the api I have implemented compared to before, I worked through a fair chunk of it, mostly based on what was needed and what looked to be most useful, so it is possible some bits have been removed for now.
If you want to merge this, I shall undo some of the documentation changes to point back to this repo and write some better docs on migrating existing code to the new version. The version number should probably be bumped higher too, due to the completely different api.
Full Changelog: https://github.com/ericfreese/node-freetype2/compare/v0.4.0...v1.0.0
Published by aminya almost 4 years ago
Add Node 12 support. #12
Full Changelog: https://github.com/ericfreese/node-freetype2/compare/v0.3.0...v0.4.0