Force use of monospaced (DroidSansMono) font for terminal

On some Androids (e.g. ColorOS), even though this view is requesting a
monospaced font, it gets given a proportional one. Aside from this being
very silly, it also makes it completely unusable (cursor is positioned
incorrectly, etc)
master
Ciaran Gultnieks 2015-03-05 13:51:33 +00:00
parent 5f70cc011c
commit 12789e473c
2 changed files with 2 additions and 1 deletions

BIN
assets/DroidSansMono.ttf Normal file

Binary file not shown.

View File

@ -192,7 +192,8 @@ public class TerminalBridge implements VDUDisplay {
// create our default paint
defaultPaint = new Paint();
defaultPaint.setAntiAlias(true);
defaultPaint.setTypeface(Typeface.MONOSPACE);
defaultPaint.setTypeface(Typeface.createFromAsset(manager.getAssets(),
"DroidSansMono.ttf"));
defaultPaint.setFakeBoldText(true); // more readable?
localOutput = new LinkedList<String>();