[英]How to get SWT Font family name in Java?
I am in the process of converting a programming using the AWT package to SWT. 我正在将使用AWT包的编程转换为SWT。 While working with the fonts I can't seem to find an SWT equivalent to 在使用字体时,我似乎找不到与
Font f = new Font();
String s = f.getFamily();
Is there a similar way in SWT to get the name of the font that I am just over looking? SWT中是否有类似的方法来获取我刚刚看过的字体名称?
I figured it out. 我想到了。 When I call .getFontData()
it returns an array of FontData
. 当我调用.getFontData()
它返回一个FontData
数组。 So once I just pulled a single Font data out I got my info. 因此,一旦我只提取了一个字体数据,便得到了我的信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.