Comments (4)
Another problem is that I don't see a possible workaround if I run this on a
system without a font it can find because this happens in the clinit. Perhaps
in that case the DEFAULT should be null?
Original comment by [email protected]
on 26 Dec 2014 at 5:30
from lanterna.
[deleted comment]
from lanterna.
I see now that the documentation specifies that "Monospaced" should correspond
to some monospaced font on the system, unfortunately it's not working.
I think as a backup perhaps you will need to search the installed font families
to find a monospaced font. Also it would be better to do this lazily in case
the app is being run on a terminal and doesn't need to find it's own fonts.
Currently because it is initialized during class loading it happens even when
the DefaultTerminalFactory ends up choosing UnixTerminal.
Original comment by [email protected]
on 28 Dec 2014 at 11:59
from lanterna.
Actually, the problem above isn't that there isn't a Monospaced font on your
system, it's that the actual font behind the "Monospaced" alias wasn't actually
mono-spaced. The code will measure the width of 'i' and 'W' and if they're not
the same then the font isn't considered valid monospaced.
So your Ubuntu installation seems to have a Monospaced font which isn't
monospaced... I suppose we could add something that scans the font-list a bit
more carefully instead of throwing an exception like that.
Original comment by [email protected]
on 11 Jan 2015 at 11:05
- Changed state: Accepted
from lanterna.
Related Issues (20)
- Too much CPU consumption when there is no Interactable component on the window HOT 2
- Lanterna3: Why is ScreenTextGraphics private? HOT 3
- Lanterna slow HOT 1
- Indexed fromRGB fails HOT 2
- Multi Threading HOT 3
- Typo: StackedModelWindowManagerTest HOT 1
- Hang in FileDialog HOT 2
- No terminal appears at all after changing to 3.0.0-alpha4 API. HOT 2
- patches for 2.1 HOT 5
- AbstractListBox methods low access level HOT 1
- Resizing issues for SwingTerminal HOT 1
- lanterna-3.0.0-alpha6 really usable?
- Output in various Terminals
- Request: string support in 3.0
- TextGraphics.getWidth=0 in TextBox.repaint()
- Corrupt characters under ubuntu
- Cannot retrieve the state of the terminal
- Throw ArrayIndexOutOfBoundsException with 3.0.0-alpha6
- GridLayout doesn't check correctly spacing and size changes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lanterna.