Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: SourceForge.net <noreply@so...> - 2008-06-18 08:02:51
|
Bugs item #1995345, was opened at 2008-06-16 10:18 Message generated for change (Settings changed) made by nenry You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=1995345&group_id=15494 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Matthew Hall (qualidafial) >Assigned to: Henry Proudhon (nenry) Summary: Bad font height conversion in SWTUtils.toSwtFontData Initial Comment: A blogger documented this problem on: http://www.schmeeky.co.uk/articles/2008-06/charts.aspx See SWTUtils.java: // convert the font size (in pt for awt) to height in pixels for swt int height = (int) Math.round(font.getSize() * 72.0 / device.getDPI().y); fontData.setHeight(height); But FontData.setHeight() actually expects points, not pixels: >From FontData.java: * Sets the height of the receiver. The parameter is * specified in terms of points, where a point is one * seventy-second of an inch. This conversion especially causes problems on a printer, where the DPI is usually much higher than on a display. Theoretically you should be able to just say: fontData.setHeight(font.getSize()); Matthew ---------------------------------------------------------------------- >Comment By: Henry Proudhon (nenry) Date: 2008-06-18 01:02 Message: Logged In: YES user_id=1379312 Originator: NO Thanks for your input Matthew, I recall I had to use this to work around a problem by just converting the font using points. This probably need to be revisited now. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=1995345&group_id=15494 |