Releases: ericfreese/node-freetype2
v1.0.6
v1.0.5
Fix prebuilds were not N-api
Full Changelog: v1.0.4...v1.0.5
v1.0.4
Switch to prebuildify and node-gyp-build from raw prebuild and prebuild-install #27
What's Changed
Full Changelog: v1.0.3...v1.0.4
v1.0.3
v1.0.2
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
What's Changed
Full Changelog: v1.0.1...v1.0.2
v1.0.1
Add prebuilt binaries
See https://github.com/ericfreese/node-freetype2/releases/tag/v1.0.0 for the changes of v1.0.0
Full Changelog: v1.0.0...v1.0.1
v0.5.0
v1.0.0
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.
egft.Load_Char(face, ch, ft.LOAD_DEFAULT);
would populate the glyph field onface
. 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 asconst 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 thinkft.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.
What's Changed
Full Changelog: v0.4.0...v1.0.0
v0.4.0
Add Node 12 support. #12
What's Changed
- fix: FT_New_Memory_Face "file_base" arg mem is freed by GC by @igorklopov in #10
- fix for node 12 by @romgrk in #12
New Contributors
- @igorklopov made their first contribution in #10
- @romgrk made their first contribution in #12
Full Changelog: v0.3.0...v0.4.0