Summary: | GC#stringExtent() lies | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | adrian <stori> | ||||||||||
Component: | SWT | Assignee: | Silenio Quarti <Silenio_Quarti> | ||||||||||
Status: | NEW --- | QA Contact: | |||||||||||
Severity: | major | ||||||||||||
Priority: | P3 | CC: | heath.borders | ||||||||||
Version: | 2.0.2 | ||||||||||||
Target Milestone: | --- | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | Windows XP | ||||||||||||
Whiteboard: | |||||||||||||
Attachments: |
|
Description
adrian
2003-03-27 19:05:30 EST
Created attachment 4376 [details]
Test program.
This bug is reported against 2.0.2. In Eclipse 2.1, all the strings in the example have a length of 400 pixels. I will attach a picture of what it looks like. I believe this looks correct. It depends on the font used whether it has a glyph for the character and how that glyph appears (question mark, empty rectangle, black rectangle etc). Are you calling the glyph used for the characters '\u0001' - \u0006' "cheese"? Created attachment 4380 [details]
example run on Eclipse 2.1.
>>> Are you calling the glyph used for the characters '\u0001' - \u0006' "cheese"?
No, cheese is caused by other display operations I do (selections, selected
background painting, etc.), in which I rely on the information returned by
stringExtent(), but which is not in sync with the actual stuff displayed.
Created attachment 4381 [details]
GC#stringExtent() in R2.0.2
Your R2.1 image looks good, I'll give it a try. I've attached what displays in R2.0.2, for the record. I still get the bad results (as in my previous attachment) for font "Courier" 10, on XP Home edition (version 5.1 SP1). With "Courier New" 10 the output is different (I'll attach), but just as bad. TextEditor (and consequently JDT's JavaEditor, etc.) is still nicely 'filtering' these characters / glyphs out from its own display. Created attachment 4390 [details]
StringExtent() out to lunch
Will also try R2.1 on Windows 2000 next week...
The R2.1 I'm using is build I20030326-win32. Tried with the Eclipse R2.1 official release, Windows 2000 (v5.0 SP3): I get the same bad results (with both the "Courier" and the "Courier New" fonts)... Chrix to investigate and advise. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. |