Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsGetting default fonts from the OS
https://www.eclipse.org/forums/index.php/mv/msg/161132/509220/#msg_509220
I tried to use
This seems to always return the following 10.0 size font, independent of what I specified by the GNOME X11 OS environment.
1|Monospace|10.0|0|GTK|1|;
Is there a different API for getting the OS default fonts?
Thanks,
Norbert
]]>Norbert Schulz2010-01-21T17:16:01-00:00Re: Getting default fonts from the OS
https://www.eclipse.org/forums/index.php/mv/msg/161132/509483/#msg_509483
The only API for getting the system default font is Display.getSystemFont().
If you're looking for a more specific system font (eg.- the font of items in
a List), then you need to create an instance of the Control, gets its font,
then immediately dispose the Control.
Grant
"Norbert Schulz" <schulz.norbert@gmail.com> wrote in message
news:hja24k$k6b$1@build.eclipse.org...
> I need to get a Font reference to the OS default fixed width font.
> I tried to use
>
> JFacePreferences.getPreferenceStore().getDefaultString
(JFaceResources.TEXT_FONT)
>
> This seems to always return the following 10.0 size font, independent of
what I specified by the GNOME X11 OS environment.
> 1|Monospace|10.0|0|GTK|1|;
> Is there a different API for getting the OS default fonts?
>
> Thanks,
> Norbert
>]]>Grant Gayed2010-01-22T15:05:13-00:00