|Display#loadFont on gtk-linux [message #758550]
||Wed, 23 November 2011 16:10
Registered: August 2011
I'm using swt-3.7.1-gtk-linux-x86.jar on Ubuntu 11.04.
In my app I need to use phonetic characters (Doulos SIL, TTF), which had worked fine with Swing. My strategy with SWT was to
- pack the .ttf font file into the App's jar
- get TTF from jar as stream
- write it into a temporary file (in user's home)
- load font locally with Display#loadFont
This last step doesn't work.
#1 The loaded file is not in the Display#getFontList.
The code below prints the lists' sizes -- which are identical.
#2 Display#loadFont returns true for any (nonsense) strings.
// The temporary font file is "/home/me/DoulosSILR.ttf".
FontData fd1 = display.getFontList(null, true/*scalable*/);
FontData fd2 = display.getFontList(null, true/*scalable*/);
I tried to debug the process. I got till the native method:
public static final native boolean _FcConfigAppFontAddFile(int /*long*/ config, byte file);
This method is preceded by a call to
with runtime argument:
[Updated on: Wed, 23 November 2011 16:13]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01600 seconds