Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 267259

Summary: setting a small font corrupts the graphics context
Product: [Tools] GEF Reporter: John Swanke <jswanke>
Component: GEF-Legacy Draw2dAssignee: gef-inbox <gef-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: danberg, mdelder, mgobeil, nyssen
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description John Swanke CLA 2009-03-05 14:48:05 EST
1) Add three Label's to a diagram figure (the primary layer) with ABC as the text
2) Set the font for the first and last figure to Arial 9
3) Set the font for the 2nd figure to Small Fonts 7

Result: the first label's text will appear as expected, the second figure will appear as small text (as expected), but the third text will lose the spacing between the characters in the text.

Creating a new GC to paint the second figure's text fixes the problem-- so it appears setting the gc to a smaller font somehow corrupts the gc.

Using pushState/popState or explicitily saving the font and restoring it after the drawText does not fix the problem.

This was working in a previous version of GEF.
Comment 1 John Swanke CLA 2009-03-11 11:35:47 EDT
apparently it also depends on the font-- using Tahoma 7 instead of Small Fonts 7 fixes the problem
Comment 2 Alexander Nyßen CLA 2014-08-19 13:35:20 EDT
I am sorry, but with the information provided here I cannot reproduce the problem. Resolving as WORKSFORME though. If this problem still persists, please re-open and provide more detailed information on how to reproduce it (snippet, etc.).