Interface FontMetricsProvider
-
- All Known Implementing Classes:
BoldPaintInstruction,ItalicPaintInstruction,ResetFontPaintInstruction,ResetSpanStylePaintInstruction,SpanStylePaintInstruction
public interface FontMetricsProviderImplementations of this interface typically perform modifications to aFontand therefore need to be able to supply theFontMetricsof the font after the modifications are done.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.eclipse.swt.graphics.FontMetricsgetFontMetrics(org.eclipse.swt.graphics.GC gc)Calculates theFontMetricsbased on the font information of thisFontMetricsProviderin conjunction with the current set font information set to the givenGC.
-
-
-
Method Detail
-
getFontMetrics
org.eclipse.swt.graphics.FontMetrics getFontMetrics(org.eclipse.swt.graphics.GC gc)
Calculates theFontMetricsbased on the font information of thisFontMetricsProviderin conjunction with the current set font information set to the givenGC.Note: To retrieve the
FontMetricsit is necessary to set theFontbased on the local font information and the current applied font. You should not reset theFonton theGCin this method again, because the font information might be used by otherFontMetricsProvider.- Parameters:
gc- TheGCthat should be used to retrieve theFontMetrics- Returns:
- The
FontMetricsbased on the font information of thisFontMetricsProviderin conjunction with the current set font information set to the givenGC.
-
-