Skip to content

Releases: ericfreese/node-freetype2

v1.0.6

29 Nov 08:06
Compare
Choose a tag to compare

Add support for Windows 32bit.

What's Changed

Full Changelog: v1.0.5...v1.0.6

v1.0.5

28 Nov 10:28
Compare
Choose a tag to compare

Fix prebuilds were not N-api

Full Changelog: v1.0.4...v1.0.5

v1.0.4

28 Nov 09:53
Compare
Choose a tag to compare

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

28 Nov 07:16
Compare
Choose a tag to compare

Bump freetype to 2.10.4 #26

Add script for automatic freetype downloading #25

What's Changed

  • Add script for automatic freetype download by @aminya in #25
  • Update freetype vendor by @aminya in #26

Full Changelog: v1.0.2...v1.0.3

v1.0.2

28 Nov 05:23
Compare
Choose a tag to compare

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

28 Nov 01:28
Compare
Choose a tag to compare

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

28 Nov 03:59
Compare
Choose a tag to compare

Node 13, 14, 15 support for the old API of node-freetype2

What's Changed

New Contributors

Full Changelog: v0.4.0...v0.5.0

v1.0.0

27 Nov 23:55
Compare
Choose a tag to compare

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.

What's Changed

Full Changelog: v0.4.0...v1.0.0

v0.4.0

27 Nov 23:54
Compare
Choose a tag to compare

Add Node 12 support. #12

What's Changed

New Contributors

Full Changelog: v0.3.0...v0.4.0