KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there a way in SWT to get a monospaced font simply, that works across various operating systems? For example. this works on Linux, but not Windows: Font mono = new Font(parent.getDisplay(), "Mono", 10, SWT.NONE); or do I need to have a method that tries loading varying fonts (Consolas, Terminal, Monaco, Mono) until one isn't null? Alternatively I could specify it in a properties file on startup. I tried getting the system font from Display, but that wasn't monospaced.
Tags (comma-separated)
Save Edits
Cancel