Avoid using the AffineTransform font derivation mechanism on MacOS X where
it is quite buggy. There are still issues with non-affine transformed fonts, but they are lesser. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3456 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -33,6 +33,7 @@ import javax.swing.UIManager;
|
|||||||
|
|
||||||
import com.samskivert.swing.Label;
|
import com.samskivert.swing.Label;
|
||||||
import com.samskivert.swing.util.SwingUtil;
|
import com.samskivert.swing.util.SwingUtil;
|
||||||
|
import com.samskivert.util.RunAnywhere;
|
||||||
import com.samskivert.util.StringUtil;
|
import com.samskivert.util.StringUtil;
|
||||||
|
|
||||||
import com.threerings.media.VirtualMediaPanel;
|
import com.threerings.media.VirtualMediaPanel;
|
||||||
@@ -514,8 +515,14 @@ public abstract class PuzzleBoardView extends VirtualMediaPanel
|
|||||||
_fonts = new Font[FONT_SIZES.length];
|
_fonts = new Font[FONT_SIZES.length];
|
||||||
for (int ii = 0; ii < _fonts.length; ii++) {
|
for (int ii = 0; ii < _fonts.length; ii++) {
|
||||||
double scale = FONT_SIZES[ii]/FONT_SIZES[0];
|
double scale = FONT_SIZES[ii]/FONT_SIZES[0];
|
||||||
_fonts[ii] = ofont.deriveFont(
|
// MacOS X Java currently doesn't dig scaling fonts with
|
||||||
AffineTransform.getScaleInstance(scale * 1.1d, scale));
|
// affine transformations
|
||||||
|
if (RunAnywhere.isMacOS()) {
|
||||||
|
_fonts[ii] = ofont.deriveFont((float)FONT_SIZES[ii]);
|
||||||
|
} else {
|
||||||
|
_fonts[ii] = ofont.deriveFont(
|
||||||
|
AffineTransform.getScaleInstance(scale * 1.1d, scale));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user