Quantcast
Channel: cyotek.com Blog Summary Feed
Viewing all articles
Browse latest Browse all 559

Cyotek.Drawing.Bitmap Version 2 Released

$
0
0

A screenshot of the updated demonstration application

I've slowly been picking up the reins on my languishing open source projects, and the first to get a proper release is ourBMFont parsing library, Cyotek.Drawing.BitmapFont.

What's New and Improved

  • The original library targeted .NET 2.0, the new package targets .NET 3.5, 4.0, 4.5.2, 4.6.2, 4.7.2, and 4.8, .NET Standard 1.3, 2.0 and 2.1, and .NET Core 2.1, 2.2 and 2.3. Unfortunately dotnet build doesn't support .NET 2.0 as far as I can tell so I dropped that target
  • Binary support. I originally added binary support in 2017 and it sat gathering dust in a branch. Now tidied up and part of the core library - I recommend using this format where possible if you care about efficiency
  • Empty and invalid character support. The BitmapFont indexer will no longer throw if the requested character is not found, instead if the font defines the "invalid" character this be returned, otherwise an empty character definition.
  • Assorted performance improvements for loading text based fonts
  • Although not a concern for consumers of the library, the demonstration program has been fleshed out a bit more and an additional demonstration added

A new demonstration application included in the source code

There are various other smaller changes and additions, see theRelease Notes page for the full details.

What's Next

Now that I have a multi-targeted mostly cross-platform version, I can now consider more drastic changes that are breaking. Tentative planning for v3 include

  • Making all structures immutable (properties on theBitmapFont class will remain read-write)
  • Changing all property values to match their binary types, e.g. rather than using int for everything, byte and short will be substituted as appropriate. This doesn't seem to result in much of a drop in memory so this one is tentative
  • Removing the reference to System.Drawing; properties such asBounds will be removed and replaced with individual native properties (e.g. X, Y, Width, Height). Some of these properties were added in v2 and their original counterparts marked as obsolete
  • Adding concrete collections instead of exposing IDictionary which is a) tidier, and b) easier to use
  • Refactoring to move code around
  • Potentially adding the ability to save fonts in each of the 3 formats (no, I am not going to duplicate the BMFont application, but I could see potential value in being able to tweak values)

Comments and suggestions on these potential updates welcome!

Downloading the update

The library is available as a NuGet package, or you can download release binaries and/or source from GitHub.

All content Copyright (c) by Cyotek Ltd or its respective writers. Permission to reproduce news and web log entries and other RSS feed content in unmodified form without notice is granted provided they are not used to endorse or promote any products or opinions (other than what was expressed by the author) and without taking them out of context. Written permission from the copyright owner must be obtained for everything else.
Original URL of this content is https://www.cyotek.com/blog/cyotek-drawing-bitmap-version-2-released?source=rss.


Viewing all articles
Browse latest Browse all 559

Trending Articles