mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
Typography: no longer use Consolas or Courier New as monospaced font on Windows because they have bad vertically placement
This commit is contained in:
@@ -10,6 +10,8 @@ FlatLaf Change Log
|
||||
- TableHeader: Fixed exception when changing table structure (e.g. removing
|
||||
column) from a table header popup menu action. (issue #532)
|
||||
- `HiDPIUtils.paintAtScale1x()` now supports rotated graphics. (issue #557)
|
||||
- Typography: No longer use `Consolas` or `Courier New` as monospaced font on
|
||||
Windows because they have bad vertically placement.
|
||||
|
||||
|
||||
## 2.3
|
||||
|
||||
@@ -64,7 +64,7 @@ light.font = +0
|
||||
semibold.font = +0
|
||||
|
||||
# monospaced
|
||||
[win]monospaced.font = Consolas, "Courier New", Monospaced
|
||||
[win]monospaced.font = Monospaced
|
||||
[mac]monospaced.font = Menlo, Monospaced
|
||||
[linux]monospaced.font = "Liberation Mono", "Ubuntu Mono", Monospaced
|
||||
monospaced.font = Monospaced
|
||||
|
||||
@@ -342,8 +342,8 @@ class DemoFrame
|
||||
// add font families
|
||||
fontMenu.addSeparator();
|
||||
ArrayList<String> families = new ArrayList<>( Arrays.asList(
|
||||
"Arial", "Cantarell", "Comic Sans MS", "Courier New", "DejaVu Sans",
|
||||
"Dialog", "Liberation Sans", "Monospaced", "Noto Sans", "Roboto",
|
||||
"Arial", "Cantarell", "Comic Sans MS", "DejaVu Sans",
|
||||
"Dialog", "Liberation Sans", "Noto Sans", "Roboto",
|
||||
"SansSerif", "Segoe UI", "Serif", "Tahoma", "Ubuntu", "Verdana" ) );
|
||||
if( !families.contains( currentFamily ) )
|
||||
families.add( currentFamily );
|
||||
|
||||
@@ -68,9 +68,20 @@ public class FlatPaintingStringTest
|
||||
|
||||
// initialize font families combobox
|
||||
String[] families = {
|
||||
// regular
|
||||
"Arial", "Cantarell", "DejaVu Sans",
|
||||
"Dialog", "Inter", "Liberation Sans", "Noto Sans", "Open Sans", "Roboto",
|
||||
"SansSerif", "Segoe UI", "Tahoma", "Ubuntu", "Verdana" };
|
||||
"Dialog", "Helvetica Neue", "Inter", "Liberation Sans", "Noto Sans", "Open Sans", "Roboto",
|
||||
"SansSerif", "Segoe UI", "Tahoma", "Ubuntu", "Verdana", ".SF NS Text",
|
||||
|
||||
// light, semibold
|
||||
"Segoe UI Light", "Segoe UI Semibold",
|
||||
"HelveticaNeue-Thin", "HelveticaNeue-Medium",
|
||||
"Lato Light", "Ubuntu Light", "Cantarell Light",
|
||||
"Lato Semibold", "Ubuntu Medium", "Montserrat SemiBold",
|
||||
|
||||
// monospaced
|
||||
"Monospaced", "Consolas", "Courier New", "Menlo", "Liberation Mono", "Ubuntu Mono",
|
||||
};
|
||||
Arrays.sort( families, String.CASE_INSENSITIVE_ORDER );
|
||||
DefaultComboBoxModel<String> model = new DefaultComboBoxModel<>();
|
||||
model.addElement( currentFamily );
|
||||
|
||||
Reference in New Issue
Block a user