Skip to content

Commit 4927843

Browse files
Merge pull request #93 from github/mona-sans-opsz-and-mono
Mona Sans Display styles and Mona Sans Mono
2 parents 39d556e + 064025d commit 4927843

File tree

2,336 files changed

+679553
-80
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,336 files changed

+679553
-80
lines changed

.github/workflows/release.yml

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
name: Create Release
2+
# Release workflow for Mona Sans
3+
4+
on:
5+
push:
6+
tags:
7+
- 'v*.*' # Matches tags like v1.300, etc.
8+
workflow_dispatch:
9+
inputs:
10+
version:
11+
description: 'Version for testing (e.g., "test-1.4" or "dev-2024-01-01")'
12+
required: true
13+
default: 'test-1.4'
14+
type: string
15+
16+
permissions:
17+
contents: write # Required to create releases and upload assets
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0 # Full history for proper release notes
28+
29+
- name: Extract version from tag or input
30+
id: version
31+
run: |
32+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
33+
VERSION="${{ github.event.inputs.version }}"
34+
if [[ "$VERSION" == v* ]]; then
35+
TAG="$VERSION"
36+
else
37+
TAG="v$VERSION"
38+
fi
39+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
40+
echo "tag=${TAG}" >> $GITHUB_OUTPUT
41+
else
42+
VERSION=${GITHUB_REF#refs/tags/v}
43+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
44+
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
45+
fi
46+
47+
- name: Build fonts
48+
run: |
49+
cd sources
50+
bash build.sh
51+
cd ..
52+
env:
53+
FB_CONTINUE_ON_ERROR: true
54+
55+
- name: Prepare release artifacts
56+
run: |
57+
mkdir -p release-artifacts
58+
59+
# Create static fonts package (OTF + TTF)
60+
zip -r "release-artifacts/mona-sans-static-v${{ steps.version.outputs.version }}.zip" \
61+
fonts/static/ OFL.txt README.md
62+
63+
# Create variable fonts package
64+
zip -r "release-artifacts/mona-sans-variable-v${{ steps.version.outputs.version }}.zip" \
65+
fonts/variable/ OFL.txt README.md
66+
67+
# Create webfonts package
68+
if [ -d "fonts/webfonts" ]; then
69+
zip -r "release-artifacts/mona-sans-webfonts-v${{ steps.version.outputs.version }}.zip" \
70+
fonts/webfonts/ OFL.txt README.md
71+
fi
72+
73+
# Create complete package with all formats
74+
zip -r "release-artifacts/mona-sans-complete-v${{ steps.version.outputs.version }}.zip" \
75+
fonts/ -x "fonts/googlefonts/*" -x "fonts/googlefonts/**" \
76+
OFL.txt README.md
77+
78+
- name: Create release notes
79+
id: release_notes
80+
run: |
81+
cat > release_notes.md << 'EOF'
82+
# Mona Sans ${{ steps.version.outputs.tag }}
83+
84+
A versatile typeface, designed by GitHub together with Degarism and inspired by industrial-era grotesques. Mona Sans works well across product, web, and print.
85+
86+
## Font Packages
87+
88+
- **Static Fonts** - Individual OTF and TTF files for each weight, width, and style
89+
- **Variable Fonts** - Modern variable font files with adjustable weight and width
90+
- **Web Fonts** - WOFF/WOFF2 files optimized for web use
91+
- **Complete Package** - All font formats in one download
92+
93+
See the [README](https://github.com/github/mona-sans#readme) for detailed installation instructions.
94+
95+
## Font Specifications
96+
97+
- **Weight Range**: 200-900 (ExtraLight to Black)
98+
- **Width Range**: 75-125 (Condensed to Expanded)
99+
- **Styles**: Roman and Italic
100+
- **Format Support**: OTF, TTF, Variable TTF, WOFF, WOFF2
101+
EOF
102+
103+
- name: Create draft release with assets
104+
uses: softprops/action-gh-release@v2
105+
with:
106+
tag_name: ${{ steps.version.outputs.tag }}
107+
name: Mona Sans ${{ steps.version.outputs.tag }}
108+
body_path: release_notes.md
109+
draft: true
110+
prerelease: false
111+
files: |
112+
release-artifacts/mona-sans-static-v${{ steps.version.outputs.version }}.zip
113+
release-artifacts/mona-sans-variable-v${{ steps.version.outputs.version }}.zip
114+
release-artifacts/mona-sans-webfonts-v${{ steps.version.outputs.version }}.zip
115+
release-artifacts/mona-sans-complete-v${{ steps.version.outputs.version }}.zip
116+
117+
- name: Upload build artifacts
118+
uses: actions/upload-artifact@v4
119+
with:
120+
name: mona-sans-fonts-v${{ steps.version.outputs.version }}
121+
path: fonts/
122+
123+
- name: Summary
124+
run: |
125+
echo "## Release Summary" >> $GITHUB_STEP_SUMMARY
126+
echo "Created draft release: **Mona Sans ${{ steps.version.outputs.tag }}**" >> $GITHUB_STEP_SUMMARY
127+
echo "" >> $GITHUB_STEP_SUMMARY
128+
echo "### Uploaded Assets:" >> $GITHUB_STEP_SUMMARY
129+
find release-artifacts -maxdepth 1 -name '*.zip' -print0 | while IFS= read -r -d '' file; do
130+
filename=$(basename "$file")
131+
size=$(stat -c %s "$file")
132+
# Convert size in bytes to human-readable format
133+
hr_size=$(numfmt --to=iec-i --suffix=B "$size")
134+
echo "- $filename ($hr_size)" >> $GITHUB_STEP_SUMMARY
135+
done
136+
echo "" >> $GITHUB_STEP_SUMMARY
137+
echo "🔗 **[View Draft Release](https://github.com/${{ github.repository }}/releases/tag/${{ steps.version.outputs.tag }})**" >> $GITHUB_STEP_SUMMARY

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
.DS_Store
2-
*).glyphs
2+
*).glyphs
3+
4+
# Ignore ninja and ufo build files
5+
sources/instance_ufos
6+
sources/.ninja_log
7+
sources/build.ninja

README.md

Lines changed: 78 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -6,98 +6,73 @@ A strong and versatile typeface, designed together with [Degarism](https://degar
66

77
Mona Sans is a [variable font](https://web.dev/variable-fonts/). Variable fonts enable different variations of a typeface to be incorporated into one single file, and are supported by all major browsers, allowing for performance benefits and granular design control of the typeface's weight, width, and slant.
88

9-
![mona-sans](https://user-images.githubusercontent.com/99746865/200648883-dbd47e9a-9d95-483e-aef6-1bfa602eb942.png)
9+
![mona-sans](https://github.com/user-attachments/assets/3d9667f5-30ad-4b95-bc8a-58e38767187c)
1010

11-
## Usage
11+
## Variable font usage
1212

13-
For web, we recommend using `Mona Sans.woff2`. Define the font with a `@font-face` rule, set its **weight** and **stretch** ranges, and use it:
13+
The design space is large, so we've split the font up into a few variable fonts.
14+
15+
If you want to access the whole design space, use `MonaSansVF[wdth,wght,opsz,ital]`. On the web, you can utilize points on that space like this:
1416

1517
```css
1618
@font-face {
17-
font-family: 'Mona Sans';
19+
font-family: 'Mona Sans VF';
1820
src:
19-
url('Mona-Sans.woff2') format('woff2 supports variations'),
20-
url('Mona-Sans.woff2') format('woff2-variations');
21+
url('MonaSansVF[wdth,wght,opsz,ital].woff2') format('woff2 supports variations'),
22+
url('MonaSansVF[wdth,wght,opsz,ital].woff2') format('woff2-variations');
2123
font-weight: 200 900;
2224
font-stretch: 75% 125%;
25+
font-optical-sizing: auto;
2326
}
2427

2528
html {
26-
font-family: 'Mona Sans';
29+
font-family: 'Mona Sans VF';
30+
}
31+
```
32+
33+
Mona Sans includes an optical size axis (`opsz`) that automatically adjusts the font's design for optimal readability at different sizes. The optical size range spans from 1 to 100, where smaller values (1-20) are optimized for body text with improved readability, while larger values (21-100) are designed for display use with refined details and tighter spacing. When `font-optical-sizing: auto` is set, browsers will automatically select the appropriate optical size based on the font size, or you can manually control it using `font-variation-settings: "opsz" [value]`. That looks like this:
34+
35+
```css
36+
.heading {
37+
font-variation-settings: "wght" 700, "wdth" 125, "opsz" 72; /* Bold, Expanded, Display size */
38+
}
39+
40+
.body-text {
41+
font-variation-settings: "wght" 400, "wdth" 100, "opsz" 12; /* Regular, Normal width, Text size */
2742
}
2843
```
2944

3045
To reduce [CLS](https://web.dev/cls/), you can preload the font in the `head` of your document:
3146

3247
```html
33-
<link rel="preload" href="Mona-Sans.woff2" as="font" type="font/woff2" crossorigin>
48+
<link rel="preload" href="MonaSansVF[wdth,wght,opsz,ital].woff2" as="font" type="font/woff2" crossorigin>
3449
```
3550

36-
## Styles
37-
| Style Name | Italic Name | Weight | Width |
38-
| --- | --- | --- | --- |
39-
| UltraLight Condensed | UltraLight Condensed Italic | 200 | 75 |
40-
| Light Condensed | Light Condensed Italic | 300 | 75 |
41-
| Regular Condensed | Regular Condensed Italic | 400 | 75 |
42-
| Medium Condensed | Medium Condensed Italic | 500 | 75 |
43-
| SemiBold Condensed | SemiBold Condensed Italic | 600 | 75 |
44-
| Bold Condensed | Bold Condensed Italic | 700 | 75 |
45-
| ExtraBold Condensed | ExtraBold Condensed Italic | 800 | 75 |
46-
| Black Condensed | Black Condensed Italic | 900 | 75 |
47-
| UltraLight SemiCondensed | UltraLight SemiCondensed Italic | 200 | 87.5 |
48-
| Light SemiCondensed | Light SemiCondensed Italic | 300 | 87.5 |
49-
| Regular SemiCondensed | Regular SemiCondensed Italic | 400 | 87.5 |
50-
| Medium SemiCondensed | Medium SemiCondensed Italic | 500 | 87.5 |
51-
| SemiBold SemiCondensed | SemiBold SemiCondensed Italic | 600 | 87.5 |
52-
| Bold SemiCondensed | Bold SemiCondensed Italic | 700 | 87.5 |
53-
| ExtraBold SemiCondensed | ExtraBold SemiCondensed Italic | 800 | 87.5 |
54-
| Black SemiCondensed | Black SemiCondensed Italic | 900 | 87.5 |
55-
| UltraLight | UltraLight Italic | 200 | 100 |
56-
| Light | Light Italic | 300 | 100 |
57-
| Regular | Regular Italic | 400 | 100 |
58-
| Medium | Medium Italic | 500 | 100 |
59-
| SemiBold | SemiBold Italic | 600 | 100 |
60-
| Bold | Bold Italic | 700 | 100 |
61-
| ExtraBold | ExtraBold Italic | 800 | 100 |
62-
| Black | Black Italic | 900 | 100 |
63-
| UltraLight SemiExpanded | UltraLight SemiExpanded Italic | 200 | 112.5 |
64-
| Light SemiExpanded | Light SemiExpanded Italic | 300 | 112.5 |
65-
| Regular SemiExpanded | Regular SemiExpanded Italic | 400 | 112.5 |
66-
| Medium SemiExpanded | Medium SemiExpanded Italic | 500 | 112.5 |
67-
| SemiBold SemiExpanded | SemiBold SemiExpanded Italic | 600 | 112.5 |
68-
| Bold SemiExpanded | Bold SemiExpanded Italic | 700 | 112.5 |
69-
| ExtraBold SemiExpanded | ExtraBold SemiExpanded Italic | 800 | 112.5 |
70-
| Black SemiExpanded | Black SemiExpanded Italic | 900 | 112.5 |
71-
| UltraLight Expanded | UltraLight Expanded Italic | 200 | 125 |
72-
| Light Expanded | Light Expanded Italic | 300 | 125 |
73-
| Regular Expanded | Regular Expanded Italic | 400 | 125 |
74-
| Medium Expanded | Medium Expanded Italic | 500 | 125 |
75-
| SemiBold Expanded | SemiBold Expanded Italic | 600 | 125 |
76-
| Bold Expanded | Bold Expanded Italic | 700 | 125 |
77-
| ExtraBold Expanded | ExtraBold Expanded Italic | 800 | 125 |
78-
| Black Expanded | Black Expanded Italic | 900 | 125 |
51+
Or you can use one of the other variable font files, which cover small portions of the design space. For example, if you're only using the regular width weights and the italic styles, you can use the `MonaSansVF[wght,opsz,ital]` file instead.
7952

8053
## Stylistic sets
8154

82-
Mona Sans has eight stylistic sets:
55+
Mona Sans has ten stylistic sets:
8356

8457
| Set | Description | Example |
8558
| --- | --- | --- |
86-
| ss01 | Square diacritical marks | ![ss01](https://github.com/user-attachments/assets/18fa3132-6839-4ef9-afd9-c75a082899ef) |
87-
| ss02 | Wide uppercase I | ![ss02](https://github.com/user-attachments/assets/a0de7f9c-f9c0-4583-ac32-a10d25a54328) |
88-
| ss03 | Lowercase l with tail | ![ss03](https://github.com/user-attachments/assets/8594effd-0528-4af9-8c58-0dfba66b2b45) |
89-
| ss04 | Lowercase l with top serif | ![ss04](https://github.com/user-attachments/assets/7c7610a9-947e-45d5-80fc-71849a257d82) |
90-
| ss05 | Double-storey a | ![ss05](https://github.com/user-attachments/assets/d31a11b8-1809-4a34-bbcb-b8b7057ddef0) |
91-
| ss06 | Double-storey g | ![ss06](https://github.com/user-attachments/assets/ca8bef04-68d8-4c36-bfa6-8313d5642a9d) |
92-
| ss07 | Round G | ![ss07](https://github.com/user-attachments/assets/4d5fb045-df90-4dc7-8dbb-3f2a271477df) |
93-
| ss08 | Tabular zero with straight bar | ![ss08](https://github.com/user-attachments/assets/6c54f0eb-0054-4876-a366-1c00d955b89b) |
94-
95-
When using Mona Sans on the web, you can control each stylistic set with the syntax `"ssXX" on/off`, e.g.:
59+
| ss01 | Square diacritical marks | <img src="https://github.com/user-attachments/assets/c8be9ca8-8d7a-46d5-843a-7dfc0ca9a171" width="400"> |
60+
| ss02 | Wide uppercase I | <img src="https://github.com/user-attachments/assets/f971d907-c8a5-4fbf-ac75-bf3411a00f57" width="400"> |
61+
| ss03 | Lowercase l with tail | <img src="https://github.com/user-attachments/assets/e20dd37c-f7ba-4964-8888-dd679ed7d3fc" width="400"> |
62+
| ss04 | Lowercase l with top serif | <img src="https://github.com/user-attachments/assets/6aa71393-642e-4989-843d-4c2b9d6b5a1c" width="400"> |
63+
| ss05 | Double-storey a | <img src="https://github.com/user-attachments/assets/c411d743-0bb8-4f15-ad30-769c6d5b83d5" width="400"> |
64+
| ss06 | Double-storey g | <img src="https://github.com/user-attachments/assets/cc640587-6505-49a9-836c-a4a091b0a4cb" width="400"> |
65+
| ss07 | Square G | <img src="https://github.com/user-attachments/assets/2c973b98-8398-4ab2-bb74-45980de799ea" width="400"> |
66+
| ss08 | Tabular zero with straight bar | <img src="https://github.com/user-attachments/assets/1efe404b-ca17-4dbb-877e-47a7080d2785" width="400"> |
67+
| ss09 | Q with diagonal arm | <img src="https://github.com/user-attachments/assets/5f7f28e7-d325-496a-8362-21d7a71b362a" width="400"> |
68+
| ss10 | J with bowl | <img src="https://github.com/user-attachments/assets/5a0776c8-8acf-41ad-ba23-e26515bc1f8e" width="400"> |
69+
70+
When using Mona Sans on the web, you can control each stylistic set with the syntax `"ssXX" on/off`. If you wanted square diacritical marks, small letter L distinct from capital I, and alternative small letter g it would look like this:
9671

9772
```css
9873
html {
99-
font-family: 'Mona Sans';
100-
font-feature-settings: "ss01" on, "ss03" on, "ss05" on; /* Turns on square diacritical marks, small letter L distinct from capital I, and alternative small letter g */
74+
font-family: 'Mona Sans VF';
75+
font-feature-settings: "ss01" on, "ss03" on, "ss05" on;
10176
}
10277
```
10378

@@ -115,5 +90,44 @@ Mona Sans comes with seven ligatures:
11590
| ti | ![ti](https://github.com/user-attachments/assets/556aab9f-e8f5-40dd-b8d2-70903d0cab65) |
11691
| tt | ![tt](https://github.com/user-attachments/assets/d0392c30-2b8c-4646-b578-0ae66a328505) |
11792

93+
## Mona Sans Styles
94+
95+
With the newly added monospace and display styles, Mona Sans’ design space now spans 128 instances. Below is a map for the whole space. Style entries with a hyphen are elidable, meaning they are the default and have no name.
96+
97+
| Axes | Mapping | Style name |
98+
| --- | --- | --- |
99+
| Weight (wght) | 200 | ExtraLight |
100+
| | 300 | Light |
101+
| - | 400 | Regular |
102+
| - | 500 | Medium |
103+
| - | 600 | SemiBold |
104+
| - | 700 | Bold |
105+
| - | 800 | ExtraBold |
106+
| - | 900 | Black |
107+
| Width (wdth) | 75 | Condensed |
108+
| - | 87.5 | SemiCondensed |
109+
| - | 100 | - |
110+
| - | 112.5 | SemiExpanded |
111+
| - | 125 | Expanded |
112+
| Italic (ital) | 0 | Roman |
113+
| - | 1 | Italic |
114+
| Optical Size (opsz) | 20 | - |
115+
| - | 72 | Display |
116+
117+
### Mona Sans Monospace Styles
118+
119+
![mona-mono](https://github.com/user-attachments/assets/dd55d2ac-8ba4-4126-89e3-6b125b090fc7)
120+
121+
| Family or Axes | Mapping | Styles |
122+
| --- | --- | --- |
123+
| Weight (wght) | 200 | ExtraLight |
124+
| - | 300 | Light |
125+
| - | 400 | Regular |
126+
| - | 500 | Medium |
127+
| - | 600 | SemiBold |
128+
| - | 700 | Bold |
129+
| - | 800 | ExtraBold |
130+
| - | 900 | Black |
131+
118132
## License
119133
Mona Sans is licensed under the [SIL Open Font License v1.1](https://scripts.sil.org/OFL).

0 commit comments

Comments
 (0)