1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 14:15:23 +02:00

RESOLVED - bug 206328: [regression] Terminal does not draw correctly with proportional font

https://bugs.eclipse.org/bugs/show_bug.cgi?id=206328
This commit is contained in:
Michael Scharf 2008-02-13 02:23:49 +00:00
parent 0c42c3f101
commit 010f4e45a1

View file

@ -181,11 +181,20 @@ public class StyleMap {
for (char c = ' '+128; c <= '~'+128; c++) {
measureChar(gc, c,false);
}
if(fProportional) {
fCharSize.x-=3;
}
for (int i = 0; i < fOffsets.length; i++) {
fOffsets[i]=(fCharSize.x-fOffsets[i])/2;
}
gc.dispose ();
}
/**
* @param gc
* @param c
* @param updateMax
* @return true if the the font is proportional
*/
private boolean measureChar(GC gc, char c, boolean updateMax) {
boolean proportional=false;
Point ext=gc.textExtent(String.valueOf(c));