beryx / text-io

A library for creating interactive console applications in Java
http://text-io.beryx.org/
Apache License 2.0
342 stars 45 forks source link

Java 21 breaks the terminal font #46

Open aneshodza opened 5 months ago

aneshodza commented 5 months ago

Hey! I am using the textio library in one of my projects, where I create a terminal using this code:

private final TextIO textIO;
private final TextTerminal<?> terminal;
//...
this.textIO = TextIoFactory.getTextIO();
this.terminal = textIO.getTextTerminal();

But since upgrading to Java 21 the terminal has a new font and isn't monofont. Is this a known bug, or is my configuration lacking?

Note: It worked perfectly fine in java 18 and this only happens on Windows.

How it looks now

image

How it looked before

image
tiaggofg commented 5 months ago

Hello, @aneshodza!

Put the following line in your textio.properties file

textio.prompt.font.family=Monospaced