14 Commits

Author SHA1 Message Date
sayyadirfanali
4b5ef8ceb5 change from Italic to Oblique to fix #26 2025-12-24 19:23:57 +05:30
sayyadirfanali
69c35f3095 add altl.py for featureless and ambiguous 'l' font generation for #27 2025-12-24 18:43:22 +05:30
Irfan Ali
e80ce0ccce add fix suggested by https://github.com/sayyadirfanali/Myna/pull/18 2025-12-14 22:40:58 +05:30
sayyadirfanali
18f515d22a add nerd font after APL symbols 2025-12-14 22:23:38 +05:30
sayyadirfanali
6deef2bcb3 add more APL symbols 2025-12-14 22:22:16 +05:30
Irfan Ali
4fbf07c1d1 Update README.md 2025-12-14 21:12:51 +05:30
Irfan Ali
295c8cc6ef add Myna emoji 2025-12-14 21:12:36 +05:30
Irfan Ali
3c90843717 Update README.md 2025-12-14 20:53:58 +05:30
sayyadirfanali
7e028def6d fix width issues again 2025-12-14 20:49:53 +05:30
sayyadirfanali
1220fc2457 correct width of all glyphs to ensure monospace attribute 2025-12-14 20:47:27 +05:30
sayyadirfanali
18fe183199 correct few bold glyphs 2025-12-14 20:39:30 +05:30
Irfan Ali
7a6c118fce Update README.md 2025-12-14 18:50:33 +05:30
Irfan Ali
930933f4c7 Update README.md 2025-12-14 18:50:02 +05:30
Irfan Ali
ac0c59cca1 Update README.md 2025-12-14 18:49:00 +05:30
17 changed files with 5427 additions and 4509 deletions

3
.gitignore vendored
View File

@@ -1,3 +0,0 @@
local.py
Myna.otf
*.zip

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -7,13 +7,13 @@
![Version](https://img.shields.io/badge/version-2.0.0b-blue.svg?style=for-the-badge)
![License](https://img.shields.io/badge/license-OFL-success.svg?style=for-the-badge)
Myna v2.0.0 Beta is released. It features more bold and (faux) italic variants and even supports APL characters. Please download it and report issues for v2.0.0 full release.
[Myna v2.0.0 Beta](https://github.com/sayyadirfanali/Myna/releases/tag/v2.0.0.0-beta) is released. It features more bold and (faux) italic variants and even supports APL characters. Please download it and report issues for v2.0.0 full release.
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 and getting tangled in the web of ligature-compatible terminal emulators?
**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.
**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.
@@ -28,6 +28,8 @@ Here are a few of its attractive features that might make it your next favourite
- **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`
Below is a comparison of Myna (colored line at bottom) with other popular monospace fonts (the actual list can be found in the script `drawcomp`). It highlights Myna's philosophy of uniform and aligned glyph design so that symbols look natural and editing remains fun.
<picture>
<source media="(prefers-color-scheme: dark)" srcset="images/comp_dark.png">
<source media="(prefers-color-scheme: light)" srcset="images/comp_light.png">
@@ -56,7 +58,7 @@ cp Myna.otf ~/Library/Fonts/
1. Download the release
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 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.

18
altl.py Normal file
View File

@@ -0,0 +1,18 @@
import fontforge
import math
import psMat
def mkFont(name, weight):
font = fontforge.open(name + ".sfd")
font.selection.select("alt_l")
font.copy()
font.selection.select("l")
font.paste()
font.generate(name + ".otf")
font.close()
mkFont("Myna-Regular", "Regular")
mkFont("Myna-Bold", "Bold")

View File

@@ -6,29 +6,44 @@ def mkFont(name, weight):
font = fontforge.open(name + ".sfd")
font.mergeFeature("features.fea")
font.generate("./fonts/" + name + ".otf")
font.generate("./fonts/" + name + ".ttf")
font.generate("./fonts/" + name + ".ttf")
font.selection.all()
angle = 12
font.transform(psMat.skew(angle * math.pi / 180))
font.fontname = name + "Italic"
font.familyname = "Myna"
font.fullname = "Myna " + weight + " Italic"
font.weight = weight
font.italicangle = -angle
if weight == "Bold":
subfamily = "Bold Italic"
# 0x01 (Italic) + 0x20 (Bold) = 0x21
font.os2_stylemap = 0x21
full_name = "Myna Bold Oblique"
else:
subfamily = "Italic"
font.os2_stylemap = 0x01
full_name = "Myna Regular Oblique"
font.italicangle = angle
font.fullname = full_name
font.fontname = full_name.replace(" ", "")
font.os2_stylemap |= 0x01
# This is the critical part for app recognition:
font.appendSFNTName("English (US)", "SubFamily", subfamily)
# Preferred Style
# font.appendSFNTName("English (US)", "Preferred Style", weight + " Oblique")
# 7th is Letterform where 9 = Oblique and 2 = Italic
panoseL = list(font.os2_panose)
panoseL[7] = 1
panoseL[7] = 9
font.os2_panose = tuple(panoseL)
font.appendSFNTName("English (US)", "SubFamily", "Italic")
font.generate("./fonts/" + name + "Italic.otf")
font.generate("./fonts/" + name + "Italic.ttf")
font.generate("./fonts/" + name + "Oblique.otf")
font.generate("./fonts/" + name + "Oblique.ttf")
font.close()
mkFont("Myna-Regular", "Regular")
mkFont("Myna-Bold", "Bold")

View File

@@ -41,7 +41,7 @@ system (join(" ",
"-size 2000x1200 xc:black",
"-gravity northwest",
join (' ', map { f($_->{pos}, $_->{sym}, "white", "cyan") } $symbols->@*),
$ARGV[0]
quotemeta($ARGV[0])
));
system (join(" ",
@@ -49,5 +49,5 @@ system (join(" ",
"-size 2000x1200 xc:white",
"-gravity northwest",
join (' ', map { f($_->{pos}, $_->{sym}, "black", "crimson") } $symbols->@*),
$ARGV[1]
quotemeta($ARGV[1])
));

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1 @@
fontforge -script ~/bin/fontpatcher/font-patcher --complete $1
fontforge -script ~/bin/fontpatcher/font-patcher --complete $1 && mv *.otf ./fonts/.