Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "18 Fonts"
m |
|||
Line 3: | Line 3: | ||
==Fonts== | ==Fonts== | ||
− | We are facing similar problems with platform-independent font code as SWT does. It is even worse as we don't have access to the available fonts on the system that is displaying the application. Choose your fonts carefully | + | We are facing similar problems with platform-independent font code as SWT does. It is even worse as we don't have access to the available fonts on the system that is displaying the application. Choose your fonts carefully. |
===Class FontData=== | ===Class FontData=== | ||
Line 9: | Line 9: | ||
===Class Font=== | ===Class Font=== | ||
− | + | The Font class is somewhat different from SWT. We share fonts application wide and therefore there is no constructor but a static <code>getFont(String,int,int)</code> method to create and/or obtain a font. However the three parameters should be familiar as they denote the name, size and style of the font. | |
===Drawing Text=== | ===Drawing Text=== |
Revision as of 12:42, 21 January 2007
Fonts
We are facing similar problems with platform-independent font code as SWT does. It is even worse as we don't have access to the available fonts on the system that is displaying the application. Choose your fonts carefully.
Class FontData
Not yet implemented.
Class Font
The Font class is somewhat different from SWT. We share fonts application wide and therefore there is no constructor but a static getFont(String,int,int)
method to create and/or obtain a font. However the three parameters should be familiar as they denote the name, size and style of the font.
Drawing Text
Drawing text is based on the Graphics Context, see 16._Graphics_Fundamentals.
Class FontMetrics
Not applicable.