有没有办法将字体大小指定为float/double而不是integer.我正在创建我的字体:
Font font = new Font(shell.getDisplay(), "CormorantGaramond",14, SWT.NULL);
Run Code Online (Sandbox Code Playgroud)
其中14是以磅为单位的字体大小.但构造函数只接受一个整数,当字体大小以点而不是像素指定时,我发现它很奇怪.有没有办法将字体大小指定为非整数值.(这是一个ttf字体,如果那么重要).
目前(Eclipse Platform Mars 4.5)似乎没有独立于平台的方法来使用类型的值设置字体高度float。
参考:org.eclipse.swt.graphics.FontData(Eclipse 平台 API 规范)- 帮助 - Eclipse 平台。