Added new text formatting system. This requires the following:
Added TextFormat which allows the switching of font type, formatting and color in-line. TextFormat requires a fixed String value and supports subsequent modification of the destination rendering state (font, bold/italic/underline, etc) by means of self-returning applyFormat calls. applyFormat accepts, logically, a TextFormat and an index which represents a literal location in string to format from.
Added ColorFormat as the companion to TextFormat where TextFormat accepts logical values between 0 and 255 inclusive for red, green & blue channels, and alpha (if set).
All paginated text now is of type FormattedString and not String or char[]. FormattedString represents the interpolated type of char[] and TextFormat. If no format is provided, the default format is used.
The old bodyFont / linkFont / headingFont items in PageProperties of type GLFont have been removed and replaced with equally good bodyFormat / linkFormat / headingFormat respectively - of type TextFormat. Likewise, matching getters and setters have been refactored to appropriately reflect the removal of fonts as primary properties.
Temporarily removed getWord from document click-assist because word-getting now requires the use of forward-lookaheads for font types. It'll return soon, but not just yet.
Issue fixes
Add line piping structures.
Fix image rendering really good.
Fix a bug where image fixed rendering breaks other things. Now it's really fixed.
Add tab_size property, fixes tab sizing issues.
Add custom assertion tracing because Forge breaks Netty. Bag of dicks.
Fix issues with glyph boxing.
Fix dingdong where the stream might be read from infinitely beyond the end of the stream. Woops.
Change BookGUI to support go(id).
Fix stray debug control which forced all text to be red.
Clean up source. Fixes weird imports.
Stability
The current code appears to be appropriately stable. Please report any issues you find.
What has changed in fontbox
Added new text formatting system. This requires the following:
TextFormat
which allows the switching of font type, formatting and color in-line.TextFormat
requires a fixedString
value and supports subsequent modification of the destination rendering state (font, bold/italic/underline, etc) by means of self-returningapplyFormat
calls.applyFormat
accepts, logically, aTextFormat
and anindex
which represents a literal location in string to format from.ColorFormat
as the companion toTextFormat
whereTextFormat
accepts logical values between 0 and 255 inclusive for red, green & blue channels, and alpha (if set).FormattedString
and notString
orchar[]
.FormattedString
represents the interpolated type ofchar[]
andTextFormat
. If no format is provided, the default format is used.bodyFont
/linkFont
/headingFont
items inPageProperties
of typeGLFont
have been removed and replaced with equally goodbodyFormat
/linkFormat
/headingFormat
respectively - of typeTextFormat
. Likewise, matching getters and setters have been refactored to appropriately reflect the removal of fonts as primary properties.getWord
from document click-assist because word-getting now requires the use of forward-lookaheads for font types. It'll return soon, but not just yet.Issue fixes
Stability
The current code appears to be appropriately stable. Please report any issues you find.