| Summary: | Setting an italic font for a Label() does not change label appearance | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Alexander Wise <wise> |
| Component: | GEF-Legacy Draw2d | Assignee: | gef-inbox <gef-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.2 | ||
| Target Milestone: | --- | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | Bugzilla 3.4 Migration | ||
|
Description
Alexander Wise
It might be specific to the font. please provide a snippet. In a subclass of Figure...
private static Font italic;
private Font getReferenceFont() {
if (italic == null) {
Font basefont = stepName.getFont();
FontData[] fontdata = basefont.getFontData();
for (int i=0; i < fontdata.length; i++) {
fontdata[i].setStyle(SWT.ITALIC);
}
italic = new Font(basefont.getDevice(), fontdata);
}
return italic;
}
...
label.setFont(getReferenceFont());
Note that if I change the setStyle() line to fontdata[i]setStyle(SWT.BOLD|SWT.ITALIC) it renders as bold and oblique.
Here is the FontData object returned by getFont(): 1|Lucida Grande|13|0|CARBON|1|
Font Book doesn't show any italic or oblique forms of Lucida Grande -- so the bold oblique font must be computed...
This has nothing to do with GEF or draw2d. Please create an SWT snippet, attach it, and re-assign this bug to Eclipse/SWT component. Unfortunately, I am not so sure it has nothing to do with draw2d. The same code when used with an org.eclipse.swt.widgets.Label instead of an org.eclipse.draw2d.Label works as expected. Please attach a running example showing the problem. You should try this in SWT, but not using a Label. Just create a Shell and paint directly on the shell using the font, the same way GEF does. Changing OS from Mac OS to Mac OS X as per bug 185991 LATER and REMIND resolutions will be going away with the upgrade of Bugzilla to the latest Bugzilla 3.4. They are no longer part of the default Bugzilla installation. See http://dev.eclipse.org/mhonarc/lists/eclipse.org-committers/msg00778.html for the announcement. As a result RESOLVED + REMIND OR LATER will be changed to RESOLVED + WONTFIX This unfortunately also means I need to REOPEN and then RESOLVE as WONTFIX Sorry for the inconvenience. LATER and REMIND resolutions will be going away with the upgrade of Bugzilla to the latest Bugzilla 3.4. They are no longer part of the default Bugzilla installation. See http://dev.eclipse.org/mhonarc/lists/eclipse.org-committers/msg00778.html for the announcement. As a result RESOLVED + REMIND OR LATER will be changed to RESOLVED + WONTFIX This unfortunately also means I need to REOPEN and then RESOLVE as WONTFIX Sorry for the inconvenience. |