diff options
author | Felipe Heidrich <fheidric> | 2004-05-03 22:04:44 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2004-05-03 22:04:44 +0000 |
commit | 86857ed6acdf97fa33137b9a82dae79eb6e75680 (patch) | |
tree | 20ec925f6cfe8f64dde7e2190f035ced4b37dfc1 | |
parent | 5a67329473cca4f7da1b1cbb34f4b51fee718d4c (diff) | |
download | eclipse.platform.swt-86857ed6acdf97fa33137b9a82dae79eb6e75680.tar.gz eclipse.platform.swt-86857ed6acdf97fa33137b9a82dae79eb6e75680.tar.xz eclipse.platform.swt-86857ed6acdf97fa33137b9a82dae79eb6e75680.zip |
*** empty log message ***
4 files changed, 15 insertions, 20 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Font.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Font.java index 4f3e2f8a62..9eaf747879 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Font.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Font.java @@ -426,6 +426,7 @@ void init (Device device, FontData[] fds) { if (device.setDPI) dpi = device.getDPI(); StringBuffer stringBuffer = new StringBuffer(); for (int i = 0; i < fds.length; i++) { + if (i != 0) stringBuffer.append(','); FontData fd = fds[i]; int hRes = fd.horizontalResolution, vRes = fd.verticalResolution; if (dpi != null) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java index 54e3541f9f..858e728801 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java @@ -1908,7 +1908,7 @@ int getFontHeight () { if (buffer [0] == 0) { /* FontList contains a single font */ OS.memmove (fontStruct, fontPtr, XFontStruct.sizeof); - int fontHeight = fontStruct.max_bounds_ascent + fontStruct.max_bounds_descent; + int fontHeight = fontStruct.ascent + fontStruct.descent; height = Math.max(height, fontHeight); } else { /* FontList contains a fontSet */ @@ -1919,7 +1919,7 @@ int getFontHeight () { /* Go through each fontStruct in the font set */ for (int i=0; i<nFonts; i++) { OS.memmove (fontStruct, fontStructs[i], XFontStruct.sizeof); - int fontHeight = fontStruct.max_bounds_ascent + fontStruct.max_bounds_descent; + int fontHeight = fontStruct.ascent + fontStruct.descent; height = Math.max(height, fontHeight); } } @@ -1967,9 +1967,9 @@ public FontMetrics getFontMetrics() { if (buffer[0] == 0) { /* FontList contains a single font */ OS.memmove(fontStruct, fontPtr, XFontStruct.sizeof); - ascent = Math.max(ascent, fontStruct.max_bounds_ascent); - descent = Math.max(descent, fontStruct.max_bounds_descent); - int fontHeight = fontStruct.max_bounds_ascent + fontStruct.max_bounds_descent; + ascent = Math.max(ascent, fontStruct.ascent); + descent = Math.max(descent, fontStruct.descent); + int fontHeight = fontStruct.ascent + fontStruct.descent; height = Math.max(height, fontHeight); /* Calculate average character width */ int propPtr = fontStruct.properties; @@ -2036,9 +2036,9 @@ public FontMetrics getFontMetrics() { /* Go through each fontStruct in the font set */ for (int i = 0; i < nFonts; i++) { OS.memmove(fontStruct, fontStructs[i], XFontStruct.sizeof); - ascent = Math.max(ascent, fontStruct.max_bounds_ascent); - descent = Math.max(descent, fontStruct.max_bounds_descent); - int fontHeight = fontStruct.max_bounds_ascent + fontStruct.max_bounds_descent; + ascent = Math.max(ascent, fontStruct.ascent); + descent = Math.max(descent, fontStruct.descent); + int fontHeight = fontStruct.ascent + fontStruct.descent; height = Math.max(height, fontHeight); /* Calculate average character width */ int propPtr = fontStruct.properties; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java index ad5355b9b7..ba63a4c356 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java @@ -388,7 +388,7 @@ int getFontHeigth(Font font) { int fontPtr = OS.XmFontListEntryGetFont (fontListEntry, buffer); if (buffer [0] == 0) { OS.memmove (fontStruct, fontPtr, XFontStruct.sizeof); - int fontHeight = fontStruct.max_bounds_ascent + fontStruct.max_bounds_descent; + int fontHeight = fontStruct.ascent + fontStruct.descent; height = Math.max(height, fontHeight); } else { int nFonts = OS.XFontsOfFontSet (fontPtr, fontStructPtr, fontNamePtr); @@ -396,7 +396,7 @@ int getFontHeigth(Font font) { OS.memmove (fontStructs, fontStructPtr [0], nFonts * 4); for (int i=0; i<nFonts; i++) { OS.memmove (fontStruct, fontStructs[i], XFontStruct.sizeof); - int fontHeight = fontStruct.max_bounds_ascent + fontStruct.max_bounds_descent; + int fontHeight = fontStruct.ascent + fontStruct.descent; height = Math.max(height, fontHeight); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java index 037b248f74..1f1a9e63b0 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java @@ -725,8 +725,7 @@ int getFontAscent (int font) { if (buffer [0] == 0) { /* FontList contains a single font */ OS.memmove (fontStruct, fontPtr, XFontStruct.sizeof); - int fontAscent = Math.max (fontStruct.ascent, fontStruct.max_bounds_ascent); - if (fontAscent > ascent) ascent = fontAscent; + if (fontStruct.ascent > ascent) ascent = fontStruct.ascent; } else { /* FontList contains a fontSet */ int nFonts = OS.XFontsOfFontSet (fontPtr, fontStructPtr, fontNamePtr); @@ -736,8 +735,7 @@ int getFontAscent (int font) { /* Go through each fontStruct in the font set */ for (int i=0; i<nFonts; i++) { OS.memmove (fontStruct, fontStructs[i], XFontStruct.sizeof); - int fontAscent = Math.max (fontStruct.ascent, fontStruct.max_bounds_ascent); - if (fontAscent > ascent) ascent = fontAscent; + if (fontStruct.ascent > ascent) ascent = fontStruct.ascent; } } } @@ -768,9 +766,7 @@ int getFontHeight () { if (buffer [0] == 0) { /* FontList contains a single font */ OS.memmove (fontStruct, fontPtr, XFontStruct.sizeof); - int fontAscent = Math.max (fontStruct.ascent, fontStruct.max_bounds_ascent); - int fontDescent = Math.max (fontStruct.descent, fontStruct.max_bounds_descent); - int fontHeight = fontAscent + fontDescent; + int fontHeight = fontStruct.ascent + fontStruct.descent; if (fontHeight > height) height = fontHeight; } else { /* FontList contains a fontSet */ @@ -781,9 +777,7 @@ int getFontHeight () { /* Go through each fontStruct in the font set */ for (int i=0; i<nFonts; i++) { OS.memmove (fontStruct, fontStructs[i], XFontStruct.sizeof); - int fontAscent = Math.max (fontStruct.ascent, fontStruct.max_bounds_ascent); - int fontDescent = Math.max (fontStruct.descent, fontStruct.max_bounds_descent); - int fontHeight = fontAscent + fontDescent; + int fontHeight = fontStruct.ascent + fontStruct.descent; if (fontHeight > height) height = fontHeight; } } |