Typography: added thin font/style

This commit is contained in:
Karl Tauber
2021-10-26 13:16:52 +02:00
parent e6e4e53a73
commit f742f83834
9 changed files with 87 additions and 11 deletions

View File

@@ -47,15 +47,20 @@ mini.font = -3
# font weights # font weights
# Windows # Windows
# (use Segoe UI Light because there is no thin font available on Windows)
[win]thin.font = "Segoe UI Light"
[win]light.font = "Segoe UI Light" [win]light.font = "Segoe UI Light"
[win]semibold.font = "Segoe UI Semibold" [win]semibold.font = "Segoe UI Semibold"
# macOS # macOS
[mac]thin.font = "HelveticaNeue-Thin"
[mac]light.font = "HelveticaNeue-Light" [mac]light.font = "HelveticaNeue-Light"
[mac]semibold.font = "HelveticaNeue-Medium" [mac]semibold.font = "HelveticaNeue-Medium"
# Linux # Linux
[linux]thin.font = "Lato Thin", "Ubuntu Thin", "Cantarell Thin"
[linux]light.font = "Lato Light", "Ubuntu Light", "Cantarell Light" [linux]light.font = "Lato Light", "Ubuntu Light", "Cantarell Light"
[linux]semibold.font = "Lato Semibold", "Ubuntu Medium" [linux]semibold.font = "Lato Semibold", "Ubuntu Medium"
# fallback for unknown platform # fallback for unknown platform
thin.font = +0
light.font = +0 light.font = +0
semibold.font = +0 semibold.font = +0
@@ -76,6 +81,7 @@ monospaced.font = Monospaced
[style].medium = font: $medium.font [style].medium = font: $medium.font
[style].small = font: $small.font [style].small = font: $small.font
[style].mini = font: $mini.font [style].mini = font: $mini.font
[style].thin = font: $thin.font
[style].light = font: $light.font [style].light = font: $light.font
[style].semibold = font: $semibold.font [style].semibold = font: $semibold.font
[style].monospaced = font: $monospaced.font [style].monospaced = font: $monospaced.font

View File

@@ -134,3 +134,9 @@
- small.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI] - small.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
+ small.font [active] Helvetica Neue plain 11 javax.swing.plaf.FontUIResource [UI] + small.font [active] Helvetica Neue plain 11 javax.swing.plaf.FontUIResource [UI]
#---- thin ----
- thin.font [active] Segoe UI Light plain 12 javax.swing.plaf.FontUIResource [UI]
+ thin.font [active] HelveticaNeue-Thin plain 13 javax.swing.plaf.FontUIResource [UI]

View File

@@ -1396,6 +1396,7 @@ ViewportUI com.formdev.flatlaf.ui.FlatViewportUI
[style].monospaced font: $monospaced.font [style].monospaced font: $monospaced.font
[style].semibold font: $semibold.font [style].semibold font: $semibold.font
[style].small font: $small.font [style].small font: $small.font
[style].thin font: $thin.font
#---- ---- #---- ----
@@ -1522,6 +1523,15 @@ textHighlight #4b6eaf HSL 219 40 49 javax.swing.plaf.Colo
textHighlightText #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI] textHighlightText #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI]
textInactiveText #8c8c8c HSL 0 0 55 javax.swing.plaf.ColorUIResource [UI] textInactiveText #8c8c8c HSL 0 0 55 javax.swing.plaf.ColorUIResource [UI]
textText #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI] textText #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI]
#---- thin ----
thin.font [active] Segoe UI Light plain 12 javax.swing.plaf.FontUIResource [UI]
#---- ----
window #3c3f41 HSL 204 4 25 javax.swing.plaf.ColorUIResource [UI] window #3c3f41 HSL 204 4 25 javax.swing.plaf.ColorUIResource [UI]
windowBorder #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI] windowBorder #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI]
windowText #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI] windowText #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI]

View File

@@ -134,3 +134,9 @@
- small.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI] - small.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
+ small.font [active] Helvetica Neue plain 11 javax.swing.plaf.FontUIResource [UI] + small.font [active] Helvetica Neue plain 11 javax.swing.plaf.FontUIResource [UI]
#---- thin ----
- thin.font [active] Segoe UI Light plain 12 javax.swing.plaf.FontUIResource [UI]
+ thin.font [active] HelveticaNeue-Thin plain 13 javax.swing.plaf.FontUIResource [UI]

View File

@@ -1401,6 +1401,7 @@ ViewportUI com.formdev.flatlaf.ui.FlatViewportUI
[style].monospaced font: $monospaced.font [style].monospaced font: $monospaced.font
[style].semibold font: $semibold.font [style].semibold font: $semibold.font
[style].small font: $small.font [style].small font: $small.font
[style].thin font: $thin.font
#---- ---- #---- ----
@@ -1527,6 +1528,15 @@ textHighlight #2675bf HSL 209 67 45 javax.swing.plaf.Colo
textHighlightText #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI] textHighlightText #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
textInactiveText #8c8c8c HSL 0 0 55 javax.swing.plaf.ColorUIResource [UI] textInactiveText #8c8c8c HSL 0 0 55 javax.swing.plaf.ColorUIResource [UI]
textText #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI] textText #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]
#---- thin ----
thin.font [active] Segoe UI Light plain 12 javax.swing.plaf.FontUIResource [UI]
#---- ----
window #f2f2f2 HSL 0 0 95 javax.swing.plaf.ColorUIResource [UI] window #f2f2f2 HSL 0 0 95 javax.swing.plaf.ColorUIResource [UI]
windowBorder #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI] windowBorder #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]
windowText #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI] windowText #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]

View File

@@ -1399,10 +1399,13 @@ ViewportUI com.formdev.flatlaf.ui.FlatViewportUI
[style].h3 font: $h3.font [style].h3 font: $h3.font
[style].h4 font: $h4.font [style].h4 font: $h4.font
[style].large font: $large.font [style].large font: $large.font
[style].light font: $light.font
[style].medium font: $medium.font [style].medium font: $medium.font
[style].mini font: $mini.font [style].mini font: $mini.font
[style].monospaced font: $monospaced.font [style].monospaced font: $monospaced.font
[style].semibold font: $semibold.font
[style].small font: $small.font [style].small font: $small.font
[style].thin font: $thin.font
#---- ---- #---- ----
@@ -1476,6 +1479,11 @@ laf.scaleFactor [active] 1.0
large.font [active] Segoe UI plain 14 javax.swing.plaf.FontUIResource [UI] large.font [active] Segoe UI plain 14 javax.swing.plaf.FontUIResource [UI]
#---- light ----
light.font [active] Segoe UI Light plain 12 javax.swing.plaf.FontUIResource [UI]
#---- medium ---- #---- medium ----
medium.font [active] Segoe UI plain 11 javax.swing.plaf.FontUIResource [UI] medium.font [active] Segoe UI plain 11 javax.swing.plaf.FontUIResource [UI]
@@ -1502,6 +1510,11 @@ monospaced.font [active] Consolas plain 12 javax.swing.plaf.Fo
scrollbar #88ff88 HSL 120 100 77 javax.swing.plaf.ColorUIResource [UI] scrollbar #88ff88 HSL 120 100 77 javax.swing.plaf.ColorUIResource [UI]
#---- semibold ----
semibold.font [active] Segoe UI Semibold plain 12 javax.swing.plaf.FontUIResource [UI]
#---- small ---- #---- small ----
small.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI] small.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
@@ -1519,6 +1532,15 @@ textHighlight #00aa00 HSL 120 100 33 javax.swing.plaf.Colo
textHighlightText #ffff00 HSL 60 100 50 javax.swing.plaf.ColorUIResource [UI] textHighlightText #ffff00 HSL 60 100 50 javax.swing.plaf.ColorUIResource [UI]
textInactiveText #000088 HSL 240 100 27 javax.swing.plaf.ColorUIResource [UI] textInactiveText #000088 HSL 240 100 27 javax.swing.plaf.ColorUIResource [UI]
textText #ff0000 HSL 0 100 50 javax.swing.plaf.ColorUIResource [UI] textText #ff0000 HSL 0 100 50 javax.swing.plaf.ColorUIResource [UI]
#---- thin ----
thin.font [active] Segoe UI Light plain 12 javax.swing.plaf.FontUIResource [UI]
#---- ----
window #ccffcc HSL 120 100 90 javax.swing.plaf.ColorUIResource [UI] window #ccffcc HSL 120 100 90 javax.swing.plaf.ColorUIResource [UI]
windowBorder #ff0000 HSL 0 100 50 javax.swing.plaf.ColorUIResource [UI] windowBorder #ff0000 HSL 0 100 50 javax.swing.plaf.ColorUIResource [UI]
windowText #ff0000 HSL 0 100 50 javax.swing.plaf.ColorUIResource [UI] windowText #ff0000 HSL 0 100 50 javax.swing.plaf.ColorUIResource [UI]

View File

@@ -53,6 +53,7 @@ public class FlatThemePreviewFonts
FlatThemePreviewFonts.FontPreview mediumPreview = new FlatThemePreviewFonts.FontPreview(); FlatThemePreviewFonts.FontPreview mediumPreview = new FlatThemePreviewFonts.FontPreview();
FlatThemePreviewFonts.FontPreview smallPreview = new FlatThemePreviewFonts.FontPreview(); FlatThemePreviewFonts.FontPreview smallPreview = new FlatThemePreviewFonts.FontPreview();
FlatThemePreviewFonts.FontPreview miniPreview = new FlatThemePreviewFonts.FontPreview(); FlatThemePreviewFonts.FontPreview miniPreview = new FlatThemePreviewFonts.FontPreview();
FlatThemePreviewFonts.FontPreview thinPreview = new FlatThemePreviewFonts.FontPreview();
FlatThemePreviewFonts.FontPreview lightPreview = new FlatThemePreviewFonts.FontPreview(); FlatThemePreviewFonts.FontPreview lightPreview = new FlatThemePreviewFonts.FontPreview();
FlatThemePreviewFonts.FontPreview semiboldPreview = new FlatThemePreviewFonts.FontPreview(); FlatThemePreviewFonts.FontPreview semiboldPreview = new FlatThemePreviewFonts.FontPreview();
FlatThemePreviewFonts.FontPreview monospacedPreview = new FlatThemePreviewFonts.FontPreview(); FlatThemePreviewFonts.FontPreview monospacedPreview = new FlatThemePreviewFonts.FontPreview();
@@ -79,6 +80,7 @@ public class FlatThemePreviewFonts
"[bottom]" + "[bottom]" +
"[bottom]para" + "[bottom]para" +
"[]" + "[]" +
"[]" +
"[]para" + "[]para" +
"[]para" + "[]para" +
"[]")); "[]"));
@@ -147,29 +149,34 @@ public class FlatThemePreviewFonts
miniPreview.setFontStyle("mini"); miniPreview.setFontStyle("mini");
add(miniPreview, "cell 0 12,gapx 12"); add(miniPreview, "cell 0 12,gapx 12");
//---- thinPreview ----
thinPreview.setFontType("Thin");
thinPreview.setFontStyle("thin");
add(thinPreview, "cell 0 13,gapx 12");
//---- lightPreview ---- //---- lightPreview ----
lightPreview.setFontType("Light"); lightPreview.setFontType("Light");
lightPreview.setFontStyle("light"); lightPreview.setFontStyle("light");
add(lightPreview, "cell 0 13,gapx 12"); add(lightPreview, "cell 0 14,gapx 12");
//---- semiboldPreview ---- //---- semiboldPreview ----
semiboldPreview.setFontType("Semibold"); semiboldPreview.setFontType("Semibold");
semiboldPreview.setFontStyle("semibold"); semiboldPreview.setFontStyle("semibold");
add(semiboldPreview, "cell 0 14,gapx 12"); add(semiboldPreview, "cell 0 15,gapx 12");
//---- monospacedPreview ---- //---- monospacedPreview ----
monospacedPreview.setFontType("Monospaced"); monospacedPreview.setFontType("Monospaced");
monospacedPreview.setFontStyle("monospaced"); monospacedPreview.setFontStyle("monospaced");
add(monospacedPreview, "cell 0 15,gapx 12"); add(monospacedPreview, "cell 0 16,gapx 12");
//---- scaleLabel ---- //---- scaleLabel ----
scaleLabel.setText("Fonts are scaled by:"); scaleLabel.setText("Fonts are scaled by:");
add(scaleLabel, "cell 0 16,gapx 12"); add(scaleLabel, "cell 0 17,gapx 12");
//---- scaleValueLabel ---- //---- scaleValueLabel ----
scaleValueLabel.setText("1x"); scaleValueLabel.setText("1x");
scaleValueLabel.putClientProperty("FlatLaf.styleClass", "h2"); scaleValueLabel.putClientProperty("FlatLaf.styleClass", "h2");
add(scaleValueLabel, "cell 0 16"); add(scaleValueLabel, "cell 0 17");
// JFormDesigner - End of component initialization //GEN-END:initComponents // JFormDesigner - End of component initialization //GEN-END:initComponents
} }

View File

@@ -9,7 +9,7 @@ new FormModel {
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "ltr,insets dialog,hidemode 3" "$layoutConstraints": "ltr,insets dialog,hidemode 3"
"$columnConstraints": "[left]unrel" "$columnConstraints": "[left]unrel"
"$rowConstraints": "[][bottom][bottom][bottom][bottom][bottom][bottom]para[][bottom][bottom][bottom][bottom][bottom]para[][]para[]para[]" "$rowConstraints": "[][bottom][bottom][bottom][bottom][bottom][bottom]para[][bottom][bottom][bottom][bottom][bottom]para[][][]para[]para[]"
} ) { } ) {
name: "this" name: "this"
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
@@ -105,32 +105,39 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 12,gapx 12" "value": "cell 0 12,gapx 12"
} ) } )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "thinPreview"
"fontType": "Thin"
"fontStyle": "thin"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 13,gapx 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) { add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "lightPreview" name: "lightPreview"
"fontType": "Light" "fontType": "Light"
"fontStyle": "light" "fontStyle": "light"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 13,gapx 12" "value": "cell 0 14,gapx 12"
} ) } )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) { add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "semiboldPreview" name: "semiboldPreview"
"fontType": "Semibold" "fontType": "Semibold"
"fontStyle": "semibold" "fontStyle": "semibold"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 14,gapx 12" "value": "cell 0 15,gapx 12"
} ) } )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) { add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "monospacedPreview" name: "monospacedPreview"
"fontType": "Monospaced" "fontType": "Monospaced"
"fontStyle": "monospaced" "fontStyle": "monospaced"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 15,gapx 12" "value": "cell 0 16,gapx 12"
} ) } )
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "scaleLabel" name: "scaleLabel"
"text": "Fonts are scaled by:" "text": "Fonts are scaled by:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 16,gapx 12" "value": "cell 0 17,gapx 12"
} ) } )
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "scaleValueLabel" name: "scaleValueLabel"
@@ -140,7 +147,7 @@ new FormModel {
"JavaCodeGenerator.variableLocal": false "JavaCodeGenerator.variableLocal": false
} }
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 16" "value": "cell 0 17"
} ) } )
}, new FormLayoutConstraints( null ) { }, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 5, 0 ) "location": new java.awt.Point( 5, 0 )

View File

@@ -1077,6 +1077,7 @@ ViewportUI
[style].monospaced [style].monospaced
[style].semibold [style].semibold
[style].small [style].small
[style].thin
activeCaption activeCaption
activeCaptionBorder activeCaptionBorder
activeCaptionText activeCaptionText
@@ -1119,6 +1120,7 @@ textHighlight
textHighlightText textHighlightText
textInactiveText textInactiveText
textText textText
thin.font
window window
windowBorder windowBorder
windowText windowText