Multi font support
See original GitHub issueA new pair of behaviors (FontOverrideSupport
and FontOverride
) will be introduced.
FontOverrideSupport
will be implemented in Layerable
, Terminal
and Screen
while FontOverriede
will be implemented in Component
, Layer
and Terminal
.
FontOverrideSupport
is an internal interface which is responsible for knowing what Font
Size
can be used in them (this comes from the TerminalBuilder
which a Terminal
is built from and can’t be changed later).
FontOverride
holds a reference to a Font
object which will be used when drawing. If you try to add / draw / etc an object which implements FontOverride
to an object which implements FontOverrideSupport
, the Font
’s size will be checked against the information in the object implementing FontOverrideSupport
. If the Size
does not fit the object will throw an exception.
The current rule is that there can be one font Size
for each Terminal
object and every other object must use Font
s with that size.
As a later feature half-width fonts will be also supported (eg. 16x16 + 8x16).
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:10 (10 by maintainers)
as a reminder: Multi-Size will be not supported, yet but later the ‘cogmind’ approach (use of fonts with half-width) shall be supported later so that for instance a smaller font for log-views etc. can be realized
You can check
SNAPSHOT
releases using Jitpack It is pretty easy to set up. I’ve just created a testSNAPSHOT
release (2017.3.2-SNAPSHOT
) which has the current version of Zircon with the partially implemented multi-font support