Package org.eclipse.swt.internal
Interface SWTFontRegistry
public interface SWTFontRegistry
This class is used in the win32 implementation only to support
re-usage of fonts.
IMPORTANT: This class is not part of the public API for SWT. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms, and should never be called from application code.
- Restriction:
- This class is not intended to be referenced by clients
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Disposes all fonts managed by the font registry.getFont
(long fontHandle, int zoom) Provides a font optimally suited for the specified zoom.Provides a font optimally suited for the specified zoom.getSystemFont
(int zoom) Returns a system font optimally suited for the specified zoom.
-
Method Details
-
getSystemFont
Returns a system font optimally suited for the specified zoom.- Parameters:
zoom
- zoom in % of the standard resolution to determine the appropriate system font- Returns:
- the system font best suited for the specified zoom
-
getFont
Provides a font optimally suited for the specified zoom. Fonts created in this manner are managed by the font registry and should not be disposed of externally.- Parameters:
fontData
- the data used to create the fontzoom
- zoom in % of the standard resolution to determine the appropriate font- Returns:
- the font best suited for the specified zoom
-
getFont
Provides a font optimally suited for the specified zoom. If the handle is yet unknown to the registry, the font will not be managed by the font registry. Only Fonts created in the font registry are managed by it and should not be disposed of externally.- Parameters:
fontHandle
- the handle to an existing fontzoom
- zoom in % of the standard resolution to determine the appropriate font- Returns:
- the font best suited for the specified zoom
-
dispose
void dispose()Disposes all fonts managed by the font registry.
-