Releases: tommyettinger/textratypist
0.7.6 "Crusher Of Bugs"
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"
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).
0.7.4 "Just Click And Drag"
This release mostly exists to add the selectable
option to TypingLabel, though there are also some fixes for color handling. You can do what you like with selected text; when a selection is made available, the "*SELECTED"
event is triggered, and you can call getSelectedText()
or copySelectedText()
on the TypingLabel to get or copy that selected range. You could also use selection for some other purpose, such as in puzzle gameplay.
0.7.3 "Glyph Glitz"
This release is mostly a checkpoint before some major, possibly-longer-term, work starts on an equivalent to TextField. Included here is a new Font.markupGlyph()
method that just takes normal markup and returns the first char; this can be useful to enter emoji and get back a single glyph. HighlightEffect
now can highlight the whole affected region of text when it is moused over. StylistEffect
is new, and can enable bold/oblique/underline/strikethrough/etc. when a glyph or region is moused over (useful for links with conditional underline or other style markup). There's also some possibly-important fixes to Java 8 compatibility, which might have blocked 0.7.2 from working on RoboVM or maybe even GWT, and should be compatible now. That's all in this release; I wanted to get that last bug-fix out and make the few features I had added usable.
The known font files haven't changed since 0.7.2 .
0.7.2 "The Stars Aligned"
This release consists mostly of polishing the rough positioning code, but also adds 3 hand-written-looking fonts to KnownFonts (2 versions of a script font Tangerine, and a hasty-looking font Caveat). Positions are much more consistent now between TextraLabel and TypingLabel (they should be identical now, if stacked), and fonts tend to stay within their reported bounding boxes much more reliably.
There is a possible issue with the approach used now to ensure fonts stay the right size: creating a Font with a BitmapFont (or a style from a Skin) is more likely to need some adjustment on y (the second of four floats in Font's constructor). This adjustment could range from -20 to 20, or even to larger values for fonts with a large line height. I haven't found any 100% foolproof way to handle line height, baseline, strikethrough position, underline position, cap height, cap height with accents, and so on... So the best way is to allow users to control the font metrics themselves, I think. You can also just use KnownFonts or see how it configures the yAdjust. Right now, all of the fonts in KnownFonts act suitably regarding their position, which hasn't been the case very frequently before.
You should consider updating the .fnt , .png , and license files if you use KnownFonts, since some files have changed slightly, and a few more fonts have been added.
0.7.1 "The Deadly Dropbear"
This release is small, but drops the used language level to 7 in an attempt to maximize Android/iOS compatibility (we didn't actually need any Java 8 features), and fixes a line wrapping bug with two- or three-word lines. Other than some improvements to the README.md that document frequently-encountered issues, that's most of this release's content. The line wrapping bug seemed serious enough to warrant a release sooner rather than later, since it was visually jarring and broke the bounds of cells.
0.7.0 "Just Press Play"
This release has a broad mix of new features, and even if you don't use them, it also improves the appearance of several fonts from KnownFonts.
Probably the biggest new feature is that TypingLabel
now can respond to mouse/touchscreen input, both for mouse hover/drag and click/tap events. Hover is used in HighlightEffect
and AttentionEffect
, and clicking is used by LinkEffect
and TriggerEffect
. These last two have been requested for a while now; {LINK=https://github.com/tommyettinger/textratypist}the TextraTypist repo{ENDLINK}
will make the text the TextraTypist repo
open a browser and go to the TextraTypist repo if clicked. Similarly, {TRIGGER=someEvent}
will cause an event to trigger by name, just like the {EVENT=someEvent}
tag can, but TRIGGER does so when clicked.
To make using TypingLabel
everywhere an option for games that want things like clickable labels, there's a skipToTheEnd()
method on almost every widget we have (maybe all of them?). This does nothing if the widget only contains TextraLabel
s, but will make TypingLabel
skip to the end as if it completed its typing animation (it will still show effects and respond to mouse events).
There's a new font, QuanPixel
, which should fill two common requests: a small variable-width pixel font, and another font that covers a lot of CJK glyphs. QuanPixel covers about half as many glyphs as Hanazono, but it is a pixel-style font and so would make sense in different games.
You can describe colors a little more freely now; "light gold" would have worked in the last version, but "bright gold" wouldn't because "bright" wasn't recognized. Now it is, as are 3 more new adjectives (pale, deep, and weak). Invalid color names and adjectives are also ignored completely now, instead of making the color more transparent.
Whew! Have fun out there!
0.6.3 "Descriptions and Descenders"
So, where were we... There was the 0.6.2 release, then raeleus released a video about TextraTypist, so a lot more users came in, and that means... a welcome is in order! This also meant a number of issues and/or requests! Some users wanted to have more flexibility in how they can store font assets, so now you can give a prefix directly to KnownFonts and it will look in that directory and/or with that filename prefix. There's some changes to positioning to better locate text on a baseline, or close to it; this works especially well when creating a Font
from a BitmapFont
like the UI code often does. A big new thing is that you can now describe colors by mixing and adding adjectives to names from Colors
in libGDX or SimplePalette
from colorful-gdx; the README.md documents this and provides links to palette previews. Other than some of the inevitable changes to underline and strikethrough position (which seem to be needed whenever there's any change to Font
...), that's about it!
0.6.2 "Paging Dr. Frankenstein"
This release mostly patches up existing features from the 0.6.x line that had various bugs. For instance, the first TextureRegion in any atlas couldn't be looked up by name before, but now it can. There was a moderately-complex bug where multiple newlines didn't always appear; now they are sized correctly and so do appear as they should. There were various visual issues, particularly with vertical position, with emoji in Fonts created from BitmapFonts (such as those in many skins); these all seem to be fixed. There was an incredibly complicated bug where building a JAR and running it on Java 8 wouldn't load emoji that used the [+🎷]
syntax, but would load the [+saxophone]
syntax. This bug also happened up to and including Java 17, but didn't happen on the recent Java 18. Don't worry, I fixed that one. My head still hurts thinking about it.
Feature-wise, there's some better handling of case-insensitive Strings in some places thanks to a somewhat-monstrous data structure that mixes parts of jdkgdxds' CaseInsensitiveObjectMap and libGDX's ObjectIntMap. You can create a FontFamily from a Skin with multiple BitmapFonts defined.
Hanazono, the large CJK-character-heavy font, is now removed from KnownFonts.getStandardFamily()
by default, because loading it added measurably to startup time.
You shouldn't need to update the font assets in this update if you have the ones from 0.6.1 .
I hope this works well enough for your text-display needs!
0.6.1 "Emojional Support Animal"
This release has several important fixes for issues in 0.6.0 (released a whole four days ago). Emoji now wrap correctly, as do VAR
replacements in TypingLabel
s. Event scheduling got some fixes, since the first glyph wasn't sending an event (again) and effects in some TypingLabel
s weren't lining up with where they were supposed to end. There's a lot of tweaks to underline and strikethrough to try to make them work for more fonts, though currently they might not act correctly if line height changes. There's a fix for TextraTooltip
, also.
As for new features, there's a new font, Hanazono, which has incredibly good CJK glyph coverage, but doesn't resize very well. There are some fixes to AStarry-standard's files, and to most fonts' metrics in KnownFonts
. For this reason, it is recommended to download any .fnt and .png files you use again. There are also variants on the TextraThing
widgets, like TextraWindow
, as TypingThing
widgets, like TypingWindow
; these use a TypingLabel
instead of a TextraLabel
where appropriate.