SWT - OS agnostic way to get monospaced font

前端 未结 5 1837
陌清茗
陌清茗 2020-12-01 10:56

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:



        
5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-01 11:21

    If you want just a Monospaced font use "Courier" => new Font(display, "Courier", 10, SWT.NORMAL)

提交回复
热议问题