add v2.0 Beta release variants
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
local.py
|
||||||
|
Myna.otf
|
||||||
|
Myna.zip
|
||||||
32130
Myna-Bold.sfd
Normal file
65
README.md
@@ -1,17 +1,19 @@
|
|||||||
<picture>
|
<picture>
|
||||||
<source media="(prefers-color-scheme: dark)" srcset="images/hero_dark.png">
|
<source media="(prefers-color-scheme: dark)" srcset="images/banner_dark.png">
|
||||||
<source media="(prefers-color-scheme: light)" srcset="images/hero_light.png">
|
<source media="(prefers-color-scheme: light)" srcset="images/banner_light.png">
|
||||||
<img alt="Perl" src="https://example.com/hero_light.png">
|
<img alt="Myna" src="images/banner_light.png">
|
||||||
</picture>
|
</picture>
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
Do you ever feel like your font treats symbols as second-class glyphs? Are you frustrated that `->` looks nothing like an arrow, and `$`, `@`, `%` seem ever mismatched?
|
Do you ever feel like your font treats symbols as second-class glyphs? Are you frustrated that `->` looks nothing like an arrow, and `$`, `@`, `%` seem ever mismatched?
|
||||||
|
|
||||||
Want to experience the beauty of ligatures without losing the simplicity of ASCII?
|
Want to experience the beauty of ligatures without losing the simplicity of ASCII and getting tangled in the web of ligature-compatible terminal emulators?
|
||||||
|
|
||||||
**Myna** (*Gracula religiosa* 🐦⬛) is a monospace font which aims to bring harmony to your editor by treating symbols as first-class glyphs alongside alphanumeric characters.
|
**Myna** ((_Gracula religiosa_)[https://en.wikipedia.org/wiki/Common\_hill\_myna]) is a monospace font which aims to bring harmony to your editor by treating symbols as first-class glyphs alongside alphanumeric characters.
|
||||||
|
|
||||||
|
NB: Please don't mind the colorscheme in the banner above. I just picked it because it highlighted the most colors in Ray.so. Since the banner contains multiple languages, no single colorscheme could properly highlight them in one image.
|
||||||
|
|
||||||
## Why Myna?
|
## Why Myna?
|
||||||
Myna was born of a need to scratch a persistent typographical itch. While I've tried many otherwise well-crafted monospace fonts, I always found myself wanting to tweak a glyph here or adjust a shape there. After developing Myna and using it almost exclusively in my professional and personal work, I'm sharing it as a small contribution to the wonderful community of monospace typography enthusiasts.
|
Myna was born of a need to scratch a persistent typographical itch. While I've tried many otherwise well-crafted monospace fonts, I always found myself wanting to tweak a glyph here or adjust a shape there. After developing Myna and using it almost exclusively in my professional and personal work, I'm sharing it as a small contribution to the wonderful community of monospace typography enthusiasts.
|
||||||
@@ -21,54 +23,23 @@ Here are a few of its attractive features that might make it your next favourite
|
|||||||
- **Near-Perfect Alignment**: multi-character symbols like `->`, `>>=`, `=~`, `::` align seamlessly
|
- **Near-Perfect Alignment**: multi-character symbols like `->`, `>>=`, `=~`, `::` align seamlessly
|
||||||
- **Balanced Weight**: symbols have just the right visual weight against your code
|
- **Balanced Weight**: symbols have just the right visual weight against your code
|
||||||
- **Minimalist Forms**: geometric shapes for quotes and commas
|
- **Minimalist Forms**: geometric shapes for quotes and commas
|
||||||
|
- **Language-Aware Design**: clean sigils for Perl + elegant operators for Haskell + clear symbols for Rust (and even APL)
|
||||||
- **Clear Distinction**: no more confusing `1 l I |` or `0 O o`
|
- **Clear Distinction**: no more confusing `1 l I |` or `0 O o`
|
||||||
- **Language-Aware Design**: clean sigils for Perl + elegant operators for Haskell + clear symbols for C
|
|
||||||
|
|
||||||
NB: Myna is designed to be a simple font. The current release is a single weight without ligatures, though future updates may expand its features if demand arises. It does work out nicely with synthesised bold generated by fontconfig and pango on Linux.
|
|
||||||
|
|
||||||
## Showcase
|
|
||||||
<picture>
|
|
||||||
<source media="(prefers-color-scheme: dark)" srcset="images/Perl_dark.png">
|
|
||||||
<source media="(prefers-color-scheme: light)" srcset="images/Perl_light.png">
|
|
||||||
<img alt="Perl" src="https://example.com/Perl_light.png">
|
|
||||||
</picture>
|
|
||||||
|
|
||||||
<picture>
|
|
||||||
<source media="(prefers-color-scheme: dark)" srcset="images/C_dark.png">
|
|
||||||
<source media="(prefers-color-scheme: light)" srcset="images/C_light.png">
|
|
||||||
<img alt="C" src="https://example.com/C_light.png">
|
|
||||||
</picture>
|
|
||||||
|
|
||||||
Here is a comparison between some popular monospace fonts with Myna (at the bottom in different color). The list of the fonts used could be found in the script [mkcomp](scripts/mkcomp). Myna tries to emulate the smooth look of ligatures but also retains the simplicity of ASCII.
|
|
||||||
|
|
||||||
<picture>
|
<picture>
|
||||||
<source media="(prefers-color-scheme: dark)" srcset="images/comp_dark.png">
|
<source media="(prefers-color-scheme: dark)" srcset="images/comp_dark.png">
|
||||||
<source media="(prefers-color-scheme: light)" srcset="images/comp_light.png">
|
<source media="(prefers-color-scheme: light)" srcset="images/comp_light.png">
|
||||||
<img alt="Perl" src="https://example.com/comp_light.png">
|
<img alt="Myna" src="images/comp_light.png">
|
||||||
</picture>
|
</picture>
|
||||||
|
|
||||||
Please click on the images below to view it in full in a new tab.
|
|
||||||
|
|
||||||
| Language | Light | Dark |
|
|
||||||
|----------|-------|------|
|
|
||||||
| **Perl** | <img src="images/Perl_light.png" width="500"> | <img src="images/Perl_dark.png" width="500"> |
|
|
||||||
| **Haskell** | <img src="images/Haskell_light.png" width="500"> | <img src="images/Haskell_dark.png" width="500"> |
|
|
||||||
| **C** | <img src="images/C_light.png" width="500"> | <img src="images/C_dark.png" width="500"> |
|
|
||||||
| **Bash** | <img src="images/Bash_light.png" width="500"> | <img src="images/Bash_dark.png" width="500"> |
|
|
||||||
| **Clojure** | <img src="images/Clojure_light.png" width="500"> | <img src="images/Clojure_dark.png" width="500"> |
|
|
||||||
| **Erlang** | <img src="images/Erlang_light.png" width="500"> | <img src="images/Erlang_dark.png" width="500"> |
|
|
||||||
| **OCaml** | <img src="images/OCaml_light.png" width="500"> | <img src="images/OCaml_dark.png" width="500"> |
|
|
||||||
| **Rust** | <img src="images/Rust_light.png" width="500"> | <img src="images/Rust_dark.png" width="500"> |
|
|
||||||
| **LaTeX** | <img src="images/LaTeX_light.png" width="500"> | <img src="images/LaTeX_dark.png" width="500"> |
|
|
||||||
| **HTML** | <img src="images/HTML_light.png" width="500"> | <img src="images/HTML_dark.png" width="500"> |
|
|
||||||
| **SQL** | <img src="images/SQL_light.png" width="500"> | <img src="images/SQL_dark.png" width="500"> |
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
Myna features Regular, Medium, Bold weight with faux Italic variants for all of them. In order to download them, please download the released zip files or clone the repo and then copy the relevant fonts from the folder `fonts/` into the font directory in your OS.
|
||||||
|
|
||||||
### Linux
|
### Linux
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/sayyadirfanali/Myna.git
|
git clone https://github.com/sayyadirfanali/Myna.git
|
||||||
cd Myna
|
cd ./Myna/fonts
|
||||||
cp Myna.otf ~/.local/share/fonts/
|
cp *.otf ~/.local/share/fonts/ # do NOT copy all files (read note above)
|
||||||
fc-cache -v
|
fc-cache -v
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -76,13 +47,19 @@ fc-cache -v
|
|||||||
```bash
|
```bash
|
||||||
git clone https://github.com/sayyadirfanali/Myna.git
|
git clone https://github.com/sayyadirfanali/Myna.git
|
||||||
cd Myna
|
cd Myna
|
||||||
cp Myna.otf ~/Library/Fonts/
|
cp Myna.otf ~/Library/Fonts/ # do NOT copy all files (read note above)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
1. Download the release
|
1. Download the release
|
||||||
2. Right-click `Myna.otf` and select "Install for all users"
|
2. Right-click `Myna.otf` and select "Install for all users"
|
||||||
|
|
||||||
|
NB: I've added a one-liner script `mknerdfont` to attach NerdFont glyphs into any variant. I've also released the Regular variant with NerdFont. You can use to script to run on any variant/weight to get a NerdFont-compatible version. You'd need `[fontpatcher](https://github.com/ryanoasis/nerd-fonts?tab=readme-ov-file#font-patcher)` installed for `mknerdfont` to work.
|
||||||
|
|
||||||
|
NB: I've also added a script `changeheight.py` to increase/decrease vertical spacing (in response to #9). You can use it if you want more vertical compactness in your terminal.
|
||||||
|
|
||||||
|
NB: The latest release (v2.0.0) features contextual variants for a few glyph pairs (eg, `|>`, `:=`) in response to #1 and #6. You'd need a terminal which can work with font features to be able to display them.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
SIL Open Font License, Version 1.1
|
SIL Open Font License, Version 1.1
|
||||||
|
|
||||||
|
|||||||
28
README.txt
@@ -1,14 +1,26 @@
|
|||||||
# Myna
|
# Myna
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
This package contains the Myna font in several variants:
|
This package contains the Myna font in several variants: Regular, Medium, Bold (and faux Italic for all of them)
|
||||||
- Myna.otf/.ttf: standard version (both .otf and .ttf files)
|
|
||||||
- Myna-alt_l.otf/.ttf: alternate version with different shape for 'l' glyph
|
|
||||||
- Myna-NerdFonts.otf: NerdFonts support with additional icons
|
|
||||||
|
|
||||||
## Installation:
|
## Installation
|
||||||
- Install the font files through your system's font manager on Windows or MacOS, or copy them to your system fonts directory (./local/share/fonts) in Linux.
|
### Linux
|
||||||
- Choose either the standard or alternate version based on your preference for the 'l' character.
|
```bash
|
||||||
- You can also choose NerdFonts version which includes extra glyphs for development environments and terminal use.
|
git clone https://github.com/sayyadirfanali/Myna.git
|
||||||
|
cd ./Myna/fonts
|
||||||
|
cp *.otf ~/.local/share/fonts/ # do NOT copy all files (read note above)
|
||||||
|
fc-cache -v
|
||||||
|
```
|
||||||
|
|
||||||
|
### macOS
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/sayyadirfanali/Myna.git
|
||||||
|
cd Myna
|
||||||
|
cp Myna.otf ~/Library/Fonts/ # do NOT copy all files (read note above)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
1. Download the release
|
||||||
|
2. Right-click `Myna.otf` and select "Install for all users"
|
||||||
|
|
||||||
Format notes: OTF for OpenType features, TTF for broader compatibility.
|
Format notes: OTF for OpenType features, TTF for broader compatibility.
|
||||||
|
|||||||
42
build.py
@@ -1,18 +1,34 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
import fontforge
|
import fontforge
|
||||||
|
import math
|
||||||
|
import psMat
|
||||||
|
|
||||||
font = fontforge.open("Myna.sfd")
|
def mkFont(name, weight):
|
||||||
font.mergeFeature("Myna.fea")
|
font = fontforge.open(name + ".sfd")
|
||||||
|
font.mergeFeature("features.fea")
|
||||||
|
font.generate("./fonts/" + name + ".otf")
|
||||||
|
font.generate("./fonts/" + name + ".ttf")
|
||||||
|
|
||||||
font.generate("fonts/Myna.otf")
|
font.selection.all()
|
||||||
font.generate("fonts/Myna.ttf")
|
angle = 12
|
||||||
|
font.transform(psMat.skew(angle * math.pi / 180))
|
||||||
|
|
||||||
if "alt_l" in font:
|
font.fontname = name + "Italic"
|
||||||
font.selection.select("alt_l")
|
font.familyname = "Myna"
|
||||||
font.copy()
|
font.fullname = "Myna " + weight + " Italic"
|
||||||
font.selection.select("l")
|
font.weight = weight
|
||||||
font.paste()
|
|
||||||
|
|
||||||
font.generate("fonts/Myna-AltL.otf")
|
font.italicangle = angle
|
||||||
font.generate("fonts/Myna-AltL.ttf")
|
|
||||||
font.close()
|
font.os2_stylemap |= 0x01
|
||||||
|
panoseL = list(font.os2_panose)
|
||||||
|
panoseL[7] = 1
|
||||||
|
font.os2_panose = tuple(panoseL)
|
||||||
|
|
||||||
|
font.appendSFNTName("English (US)", "SubFamily", "Italic")
|
||||||
|
|
||||||
|
font.generate("./fonts/" + name + "Italic.otf")
|
||||||
|
font.generate("./fonts/" + name + "Italic.ttf")
|
||||||
|
font.close()
|
||||||
|
|
||||||
|
mkFont("Myna-Regular", "Regular")
|
||||||
|
mkFont("Myna-Bold", "Bold")
|
||||||
|
|||||||
3
build.sh
@@ -1,3 +0,0 @@
|
|||||||
python build.py \
|
|
||||||
&& fontforge -script ~/bin/fontpatcher/font-patcher --complete Myna.otf && mv MynaNerdFont-Regular.otf Myna-NerdFont.otf \
|
|
||||||
# && zip -r Myna_v$1.zip *.otf *.ttf OFL.txt README.txt
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import fontforge
|
import fontforge
|
||||||
|
|
||||||
font = fontforge.open("./Myna.sfd")
|
font = fontforge.open("Myna-Regular.sfd")
|
||||||
|
|
||||||
ascent = font.ascent
|
ascent = font.ascent
|
||||||
descent = font.descent
|
descent = font.descent
|
||||||
@@ -23,5 +23,5 @@ font.os2_typodescent = font.hhea_descent
|
|||||||
font.os2_winascent = ascent # can increase or decrease this if clipped
|
font.os2_winascent = ascent # can increase or decrease this if clipped
|
||||||
font.os2_windescent = descent
|
font.os2_windescent = descent
|
||||||
|
|
||||||
font.save("Myna.sfd")
|
font.save("Myna-Regular.sfd")
|
||||||
font.close()
|
font.close()
|
||||||
@@ -32,7 +32,7 @@ sub f {
|
|||||||
"-pointsize 64",
|
"-pointsize 64",
|
||||||
"-fill " . $c . " ",
|
"-fill " . $c . " ",
|
||||||
(map { "-font \"$_->{name}\" -annotate +$x+$_->{pos} \"$s\"" } $fonts->@*),
|
(map { "-font \"$_->{name}\" -annotate +$x+$_->{pos} \"$s\"" } $fonts->@*),
|
||||||
"-fill " . $a . " -font \"Myna\" -annotate +@{[$x + 10]}+1000 \"$s\"",
|
"-fill " . $a . " -font \"Myna-Regular\" -annotate +@{[$x + 10]}+1000 \"$s\"",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8,5 +8,7 @@ feature kern {
|
|||||||
} kern;
|
} kern;
|
||||||
|
|
||||||
feature calt {
|
feature calt {
|
||||||
|
ignore sub uni003C uni007C' uni003E;
|
||||||
|
|
||||||
sub uni007C' uni003E by alt_bar;
|
sub uni007C' uni003E by alt_bar;
|
||||||
} calt;
|
} calt;
|
||||||
BIN
fonts/Myna-Bold.otf
Normal file
BIN
fonts/Myna-Bold.ttf
Normal file
BIN
fonts/Myna-BoldItalic.otf
Normal file
BIN
fonts/Myna-BoldItalic.ttf
Normal file
BIN
fonts/Myna-Regular.otf
Normal file
BIN
fonts/Myna-Regular.ttf
Normal file
BIN
fonts/Myna-RegularItalic.otf
Normal file
BIN
fonts/Myna-RegularItalic.ttf
Normal file
BIN
fonts/Myna.otf
BIN
fonts/Myna.ttf
|
Before Width: | Height: | Size: 153 KiB |
|
Before Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 210 KiB |
|
Before Width: | Height: | Size: 207 KiB |
|
Before Width: | Height: | Size: 215 KiB |
|
Before Width: | Height: | Size: 212 KiB |
|
Before Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 214 KiB |
|
Before Width: | Height: | Size: 211 KiB |
|
Before Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 236 KiB |
|
Before Width: | Height: | Size: 225 KiB |
|
Before Width: | Height: | Size: 152 KiB |
|
Before Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 212 KiB |
|
Before Width: | Height: | Size: 209 KiB |
|
Before Width: | Height: | Size: 211 KiB |
|
Before Width: | Height: | Size: 208 KiB |
|
Before Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 128 KiB |
BIN
images/banner_dark.png
Normal file
|
After Width: | Height: | Size: 930 KiB |
BIN
images/banner_light.png
Normal file
|
After Width: | Height: | Size: 938 KiB |
|
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 131 KiB |
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 160 KiB |
41
mkhero
@@ -1,41 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
|
|
||||||
my $dark = [
|
|
||||||
{ "pos" => 100, "string" => 'MYNA' },
|
|
||||||
{ "pos" => 300, "string" => 'Lorem ipsum dolor sit amet' },
|
|
||||||
{ "pos" => 500, "string" => '0 1 2 3 4 5 6 7 8 9' },
|
|
||||||
{ "pos" => 700, "string" => '[] {} () <> | / ? ! #' },
|
|
||||||
{ "pos" => 900, "string" => '\` \' \" , . ; : ~ ^ _' },
|
|
||||||
{ "pos" => 1100, "string" => '+ - = ++ -- += -= == !=' },
|
|
||||||
{ "pos" => 1300, "string" => '\$s @a \%h &f *x =~' },
|
|
||||||
{ "pos" => 1500, "string" => ':: -> => <$> >>= ^. \%~' },
|
|
||||||
{ "pos" => 1700, "string" => '$ £ € ¥ ₹ ₽' },
|
|
||||||
{ "pos" => 1900, "string" => '0 O o | 1 l I | \` \' \" | Z 2' }
|
|
||||||
];
|
|
||||||
|
|
||||||
my $light = [
|
|
||||||
{ "pos" => 100, "string" => 'MYNA' },
|
|
||||||
{ "pos" => 300, "string" => 'Lorem ipsum dolor sit amet' },
|
|
||||||
{ "pos" => 500, "string" => '0 1 2 3 4 5 6 7 8 9' },
|
|
||||||
{ "pos" => 700, "string" => '[] {} () <> | / ? ! #' },
|
|
||||||
{ "pos" => 900, "string" => '\` \' \" , . ; : ~ ^ _' },
|
|
||||||
{ "pos" => 1100, "string" => '+ - = ++ -- += -= == !=' },
|
|
||||||
{ "pos" => 1300, "string" => '\$s @a \%h &f *x =~' },
|
|
||||||
{ "pos" => 1500, "string" => ':: -> => <$> >>= ^. \%~' },
|
|
||||||
{ "pos" => 1700, "string" => '$ £ € ¥ ₹ ₽' },
|
|
||||||
{ "pos" => 1900, "string" => '0 O o | 1 l I | \` \' \" | Z 2' }
|
|
||||||
];
|
|
||||||
|
|
||||||
system(join(' ',
|
|
||||||
"magick",
|
|
||||||
"-size 2000x2200 xc:black -gravity north -pointsize 128 -font Myna -strokewidth 2",
|
|
||||||
(map { "-fill white -stroke white -annotate +0+$_->{pos} \"$_->{string}\"" } $dark->@*),
|
|
||||||
$ARGV[0]
|
|
||||||
));
|
|
||||||
|
|
||||||
system(join(' ',
|
|
||||||
"magick",
|
|
||||||
"-size 2000x2200 xc:white -gravity north -pointsize 128 -font Myna -strokewidth 2",
|
|
||||||
(map { "-fill black -stroke black -annotate +0+$_->{pos} \"$_->{string}\"" } $light->@*),
|
|
||||||
$ARGV[1]
|
|
||||||
));
|
|
||||||
1
mknerdfont
Executable file
@@ -0,0 +1 @@
|
|||||||
|
fontforge -script ~/bin/fontpatcher/font-patcher --complete $1
|
||||||
19
sample.txt
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Myna
|
||||||
|
ABCDEFGHJIKLMNOPQRSTUVWXYZ
|
||||||
|
abcdefghjiklmnopqrstuvwxyz
|
||||||
|
1234567890(){}[]/\<>,.;:`'
|
||||||
|
|
||||||
|
# Perl
|
||||||
|
$_="krjhruaesrltre c a cnP,ohet";$_.=$1,print$2while s/(..)(.)//;print"\n"
|
||||||
|
|
||||||
|
-- Haskell
|
||||||
|
mapM_ print . take 10 . iterate (\n -> if even n then n `div` 2 else 3*n + 1)
|
||||||
|
|
||||||
|
# bash
|
||||||
|
find . -name "*.log" -mtime +30 -exec gzip {} \; | tee audit.txt | wc -l
|
||||||
|
|
||||||
|
// Rust
|
||||||
|
(0..10).map(|x| x*x).filter(|&x| x%2==0).collect::<Vec<_>>()
|
||||||
|
|
||||||
|
⍝ APL
|
||||||
|
life ← { ⊃1 ⍵ ∨.∧ 3 4 = +/ +⌿ ¯1 0 1 ∘.⊖ ¯1 0 1 ⌽¨ ⊂⍵ }
|
||||||