Skip to content

Releases: tommyettinger/textratypist

0.10.0 "Point Break"

31 Aug 22:21
Compare
Choose a tag to compare

This is a pretty big release, in large part due to a fix for #12 , which necessitated a breaking change, but also allowed some extra new features. The change is mostly that [] must be replaced with [ ] to maintain the same behavior as earlier versions of TextraTypist, or you can now use [] in the same way it is used by BitmapFont (to undo one previous level of square-bracket markup). If you encounter bugs with this release (such as line height behavior being wrong), try switching existing [] to [ ] first. The BitmapFont-style [] hasn't been tested as thoroughly but does at least seem to work in narrow circumstances; it may have problems if you try to use [] to "undo" markup when none has been encountered before.

Oh yeah, the new features! The main one is that you can store the current formatting state by assigning it to a label, and load that formatting state later. Storing uses the syntax [(label)], where label can be any String without square brackets but is by convention one word, and loading uses the syntax [ label], with a space before the label String (like how [ ] with no String loads the default format). This has more uses than it might seem at first! An example is if you color text by the character speaking it, but want to interject some note with a different color and/or style in the middle of the spoken text. For example, let's say you have the bold-face villain monologue [dark dull red][*]NONE SHALL STAND BEFORE ME! GENERIC HERO TEAM, YOU SHALL RUE THE DAY YOU CROSSED THE BRUTAL VALXEGAAR! and you want to insert a Wikipedia-style superscript note like [BLUE][^][[[/]dubious - discuss[/]]. If you just inserted the Wikipedia note into the middle of the monologue String, then the blue text and superscript style would last after the note is over, which would make the second sentence the wrong color (and it would be a superscript). If you changed the note to reset the colors and styles at the end, like [BLUE][^][[[/]dubious - discuss[/]][ ], then the superscript style wouldn't be a problem, but the second sentence would use the default color for the Layout or label... which is probably not [dark dull red] unless most sentences are shouted by The Brutal Valxegaar. The new solution is to store the state of the formatting coming into the inserted text, optionally to reset the styles within the insert, to print the insert as normal, and to load the stored state at the end of the insert. This doesn't change the monologue text at all, but does change the insert: [(previous)][ ][BLUE][^][[[/]dubious - discuss[/]][ previous] . This will correctly display the first and last sentences in bold red text, and will have the note in the traditional Wikipedia superscript style.

Other new features include:

  • boxDrawingBreadth to configure how wide lines should be when used for box drawing (and the lines are drawn using the gridGlyphs feature that uses a stretched square to align box sections).
  • The INSTANT effect will cause a section of text to appear all at once. It is roughly equivalent to setting the text speed to infinite and then setting it back after the section is over, except that INSTANT doesn't affect the text speed after it ends (it goes back to whatever the speed was before the INSTANT effect).

Bugs fixed include:

  • #13 appears fixed, depending on if you are using TextraLabel or calling pack() (then it works) or using TypingLabel without setting the boundaries with a Table cell or Container (then it does not). This bug affects or affected wrapping when multiple whitespace characters would have extended past a newline, so some need to be wrapped.
  • User "Antz" and I fixed a strange bug with the initial text passed to a TypingLabel constructor not acting how setText() or restart() would. This bug was very hard to pin down, with the incorrect behavior manifesting in many ways, but it should be fully resolved now.

You shouldn't need to update any of knownFonts this time, unless you are updating from a version earlier than 0.9.0 .

OK, good luck with this one! I expect 5 million bug reports by next week! You have your quota!

0.9.0 "Meditation Upon Form"

15 Aug 05:43
Compare
Choose a tag to compare

If you include only the changes since the alpha 0.9.0-a3, this is a small release. If you include the changes since the last stable release, 0.8.3, this is a massive release! Changes since 0.8.3 include:

  • You can configure many, many more parts of a font.
    • Bold strength, oblique strength, shadow color, two different outline colors, three fancy underline colors...
    • Various position metrics can be adjusted for underline and strikethrough, including setting both at once.
      • You can change the thickness of these lines now, as well as how far they extend into nearby chars, and their x/y position.
    • A font can specify different positions or size for inline images placed into the font, such as emoji or game icons.
      • Size is a little clumsy; increasing xAdvance shrinks the inline images. Sorry.
  • We now require Java 8 or higher to avoid using so much reflection.
    • This should help Graal Native Image usage.
    • Switching to Java 8 or higher is easy, and the only work is probably only needed for gdx-setup projects.
    • Just change any sourceCompatibility, targetCompatibility, or possibly compileJava.options.release from 1.7, 7, or JavaVersion.VERSION_1_7 to the appropriate form of higher version, which could be 1.8, 8, "8", JavaVersion.VERSION_1_8, or a few other forms. Gradle isn't very consistent about how it describes versions.
      • You will also probably need to change your File -> Project Structure (in IntelliJ IDEA) from using version 7 as the default to using 8 or higher.
  • Some new fonts have been added, like LanaPixel, GoNoto Universal (standard), and Gentium Un-Italic.
    • These are in KnownFonts, as usual.
  • Lots of documentation improvements are here, too!

You should probably re-download any .fnt and .png files you use from KnownFonts, because several changed. Remember to check for Java 8 compatibility before adding TextraTypist as a dependency, because Gradle doesn't give nice error messages when a library needs a different version than what it can provide. Enjoy!

0.9.0-a1 "A Horse With No Name"

20 May 22:01
Compare
Choose a tag to compare
Pre-release

This is an alpha release! Some things are expected to be broken! If you're willing to test after that warning, there are many new features here. Most of the rotation bugs that persistently popped up in the 0.7.x and 0.8.x series seem to have been resolved. You can now fine-tune the positions of underline, strikethrough, and inline images (such as emoji) separately from other changes to a Font's metrics. There's a vital bugfix for loading emoji and game-icons from inside a JAR. Calling skipToTheEnd() on a TypingLabel or a widget that contains one should now actually skip to the end immediately. There's a new font, Gentium Un-Italic, which takes Gentium Italic's fancy design and removes its 8-degree slant to make it look like a regular face with a different style. There's a new OceanEffect, which is also handy for fire effects, oddly. Many .fnt and .png files have changed, so you should download anything from knownFonts/ again. Previews have been updated.

I'm suspicious of the vertical position and/or size of Fonts created from BitmapFonts, such as almost anything in scene2d.ui by default. If you encounter problems, please report them in the Issues tab or on the libGDX Discord. If the link is broken, as a fallback use this link.

0.8.3 "Stairway To Heaven"

03 Apr 05:01
Compare
Choose a tag to compare

This release is small, again, but includes useful fixes, again, and some nice new features... again. A somewhat-rare, but serious, bug can happen in earlier versions when a TypingLabel has wrapping text and an effect that changes its offsets variable. This is fixed now. The vertical position of text with [%200]-style scaling now is centered on the middle of the line, rather than the bottom of the line. This matches how other code expected text to scale, so there's less empty space above and less overlap with other lines below. That feature was made possible by IgorApplications, so thanks! There's a new font here, Kingthings Petrock, which is similar to the existing Kingthings Foundation but is less decorative/ornamented, and more legible as the type of text encountered everyday in (a fantasy version of) medieval times.

0.8.2 "Reset The Reset"

25 Mar 05:33
Compare
Choose a tag to compare

This release is very small and sudden! It contains:

  • Improvements to background color size and position,
  • Better emoji/icon/atlas image placement relative to text,
  • A possibly-breaking change with Font.enableShader(), which now does not force the Batch color to white after calling.

Because the last one may require a small change to adapt to, which is just putting batch.setPackedColor(Color.WHITE_FLOAT_BITS); after the call to enableShader() if you encounter issues with color, I figured it was best to get this release out there so code could adapt to it sooner, and any problems with other features can then be isolated to a later (or earlier) release. The position improvements are nice, though.

0.8.1 "Advanced Junkyards and Janitors"

23 Mar 10:05
Compare
Choose a tag to compare

This release fixes a bug with word wrapping that was especially annoying in the last release, has a minor fix to behavior when adding multiple atlases to a Font, allows SDF fonts to work with emoji (mostly), adds the massive SDF pan-unicode font Go Noto Universal, and also adds a new {CANNON} effect. Something is almost assuredly still incorrect here, but outside of known bugs in the README, nothing so far is absolutely broken, so... this looks good to me?

0.8.0 "Double Jump"

18 Mar 06:12
Compare
Choose a tag to compare

This release exists primarily to fix a variety of small bugs in the releases just before it. It's a pretty wide variety... Hopefully the more detailed configuration options for atlases/emoji/icons, which were added here, should avoid one class of bugs where images look wrong relative to text. Another bug regarding images and text was that scaling up a font moved the letters differently from emoji or other images (this is fixed too). Other issues affected wrapping (which should behave better when a widget changes size), pooling (which is now entirely removed, because of some nasty bugs it could cause), TextraWindow's columns (it had a messed up Table inside), and the "fancy underlines" for error and info mode (which were always red by mistake). There's a new geometric-style font, NowAlt, and over 4000 icons from game-icons.net ! I hope this release is more robust than the last few, but if there are issues, I'll be around to fix them.

0.7.7 "The Finglonger"

28 Feb 00:05
Compare
Choose a tag to compare

This release has an assortment of small features and fixes. There's support for and inclusion of MSDFA fonts, using msdf-gdx-gen. There's a few new fonts in KnownFonts -- Gentium MSDF, Yanone Kaffeesatz MSDF, and Yataghan (also MSDF). There's the Font.drawVertices() method that can be overridden to support unusual types of Batch (typically ones with additional attributes). There's various fixes for word wrapping, including unexpected wrapping when a label doesn't have enough width for a word, and the long-standing quirk of \r and \n being treated differently by Font.markup() and Font.regenerateLayout(). Finally, we have the same feature typing-label just added, the {IF} token, which allows conditional replacement of text based on a variable. Lots of stuff! It seems to work well so far, though I'm sure there are bugs somewhere (hopefully small ones).

Have fun with this!

0.7.6 "Crusher Of Bugs"

05 Feb 10:01
Compare
Choose a tag to compare

This release brings back GWT compatibility, since GWT projects failed to compile if they used 0.7.5 (whoops). This updated RegExodus to include its GWT fix, then made a few other fixes to position, especially for underline and strikethrough over emoji (or other images). There were actually quite a few things that were improved for positioning, which is why this took a little longer than expected. Thanks, Sandra, for putting up with my lengthy delay after finding the initial problem!

You can configure a Font more thoroughly in its constructor because widthAdjust and heightAdjust work more as-intended now. They shouldn't pull nearby glyphs in the texture into the space of the current glyph anymore.

You can now use TextraTypist with JDK 7 without issues; only the tests actually require Java 8 to run (because they use LWJGL3).

A bug with pooling in the checkbox widgets has been fixed; not all widgets have been checked for their pooling behavior yet, so if you encounter any Line appearing where it should have been deleted, please submit an issue or tell me on the libGDX Discord! I appreciate it.

You should download any .fnt files you use again, and also the Twemoji atlas file if you use that. The names in the Twemoji atlas are cleaner now, with no smart quotes (single or double), so some glyphs should be easier to enter. All of these are still in assets/ in this repo.

0.7.5 "Turbo Mode"

26 Jan 04:26
Compare
Choose a tag to compare

This release includes many small bug fixes, probably introduces some small bugs, and most notably adds special "alternate modes" that can be applied to text in TextraLabel and TypingLabel. These range from the commonly-requested outline modes (black or white), to drop shadow, to small caps, to word-processor-style red/yellow/blue wiggly underlines. The syntax to enable them is a little odd; see the README.md for the overview, but in general you use [%?shadow] if you want to enable just drop shadow, or [%^shadow] (with a caret instead of a question mark) to enable both small caps and drop shadow. Small caps can be applied at the same time as any one other mode, except "jostle", which isn't compatible with any other modes. Other than that, only one mode can be applied at a time, and it replaces the current scale (which is why the syntax starts with %). You can use more ways of writing a mode in a TypingLabel, like {STYLE=SHADOW}. The different modes are mostly shown in the animated preview in the README.md .

Many of the known fonts have been adjusted, in both KnownFonts.java and the .fnt files themselves, so you'll absolutely want to download the latest versions of any fonts you use. They are all in the knownFonts directory in this repo; you only need the ones you use, but some methods do use many different fonts for the sake of convenience.

The dependencies here are a little different; now we use RegExodus 0.1.14 (which is a minor stability update), and the GWT inherits have changed as well (see README.md for more info if you target HTML).