Closed botboy0 closed 3 years ago
Have you tried using that Font with some standard Java multiline text widget and see if the lines touch there?
Can you debug your application with Eclipse or other IDE, and specifically step into the part where the Font is measured by Lanterna, and Lanterna determines the line spacing?
Thank you for the quick reply, I am a bit unsure what is meant by a standard multiline text widget , are you referring to something like a content Panel/Action List Box made by Lanterna or a widget I would create in Swing not using Lanterna?
I am using Eclipse and I will try to debug it into showing the measuring of line spacing in Lanterna, but I am a bit unsure how to go about that as well. I am unsure about the point where to debug and look into the variables specifically.
For the first question: I meant instancing a javax.swing.JTextArea with your specific Font and otherwise all scaling equal. Make it 2 rows high, and either append two of the vertical bar characters with a newline inbetween, or paste them in at runtime.
By debugging, I mean single-stepping through the code and using the "Variables" view to see lanternas variables while you step through the code.
Lanterna has a list of Fonts, and tries to pick characters from whatever Font contains these chars. But different Fonts have different characteristics, and when it scales the Font A (say, the one you supplied) then it also scales Font B (which has the vertical bar)... and if it scales Font B to something a notch smaller, then it might happen that the bar-ends aren't connected.
Your debugging session should finally tell you, which Font it really picks the bars from (from yours or from one of the standard fonts), and what scaling factor it determines and to what degree it then scales your font and the "vertical bar" font.
Through editing the Font I got to the point where it actually does work out to a point where I get continuous lines, but for some reason there is still places where there is a single 1-2 pixel gap in the lines.
thanks this is no longer an issue
I used a monospaced font to make sure it would work with the library. But because of some scaling issue that does not have to do with the Font I use (I checked that) the vertical Lines are broken.![Bild_2021-04-19_020553](https://user-images.githubusercontent.com/10763071/115166489-c59e2d00-a0b3-11eb-8945-01181d0e9841.png)
My code:
`public class Main { public static void main(String[] args) throws IOException {
}`