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:
parent
0c42c3f101
commit
010f4e45a1
1 changed files with 9 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue