mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
Ubuntu Linux: fixed poorly rendered font (issue #105)
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
FlatLaf Change Log
|
||||
==================
|
||||
|
||||
## Unreleased
|
||||
|
||||
- Ubuntu Linux: Fixed poorly rendered font. (issue #105)
|
||||
|
||||
|
||||
## 0.35
|
||||
|
||||
- Added drop shadows to popup menus, combobox popups, tooltips and internal
|
||||
|
||||
@@ -74,6 +74,11 @@ class LinuxFontPolicy
|
||||
family = family.isEmpty() ? word : (family + ' ' + word);
|
||||
}
|
||||
|
||||
// Ubuntu font is rendered poorly (except if running in JetBrains VM)
|
||||
// --> use default Java font
|
||||
if( family.startsWith( "Ubuntu" ) && !SystemInfo.IS_JETBRAINS_JVM )
|
||||
family = "sans";
|
||||
|
||||
// scale font size
|
||||
double dsize = size * getGnomeFontScale();
|
||||
size = (int) (dsize + 0.5);
|
||||
|
||||
@@ -141,7 +141,7 @@ class DemoFrame
|
||||
fontMenu.addSeparator();
|
||||
ArrayList<String> families = new ArrayList<>( Arrays.asList(
|
||||
"Arial", "Comic Sans MS", "Courier New", "DejaVu Sans", "Dialog", "Monospaced",
|
||||
"Noto Sans", "Roboto", "SansSerif", "Segoe UI", "Serif", "Tahoma", "Verdana" ) );
|
||||
"Noto Sans", "Roboto", "SansSerif", "Segoe UI", "Serif", "Tahoma", "Ubuntu", "Verdana" ) );
|
||||
if( !families.contains( currentFamily ) )
|
||||
families.add( currentFamily );
|
||||
families.sort( String.CASE_INSENSITIVE_ORDER );
|
||||
|
||||
Reference in New Issue
Block a user