Typography:

- use semibold for `h1`, `h2` and `h3`
- added `h1.regular`, `h2.regular` and `h3.regular`
This commit is contained in:
Karl Tauber
2021-11-19 11:13:32 +01:00
parent f80d2bacf4
commit d360375b4f
9 changed files with 93 additions and 28 deletions

View File

@@ -31,11 +31,15 @@
# headings # headings
h00.font = +24 h00.font = +24
h0.font = +18 h0.font = +18
h1.font = +12 h1.font = +12 $semibold.font
h2.font = +6 h2.font = +6 $semibold.font
h3.font = +3 h3.font = +3 $semibold.font
h4.font = bold h4.font = bold
h1.regular.font = +12
h2.regular.font = +6
h3.regular.font = +3
# text # text
large.font = +2 large.font = +2
medium.font = -1 medium.font = -1
@@ -72,6 +76,9 @@ monospaced.font = Monospaced
[style].h2 = font: $h2.font [style].h2 = font: $h2.font
[style].h3 = font: $h3.font [style].h3 = font: $h3.font
[style].h4 = font: $h4.font [style].h4 = font: $h4.font
[style].h1.regular = font: $h1.regular.font
[style].h2.regular = font: $h2.regular.font
[style].h3.regular = font: $h3.regular.font
[style].large = font: $large.font [style].large = font: $large.font
[style].medium = font: $medium.font [style].medium = font: $medium.font
[style].small = font: $small.font [style].small = font: $small.font

View File

@@ -72,20 +72,29 @@
#---- h1 ---- #---- h1 ----
- h1.font [active] Segoe UI plain 24 javax.swing.plaf.FontUIResource [UI] - h1.font [active] Segoe UI Semibold plain 24 javax.swing.plaf.FontUIResource [UI]
+ h1.font [active] Helvetica Neue plain 25 javax.swing.plaf.FontUIResource [UI] + h1.font [active] HelveticaNeue-Medium plain 25 javax.swing.plaf.FontUIResource [UI]
- h1.regular.font [active] Segoe UI plain 24 javax.swing.plaf.FontUIResource [UI]
+ h1.regular.font [active] Helvetica Neue plain 25 javax.swing.plaf.FontUIResource [UI]
#---- h2 ---- #---- h2 ----
- h2.font [active] Segoe UI plain 18 javax.swing.plaf.FontUIResource [UI] - h2.font [active] Segoe UI Semibold plain 18 javax.swing.plaf.FontUIResource [UI]
+ h2.font [active] Helvetica Neue plain 19 javax.swing.plaf.FontUIResource [UI] + h2.font [active] HelveticaNeue-Medium plain 19 javax.swing.plaf.FontUIResource [UI]
- h2.regular.font [active] Segoe UI plain 18 javax.swing.plaf.FontUIResource [UI]
+ h2.regular.font [active] Helvetica Neue plain 19 javax.swing.plaf.FontUIResource [UI]
#---- h3 ---- #---- h3 ----
- h3.font [active] Segoe UI plain 15 javax.swing.plaf.FontUIResource [UI] - h3.font [active] Segoe UI Semibold plain 15 javax.swing.plaf.FontUIResource [UI]
+ h3.font [active] Helvetica Neue plain 16 javax.swing.plaf.FontUIResource [UI] + h3.font [active] HelveticaNeue-Medium plain 16 javax.swing.plaf.FontUIResource [UI]
- h3.regular.font [active] Segoe UI plain 15 javax.swing.plaf.FontUIResource [UI]
+ h3.regular.font [active] Helvetica Neue plain 16 javax.swing.plaf.FontUIResource [UI]
#---- h4 ---- #---- h4 ----

View File

@@ -1385,8 +1385,11 @@ ViewportUI com.formdev.flatlaf.ui.FlatViewportUI
[style].h00 font: $h00.font [style].h00 font: $h00.font
[style].h0 font: $h0.font [style].h0 font: $h0.font
[style].h1.regular font: $h1.regular.font
[style].h1 font: $h1.font [style].h1 font: $h1.font
[style].h2.regular font: $h2.regular.font
[style].h2 font: $h2.font [style].h2 font: $h2.font
[style].h3.regular font: $h3.regular.font
[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
@@ -1425,17 +1428,20 @@ h00.font [active] Segoe UI plain 36 javax.swing.plaf.Fo
#---- h1 ---- #---- h1 ----
h1.font [active] Segoe UI plain 24 javax.swing.plaf.FontUIResource [UI] h1.font [active] Segoe UI Semibold plain 24 javax.swing.plaf.FontUIResource [UI]
h1.regular.font [active] Segoe UI plain 24 javax.swing.plaf.FontUIResource [UI]
#---- h2 ---- #---- h2 ----
h2.font [active] Segoe UI plain 18 javax.swing.plaf.FontUIResource [UI] h2.font [active] Segoe UI Semibold plain 18 javax.swing.plaf.FontUIResource [UI]
h2.regular.font [active] Segoe UI plain 18 javax.swing.plaf.FontUIResource [UI]
#---- h3 ---- #---- h3 ----
h3.font [active] Segoe UI plain 15 javax.swing.plaf.FontUIResource [UI] h3.font [active] Segoe UI Semibold plain 15 javax.swing.plaf.FontUIResource [UI]
h3.regular.font [active] Segoe UI plain 15 javax.swing.plaf.FontUIResource [UI]
#---- h4 ---- #---- h4 ----

View File

@@ -72,20 +72,29 @@
#---- h1 ---- #---- h1 ----
- h1.font [active] Segoe UI plain 24 javax.swing.plaf.FontUIResource [UI] - h1.font [active] Segoe UI Semibold plain 24 javax.swing.plaf.FontUIResource [UI]
+ h1.font [active] Helvetica Neue plain 25 javax.swing.plaf.FontUIResource [UI] + h1.font [active] HelveticaNeue-Medium plain 25 javax.swing.plaf.FontUIResource [UI]
- h1.regular.font [active] Segoe UI plain 24 javax.swing.plaf.FontUIResource [UI]
+ h1.regular.font [active] Helvetica Neue plain 25 javax.swing.plaf.FontUIResource [UI]
#---- h2 ---- #---- h2 ----
- h2.font [active] Segoe UI plain 18 javax.swing.plaf.FontUIResource [UI] - h2.font [active] Segoe UI Semibold plain 18 javax.swing.plaf.FontUIResource [UI]
+ h2.font [active] Helvetica Neue plain 19 javax.swing.plaf.FontUIResource [UI] + h2.font [active] HelveticaNeue-Medium plain 19 javax.swing.plaf.FontUIResource [UI]
- h2.regular.font [active] Segoe UI plain 18 javax.swing.plaf.FontUIResource [UI]
+ h2.regular.font [active] Helvetica Neue plain 19 javax.swing.plaf.FontUIResource [UI]
#---- h3 ---- #---- h3 ----
- h3.font [active] Segoe UI plain 15 javax.swing.plaf.FontUIResource [UI] - h3.font [active] Segoe UI Semibold plain 15 javax.swing.plaf.FontUIResource [UI]
+ h3.font [active] Helvetica Neue plain 16 javax.swing.plaf.FontUIResource [UI] + h3.font [active] HelveticaNeue-Medium plain 16 javax.swing.plaf.FontUIResource [UI]
- h3.regular.font [active] Segoe UI plain 15 javax.swing.plaf.FontUIResource [UI]
+ h3.regular.font [active] Helvetica Neue plain 16 javax.swing.plaf.FontUIResource [UI]
#---- h4 ---- #---- h4 ----

View File

@@ -1390,8 +1390,11 @@ ViewportUI com.formdev.flatlaf.ui.FlatViewportUI
[style].h00 font: $h00.font [style].h00 font: $h00.font
[style].h0 font: $h0.font [style].h0 font: $h0.font
[style].h1.regular font: $h1.regular.font
[style].h1 font: $h1.font [style].h1 font: $h1.font
[style].h2.regular font: $h2.regular.font
[style].h2 font: $h2.font [style].h2 font: $h2.font
[style].h3.regular font: $h3.regular.font
[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
@@ -1430,17 +1433,20 @@ h00.font [active] Segoe UI plain 36 javax.swing.plaf.Fo
#---- h1 ---- #---- h1 ----
h1.font [active] Segoe UI plain 24 javax.swing.plaf.FontUIResource [UI] h1.font [active] Segoe UI Semibold plain 24 javax.swing.plaf.FontUIResource [UI]
h1.regular.font [active] Segoe UI plain 24 javax.swing.plaf.FontUIResource [UI]
#---- h2 ---- #---- h2 ----
h2.font [active] Segoe UI plain 18 javax.swing.plaf.FontUIResource [UI] h2.font [active] Segoe UI Semibold plain 18 javax.swing.plaf.FontUIResource [UI]
h2.regular.font [active] Segoe UI plain 18 javax.swing.plaf.FontUIResource [UI]
#---- h3 ---- #---- h3 ----
h3.font [active] Segoe UI plain 15 javax.swing.plaf.FontUIResource [UI] h3.font [active] Segoe UI Semibold plain 15 javax.swing.plaf.FontUIResource [UI]
h3.regular.font [active] Segoe UI plain 15 javax.swing.plaf.FontUIResource [UI]
#---- h4 ---- #---- h4 ----

View File

@@ -1394,8 +1394,11 @@ ViewportUI com.formdev.flatlaf.ui.FlatViewportUI
[style].h00 font: $h00.font [style].h00 font: $h00.font
[style].h0 font: $h0.font [style].h0 font: $h0.font
[style].h1.regular font: $h1.regular.font
[style].h1 font: $h1.font [style].h1 font: $h1.font
[style].h2.regular font: $h2.regular.font
[style].h2 font: $h2.font [style].h2 font: $h2.font
[style].h3.regular font: $h3.regular.font
[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
@@ -1434,17 +1437,20 @@ h00.font [active] Segoe UI plain 36 javax.swing.plaf.Fo
#---- h1 ---- #---- h1 ----
h1.font [active] Segoe UI plain 24 javax.swing.plaf.FontUIResource [UI] h1.font [active] Segoe UI Semibold plain 24 javax.swing.plaf.FontUIResource [UI]
h1.regular.font [active] Segoe UI plain 24 javax.swing.plaf.FontUIResource [UI]
#---- h2 ---- #---- h2 ----
h2.font [active] Segoe UI plain 18 javax.swing.plaf.FontUIResource [UI] h2.font [active] Segoe UI Semibold plain 18 javax.swing.plaf.FontUIResource [UI]
h2.regular.font [active] Segoe UI plain 18 javax.swing.plaf.FontUIResource [UI]
#---- h3 ---- #---- h3 ----
h3.font [active] Segoe UI plain 15 javax.swing.plaf.FontUIResource [UI] h3.font [active] Segoe UI Semibold plain 15 javax.swing.plaf.FontUIResource [UI]
h3.regular.font [active] Segoe UI plain 15 javax.swing.plaf.FontUIResource [UI]
#---- h4 ---- #---- h4 ----

View File

@@ -437,6 +437,8 @@ public class FlatTypographyTest
fontPreview2.setBaseSize(12); fontPreview2.setBaseSize(12);
fontPreview2.setFontSize(24); fontPreview2.setFontSize(24);
fontPreview2.setFontType("H1"); fontPreview2.setFontType("H1");
fontPreview2.setSemibold(true);
fontPreview2.setShowPlain(true);
add(fontPreview2, "cell 0 6"); add(fontPreview2, "cell 0 6");
//---- fontPreview12 ---- //---- fontPreview12 ----
@@ -510,6 +512,8 @@ public class FlatTypographyTest
fontPreview3.setBaseSize(12); fontPreview3.setBaseSize(12);
fontPreview3.setFontSize(18); fontPreview3.setFontSize(18);
fontPreview3.setFontType("H2"); fontPreview3.setFontType("H2");
fontPreview3.setSemibold(true);
fontPreview3.setShowPlain(true);
add(fontPreview3, "cell 0 7"); add(fontPreview3, "cell 0 7");
//---- fontPreview13 ---- //---- fontPreview13 ----
@@ -583,6 +587,8 @@ public class FlatTypographyTest
fontPreview4.setBaseSize(12); fontPreview4.setBaseSize(12);
fontPreview4.setFontSize(15); fontPreview4.setFontSize(15);
fontPreview4.setFontType("H3"); fontPreview4.setFontType("H3");
fontPreview4.setSemibold(true);
fontPreview4.setShowPlain(true);
add(fontPreview4, "cell 0 8"); add(fontPreview4, "cell 0 8");
//---- fontPreview14 ---- //---- fontPreview14 ----
@@ -1080,9 +1086,8 @@ public class FlatTypographyTest
} }
private void updateFont() { private void updateFont() {
Font defaultFont = getBaseFont(); previewLabel.setFont( getBaseFont().deriveFont( bold ? Font.BOLD : Font.PLAIN, fontSize ) );
previewLabel.setFont( defaultFont.deriveFont( bold ? Font.BOLD : Font.PLAIN, fontSize ) ); preview2Label.setFont( getDefaultFont().deriveFont( (float) fontSize ) );
preview2Label.setFont( defaultFont.deriveFont( Font.PLAIN, fontSize ) );
} }
private void updateDescription() { private void updateDescription() {
@@ -1109,7 +1114,12 @@ public class FlatTypographyTest
font = UIManager.getFont( "semibold.font" ); font = UIManager.getFont( "semibold.font" );
if( font == null ) if( font == null )
font = UIManager.getFont( "defaultFont" ); font = getDefaultFont();
return font;
}
private Font getDefaultFont() {
Font font = UIManager.getFont( "defaultFont" );
if( font == null ) if( font == null )
font = UIManager.getFont( "Label.font" ); font = UIManager.getFont( "Label.font" );
return font; return font;

View File

@@ -335,6 +335,8 @@ new FormModel {
"baseSize": 12 "baseSize": 12
"fontSize": 24 "fontSize": 24
"fontType": "H1" "fontType": "H1"
"semibold": true
"showPlain": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 6" "value": "cell 0 6"
} ) } )
@@ -430,6 +432,8 @@ new FormModel {
"baseSize": 12 "baseSize": 12
"fontSize": 18 "fontSize": 18
"fontType": "H2" "fontType": "H2"
"semibold": true
"showPlain": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 7" "value": "cell 0 7"
} ) } )
@@ -525,6 +529,8 @@ new FormModel {
"baseSize": 12 "baseSize": 12
"fontSize": 15 "fontSize": 15
"fontType": "H3" "fontType": "H3"
"semibold": true
"showPlain": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 8" "value": "cell 0 8"
} ) } )

View File

@@ -1067,8 +1067,11 @@ ViewportUI
[style].h0 [style].h0
[style].h00 [style].h00
[style].h1 [style].h1
[style].h1.regular
[style].h2 [style].h2
[style].h2.regular
[style].h3 [style].h3
[style].h3.regular
[style].h4 [style].h4
[style].large [style].large
[style].light [style].light
@@ -1091,8 +1094,11 @@ desktop
h0.font h0.font
h00.font h00.font
h1.font h1.font
h1.regular.font
h2.font h2.font
h2.regular.font
h3.font h3.font
h3.regular.font
h4.font h4.font
html.missingImage html.missingImage
html.pendingImage html.pendingImage