Skip to content

Releases: tinne26/etxt

v0.0.9

06 Dec 15:41
Compare
Choose a tag to compare

etxt has been stuck on v0.0.8 for waaaaay too long due to v0.0.9 never being quite finished. The reason for this? Twines.

Twines were a nice concept for being able to combine utf8, raw glyph indices and formatting directives all in a single type. Twines were implemented and had some basic testing and even a few cool example programs, but ultimately I decided to remove them and just release all the other improvements that have been in the v0.0.9 alphas for more than a year. The reason for twines not being completely finished is simple: the API was too complex to understand for users, and the implementation was too complex for myself to maintain. It was a single pass implementation, quite efficient but basically unmanageable once text wrapping was considered. I never implemented text wrapping for twines.

The removal of twines also happens because I'm focusing more on ptxt recently, a text renderer for a custom bitmap-like font format that also attempts to implement twines, but in a simpler context. There, I've decided to take a more structured approach, even if it takes multiple passes and a non-trivial amount of memory to be allocated and kept for operation. At least this will work with wrap and be maintainable.

As for the actual improvements of v0.0.9 over v0.0.8, a lot can be read here #7 (although it's now a bit outdated). The tldr is taht there are no new revolutionary concepts, only clean up, clearer API and stuff like that. Some internal/advanced packages had substantial improvements, like the fract package, but that's an advanced feature that most users wouldn't have needed anyway. Internal code got better because of that, but there's nothing groundbreaking to talk about. The single biggest deal in terms of usage is making the canvas part of the draw call parameters instead of part of the renderer state. This aligns much better with ebitengine APIs.

Anyway, this was basically a rant. I'm somewhat sad that I can't get twines out in the world through etxt, but I'm on the third implementation iteration for them now with ptxt and they will come to light someday. In the meantime, keep enjoying the good old etxt... in its sharpest suit to date1.

  1. But hey, text/v2 was released for ebitengine in the meantime, maybe you want to take a look and re-evaluate! I talked quite a bit with Hajime about text/v2, and while I would have made something completely different than what we ultimate got, I never withhold any knowledge and I always tried to add as much value as I could sharing my experience with etxt; we are all in the same boat, trying to make ebitengine as useful as possible.

v0.0.8

07 Dec 09:42
Compare
Choose a tag to compare

Release for a minor fix:

  • Renderer.SelectionRect("\n") was returning a height corresponding to two lines instead of one. In general, any string passed to the function that was made exclusively of \n line breaks would report a height one line taller than expected.

This is an edge case, and it's still possible to be confused about what strings like "\n \n " should return, when only spaces and line breaks are mixed up, so... I don't know. Even I'm not fully confident about what should happen in some of these cases, but I think the new behavior sticks closer to common sense than the old one.

The affectation is fairly limited and niche, but new users are encouraged to use the latest versions of both etxt and Ebitengine.

v0.0.7

23 Oct 08:07
Compare
Choose a tag to compare

Adding auto-detection and parsing of gzipped fonts on ParseFontBytes(), partially motivated by the need in tinne26/fonts. Due to .ttf and .otf headers not colliding with gzip stream headers, this change doesn't break compatibility.

The oldest safe etxt version to use is still v0.0.4.

v0.0.6

05 Sep 16:35
Compare
Choose a tag to compare

With the release of Ebitengine 2.4.0, it's now possible to preserve image bounds. With this, it's been possible to remove the previous GlyphMask struct hack.

Summary of changes:

  • etxt v0.0.6 requires Ebitengine v2.4.1 (as v2.4.0 had an important bug on Windows).
  • The GlyphMask struct hack for Ebitengine has finally been removed.
  • We are now using embed.FS instead of *embed.FS (thanks Sedyh for reporting this one).
  • RectSize deprecated WidthCeil() and HeightCeil() methods have now been fully removed. RectSize.Width.Ceil() and RectSize.Height.Ceil() are now directly suggested in the documentation instead.

Notice that despite the multiple breaking changes, it's ok to not update to v0.0.6 yet if you are working with an older Ebitengine version. No bugs have been found or fixed since v0.0.4, so it's safe to keep using v0.0.4 or v0.0.5 if you wish (or at least, as safe as the new version).

v0.0.5

21 Jul 21:19
Compare
Choose a tag to compare

Celebrating Golang's new documentation features. We now have links and lists and whatever. Yay.

v0.0.4

08 Jul 13:22
Compare
Choose a tag to compare

Bugfixes for a major cache sync issue and a couple minor fractional positioning bugs when using QuantizeVert.

v0.0.3

03 Jul 10:01
Compare
Choose a tag to compare

Bugfix for embed paths. I still didn't get it right... *sight*

v0.0.2

03 Jul 09:48
Compare
Choose a tag to compare

Enough things have happened that deserve a new release:

  • Ebiten was renamed to Ebitengine and all documentation changed a while ago.
  • Switched from .gzip to the far more standard .gz extension for font compression functions. This is a breaking change.
  • FontLibrary.ParseEmbedDirFonts was not working. I was inexcusably loading local files instead of the embedded files.

In the meantime, there has also been progress with additional rasterizers for fancy effects, like the OutlinerRasterizer. This is still a work in progress, though.

v0.0.1

13 May 12:11
Compare
Choose a tag to compare
I'll get it right, eventually.