mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-12-19 20:12:52 +02:00
Switch from ComicMono to ComicShannsMono
[why] The Bold font is bad? The repo is not maintained? [how] The ComicShannsMono is not monospaced ... fix it. It has Overlapping contours ... fix it. Create a useful BOLD face. This was originally PR #1004 Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
parent
40cf00c58a
commit
a63cb3b329
@ -69,6 +69,10 @@
|
||||
<family>Code New Roman</family>
|
||||
<prefer><family>Symbols Nerd Font</family></prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Comic Shanns Mono,Comic Shanns Mono-Regular</family>
|
||||
<prefer><family>Symbols Nerd Font</family></prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Cousine</family>
|
||||
<prefer><family>Symbols Nerd Font</family></prefer>
|
||||
|
@ -66,6 +66,7 @@ image_font_files=( \
|
||||
'BitstreamVeraSansMono/Regular/BitstromWeraNerdFont-Regular.ttf' \
|
||||
'CascadiaCode/Regular/CaskaydiaCoveNerdFont-Regular.ttf' \
|
||||
'CodeNewRoman/Regular/CodeNewRomanNerdFont-Regular.otf' \
|
||||
'ComicShannsMono/ComicShannsMonoNerdFont-Regular.otf' \
|
||||
'Cousine/Regular/CousineNerdFont-Regular.ttf' \
|
||||
'DaddyTimeMono/DaddyTimeMonoNerdFont-Regular.ttf' \
|
||||
'DejaVuSansMono/Regular/DejaVuSansMNerdFont-Regular.ttf' \
|
||||
|
@ -101,13 +101,13 @@
|
||||
"description": "Tunable, slashed zeros, compact smaller characters"
|
||||
},
|
||||
{
|
||||
"unpatchedName": "Comic Mono",
|
||||
"unpatchedName": "Comic Shanns Mono",
|
||||
"RFN": false,
|
||||
"patchedName": "ComicMono",
|
||||
"folderName": "ComicMono",
|
||||
"imagePreviewFont": "ComicMono Nerd Font",
|
||||
"patchedName": "ComicShannsMono",
|
||||
"folderName": "ComicShannsMono",
|
||||
"imagePreviewFont": "ComicShannsMono Nerd Font",
|
||||
"linkPreviewFont": "false",
|
||||
"caskName": "comic-mono",
|
||||
"caskName": "comic-shanns-mono",
|
||||
"description": "The very typeface you’ve been trained to recognize since childhood"
|
||||
},
|
||||
{
|
||||
|
@ -122,7 +122,7 @@ See [Wiki: Icon names in shell][wiki-icon-names-in-shell]
|
||||
| [Blex Mono][p-blex] | [IBM Plex Mono][f-ibm-plex] | 2.3 | YES | ![w] ![m2] ![l] |
|
||||
| [Caskaydia Cove Nerd Font][p-cascadia] | [Cascadia Code][f-cascadia] |2111.01| YES | ![w] ![m2] ![l] |
|
||||
| [Code New Roman Nerd Font][p-code-nr] | Sam Radian | 2.0 | NO | ![w] ![m2] ![l] |
|
||||
| [Comic Mono Nerd Font][p-comic] | [Comic Mono][f-comic] | 0.1.1 | NO | ![w] ![m2] ![l] |
|
||||
| [Comic Shanns Mono Nerd Font][p-comic] | [Comic Shanns Mono][f-comic] | 1.3 | NO | ![w] ![m2] ![l] |
|
||||
| [Cousine Nerd Font][p-cousine] | [Cousine][f-cousine] | 1.211 | NO | ![w] ![m2] ![l] |
|
||||
| [DaddyTimeMono][p-daddytimemono] | [DaddyTimeMono][f-daddytimemono] | 1.2.3 | NO | ![w] ![m2] ![l] |
|
||||
| [DejaVu Sans Mono Nerd Font][p-dejavu] | [DejaVu][f-dejavu] | 2.37 | NO | ![w] ![m2] ![l] |
|
||||
@ -611,7 +611,7 @@ Font repos
|
||||
[f-arimo]:https://github.com/googlefonts/Arimo
|
||||
[f-cascadia]:https://github.com/microsoft/cascadia-code
|
||||
[f-cousine]:https://fonts.google.com/specimen/Cousine
|
||||
[f-comic]:https://github.com/dtinth/comic-mono-font
|
||||
[f-comic]:https://github.com/jesusmgg/comic-shanns-mono
|
||||
[f-daddytimemono]:https://github.com/BourgeoisBear/DaddyTimeMono
|
||||
[f-dejavu]:https://github.com/dejavu-fonts/dejavu-fonts
|
||||
[f-fant]:https://github.com/belluzj/fantasque-sans
|
||||
@ -664,7 +664,7 @@ Patched Font internal links
|
||||
[p-blex]:patched-fonts/IBMPlexMono
|
||||
[p-cascadia]:patched-fonts/CascadiaCode
|
||||
[p-code-nr]:patched-fonts/CodeNewRoman
|
||||
[p-comic]:patched-fonts/ComicMono
|
||||
[p-comic]:patched-fonts/ComicShannsMono
|
||||
[p-cousine]:patched-fonts/Cousine
|
||||
[p-daddytimemono]:patched-fonts/DaddyTimeMono
|
||||
[p-dejavu]:patched-fonts/DejaVuSansMono
|
||||
|
Binary file not shown.
@ -1,7 +0,0 @@
|
||||
# Comic Mono
|
||||
|
||||
A legible monospace font... the very typeface you’ve been trained to recognize since childhood.
|
||||
|
||||
For more information have a look at the upstream website: https://github.com/dtinth/comic-mono-font
|
||||
|
||||
Version: 0.1.1
|
Binary file not shown.
BIN
src/unpatched-fonts/ComicShannsMono/ComicShannsMono-Bold.otf
Normal file
BIN
src/unpatched-fonts/ComicShannsMono/ComicShannsMono-Bold.otf
Normal file
Binary file not shown.
BIN
src/unpatched-fonts/ComicShannsMono/ComicShannsMono-Regular.otf
Normal file
BIN
src/unpatched-fonts/ComicShannsMono/ComicShannsMono-Regular.otf
Normal file
Binary file not shown.
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
MIT License
|
||||
|
||||
Original work Copyright (c) 2018 Shannon Miwa
|
||||
Modified work Copyright (c) 2019 dtinth
|
||||
Copyright (c) 2018 Shannon Miwa
|
||||
Copyright (c) 2023 Jesus Gonzalez
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
12
src/unpatched-fonts/ComicShannsMono/README.md
Normal file
12
src/unpatched-fonts/ComicShannsMono/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
# Comic Shanns Mono
|
||||
|
||||
A legible monospace font... the very typeface you’ve been trained to recognize since childhood.
|
||||
The Comic Sans inspired monospaced font that's coming to a terminal or editor near you!
|
||||
|
||||
For more information have a look at the upstream website: https://github.com/jesusmgg/comic-shanns-mono
|
||||
|
||||
* Nerd Fonts corrects some issues of the font
|
||||
* The font is based on _Comic Shanns v1_ by Shannon Miwa (https://github.com/shannpersand/comic-shanns)
|
||||
* The **Bold** weight has been manually added by Nerd Fonts, inspired by Thai Pangsakulyanont's _Comic Mono_ (https://github.com/dtinth/comic-mono-font)
|
||||
|
||||
Version: 1.3
|
62
src/unpatched-fonts/ComicShannsMono/make_bold
Executable file
62
src/unpatched-fonts/ComicShannsMono/make_bold
Executable file
@ -0,0 +1,62 @@
|
||||
#!/usr/bin/env python
|
||||
# coding=utf8
|
||||
#
|
||||
# Usually called in this directory via
|
||||
# $ fontforge --script make_bold
|
||||
|
||||
# The resulting names in the font are ... bad, but we will rename it anyhow
|
||||
|
||||
# Inspiration from Thai Pangsakulyanont's https://github.com/dtinth/comic-mono-font,
|
||||
# but fix a lot issues and changed weight by only 25 instead of 32 to have less clogged bowls.
|
||||
|
||||
import fontforge
|
||||
|
||||
font = fontforge.open('ComicShannsMono-Regular.otf_orig')
|
||||
|
||||
# Repair some issues in source
|
||||
font.selection.all()
|
||||
font.removeOverlap() # For example THERE DOES NOT EXIST (u_2204) is broken
|
||||
font.correctDirection()
|
||||
target_width = 550
|
||||
for g in font.selection.byGlyphs:
|
||||
# For example ntilde is 600 wide
|
||||
if g.width != target_width:
|
||||
# resize and recenter
|
||||
( xmin, _, xmax, _ ) = g.boundingBox()
|
||||
bb_width = xmax - xmin
|
||||
if bb_width <= target_width:
|
||||
# Do not introduce negative lsb
|
||||
g.left_side_bearing = int((target_width - bb_width) / 2)
|
||||
g.width = target_width
|
||||
font.selection.none()
|
||||
|
||||
font.generate('ComicShannsMono-Regular.otf')
|
||||
|
||||
# Create Bold face
|
||||
|
||||
font.fontname = 'ComicMono-Bold'
|
||||
font.fullname = 'Comic Shanns Mono Bold'
|
||||
font.weight = 'Bold'
|
||||
font.os2_weight = 700
|
||||
font.os2_stylemap = 1 << 5 # Bold
|
||||
font.macstyle = 1 # Bold
|
||||
|
||||
# Do not enbolden graphics and Braille
|
||||
font.encoding = 'UnicodeFull'
|
||||
font.selection.select(('ranges',), 0x2500, 0xffff)
|
||||
font.selection.select(('more',), '.notdef')
|
||||
font.selection.invert()
|
||||
|
||||
# The boldening - albeit request to clean up self-intersections - produces
|
||||
# a lot of problematic glyphs, we try to fix most
|
||||
for g in font.selection.byGlyphs:
|
||||
g.simplify()
|
||||
g.changeWeight(25, 'LCG', 0, 0, 'squish', 1)
|
||||
g.removeOverlap()
|
||||
if g.selfIntersects():
|
||||
g.simplify(10, ('forcelines',), 0.0, 100, 0)
|
||||
if g.selfIntersects() and g.unicode != 0x05A:
|
||||
g.simplify(2, ('ignoreslopes','ignoreextrema','smoothcurves'), 0.2, 100, 100)
|
||||
|
||||
font.generate('ComicShannsMono-Bold.otf')
|
||||
font.close()
|
Loading…
Reference in New Issue
Block a user