mirror of
https://github.com/sayyadirfanali/Myna.git
synced 2026-01-11 14:30:26 +01:00
Compare commits
14 Commits
v2.0.0.0-b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b5ef8ceb5 | ||
|
|
69c35f3095 | ||
|
|
e80ce0ccce | ||
|
|
18f515d22a | ||
|
|
6deef2bcb3 | ||
|
|
4fbf07c1d1 | ||
|
|
295c8cc6ef | ||
|
|
3c90843717 | ||
|
|
7e028def6d | ||
|
|
1220fc2457 | ||
|
|
18fe183199 | ||
|
|
7a6c118fce | ||
|
|
930933f4c7 | ||
|
|
ac0c59cca1 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
local.py
|
||||
Myna.otf
|
||||
*.zip
|
||||
5669
Myna-Bold.sfd
5669
Myna-Bold.sfd
File diff suppressed because it is too large
Load Diff
4195
Myna-Regular.sfd
4195
Myna-Regular.sfd
File diff suppressed because it is too large
Load Diff
@@ -7,13 +7,13 @@
|
||||

|
||||

|
||||
|
||||
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
18
altl.py
Normal 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")
|
||||
37
build.py
37
build.py
@@ -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")
|
||||
|
||||
4
drawcomp
4
drawcomp
@@ -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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
fontforge -script ~/bin/fontpatcher/font-patcher --complete $1
|
||||
fontforge -script ~/bin/fontpatcher/font-patcher --complete $1 && mv *.otf ./fonts/.
|
||||
|
||||
Reference in New Issue
Block a user