Releases: tommyettinger/textratypist
1.1.0 "Deselected Tofu"
This release adds a few new things in various places, including more effects for TypingLabel and another option for emoji.
New effects include Meet, Zipper, and Slam. Meet positions chars at a random far-away position and moves them into their target positions as if they are meeting up. Zipper is similar, but simply alternates chars sliding in from above and from below. Slam starts chars above their target position, and quickly moves them into their target position, where they can shake briefly.
On the same topic, the Javadocs have been drastically improved for all effects! Now the parameters an effect expects, and the order they can be provided in, are written out for all effects and should be in the class Javadocs for every effect. The formatting could still use some work, but the information is all there, which it wasn't before. Docs for effects are here.
Noto Color Emoji are new, and are a more detailed, "rich" looking set of emoji that use their full-color nature heavily. You can add Noto emoji to an existing font using KnownFonts.addNotoEmoji()
. The existing Twemoji may look better in a simpler or more symbolic set of graphics (they would look much better than Noto in a cel-shaded game, for instance), and the existing OpenMoji have line-art as an option when you really want them to look like text. All of these are now options. You do need the appropriate files for whatever emoji you want to add, as described in the KnownFonts Javadocs.
There's now SelectBox widgets for TextraLabel and TypingLabel items, and since these can display icons/emoji from their font, this (finally) lets you have an icon for each entry in a SelectBox.
There's also [3 files you can copy into a vanilla libGDX project](src\test\java\com\github\tommyettinger\fontwriter) in order to load the .dat or .json files produced by FontWriter, even without an actual dependency on TextraTypist. These may go in their own dependency at some point.
That's about it, for a month's work or so! Enjoy!
1.0.0 "How Big? DAT Big."
This release is a really significant one! 1.0.0 ! About 10 and a half months since the last release, sorry about that! So, what's new...
The knownFonts/
folder is almost completely different now, and you should download any fonts you took from KnownFonts again. But this time, only a few are .fnt ! Most are .dat files, with a similar .png file associated and of course a license file you should distribute. These .dat files are compressed .json files, with the compression a somewhat-rudimentary LZ-based binary type that's GWT-compatible. The main advantage of these fonts is that they can be produced consistently, without needing significant adaptation per-font, descent fiddling, underline stretching, strikethrough shifting, and so on differently for each font. We also have a standard, msdf, and sdf version for every .dat font! You can still download the old .fnt fonts from https://github.com/tommyettinger/fonts , but you can make fonts for the future (as .json or .dat, which behave the same here pretty much) using https://github.com/tommyettinger/fontwriter . Unfortunately, fontwriter is windows-only for now, unless someone wants to build its main dependency, msdf-atlas-gen , for MacOS and/or Linux. Thankfully, .fnt files still work if that's all you can make, plus there are more .dat fonts here to use without building anything.
FWSkin is new! This is an extended Skin that loads both .fnt files and .dat/.json files produced by fontwriter (hence the FW). You can also load FreeType fonts in a Skin .json using FreeTypist, which is like the FreeTypeSkin from the Stripe library, but extending FWSkin instead of just Skin. FWSkin and its relatives load normal libGDX skin.json files, including loading the normal scene2d.ui styles, but they create Font objects whenever they create BitmapFont objects, and also create styles for TextraTypist widgets (which are nested in the Styles
class here) when they create styles for scene2d.ui widgets. If you are using Skin now, you should be able to instantly drop in FWSkin in its place, or FreeTypistSkin if you need FreeType support. FreeTypist is just two files, so you don't really need the .jar files here, and can just copy the two source files if you want...
There are an alternate set of emoji, including one using line art instead of full-color, from OpenMoji. There are a few new fonts, such as the dark medieval-looking Grenze, and more variants on DejaVu Sans and Serif. There's a TextraLabel-based ListBox, which corresponds to scene2d.ui List, and allows putting emoji or other icons into ListBox items. (A SelectBox should be possible soon). When curly-brace markup such as {EFFECT}
isn't a valid option (such as in I18N files), you can use [-EFFECT]
to mean the same thing. Distance field font crispness should be much better, especially if you resize the distance fields using the current Viewport
when resize()
gets called. If crispness is a problem, you can always set a distance field font's crispness with Font.setCrispness(float)
, such as to 0.5f for softer edges or 2.0f for harder ones.
There's probably more I'm forgetting. There were lots of small bug-fixes enacted when I went through every test and updated them, but it's also possible something wasn't sufficiently tested and a bug snuck through. That's for a later release! Enjoy the new features now, though!
0.10.0 "Point Break"
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"
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 possiblycompileJava.options.release
from1.7
,7
, orJavaVersion.VERSION_1_7
to the appropriate form of higher version, which could be1.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.
- You will also probably need to change your
- 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"
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 Font
s created from BitmapFont
s, 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"
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"
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 theBatch
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"
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"
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"
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!