Gene...">

Getting the font of an Eclipse text

How do I get the Font object representing the font, specified as "Text Font" in Eclipse Preferences -> General -> Appearance -> Colors and Fonts? I am implementing a table view that assumes that one of the columns contains fixed width text.

+2


source to share


1 answer


This turned out to be easier than expected. The font is obtained as follows:

    font = JFaceResources.getTextFont();

      



There are similar techniques for dialogs and banner fonts.

+2


source







All Articles