File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
src/main/java/mdlaf/utils Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,6 @@ target/classes/mdlaf/
9
9
target /
10
10
11
11
material-ui-swing.iml
12
+ /.project
13
+ /.settings /
14
+ /.classpath
Original file line number Diff line number Diff line change @@ -117,8 +117,12 @@ public FontUIResource getFont(String typeFont){
117
117
*/
118
118
private Font loadFont (String fontPath ) {
119
119
if (fontSettings .isEmpty ()) {
120
- fontSettings .put (TextAttribute .SIZE , new Float ( 11 * Toolkit .getDefaultToolkit ().getScreenResolution () / 72.0 ));
121
- //fontSettings.put (TextAttribute.SIZE, new Float( 14f));
120
+ //fontSettings.put (TextAttribute.SIZE, new Float( 11 * Toolkit.getDefaultToolkit().getScreenResolution() / 72.0));
121
+ //fontSettings.put (TextAttribute.SIZE, new Float( 11 * Toolkit.getDefaultToolkit().getScreenResolution() / 72.0));
122
+ // The min function is used to keep this number to reasonable bounds in cases of high DPI displays
123
+ // Known to cause issues with Windows 10 Display Scaling
124
+ int resolution =Math .min (Toolkit .getDefaultToolkit ().getScreenResolution (),96 );
125
+ fontSettings .put (TextAttribute .SIZE , 11.0f *resolution /72.0f );
122
126
fontSettings .put (TextAttribute .KERNING , TextAttribute .KERNING_ON );
123
127
}
124
128
You can’t perform that action at this time.
0 commit comments