mirror of
https://github.com/slavfox/Cozette.git
synced 2026-03-11 08:54:33 +00:00
v.1.4.0 The vim-airline update
This commit is contained in:
parent
f82910e75e
commit
7882aee0e1
10 changed files with 916 additions and 131 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -54,3 +54,8 @@ dmypy.json
|
|||
.AppleDouble
|
||||
.LSOverride
|
||||
._*
|
||||
*.otb
|
||||
*.bdf
|
||||
*.fnt
|
||||
*.ttf
|
||||
*.otf
|
||||
|
|
|
|||
145
CHANGELOG.md
145
CHANGELOG.md
|
|
@ -9,6 +9,98 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
Nothing!
|
||||
|
||||
## [1.4.0] - The `vim-airline` Update - 2020-02-15
|
||||
|
||||
### Added
|
||||
|
||||
Full support for vim-airline!
|
||||
|
||||
#### Glyphs
|
||||
|
||||
- У **U+0423 CYRILLIC CAPITAL LETTER U**
|
||||
- а **U+0430 CYRILLIC SMALL LETTER A**
|
||||
- б **U+0431 CYRILLIC SMALL LETTER BE**
|
||||
- ч **U+0447 CYRILLIC SMALL LETTER CHE**
|
||||
- ё **U+0451 CYRILLIC SMALL LETTER IO** (copy of U+00EB LATIN SMALL LETTER E
|
||||
WITH DIAERESIS)
|
||||
- ᚠ **U+16A0 RUNIC LETTER FEHU FEOH FE F**
|
||||
- ⁰ **U+2070 SUPERSCRIPT ZERO**
|
||||
- ⁴ **U+2074 SUPERSCRIPT FOUR**
|
||||
- ⁵ **U+2075 SUPERSCRIPT FIVE**
|
||||
- ⁶ **U+2076 SUPERSCRIPT SIX**
|
||||
- ⁷ **U+2077 SUPERSCRIPT SEVEN**
|
||||
- ⁸ **U+2078 SUPERSCRIPT EIGHT**
|
||||
- ⁹ **U+2079 SUPERSCRIPT NINE**
|
||||
- ₁ **U+2081 SUBSCRIPT ONE**
|
||||
- ∞ **U+221E INFINITY**
|
||||
- ∥ **U+2225 PARALLEL TO**
|
||||
- ∦ **U+2226 NOT PARALLEL TO**
|
||||
- ⊝ **U+229D CIRCLED DASH**
|
||||
- ⎇ **U+2387 ALTERNATIVE KEY SYMBOL** (the alt key symbol)
|
||||
- ⏎ **U+23CE RETURN SYMBOL**
|
||||
- ␊ **U+240A SYMBOL FOR LINE FEED**
|
||||
-  **U+2424 SYMBOL FOR NEWLINE**
|
||||
- ▶ **U+25B6 BLACK RIGHT-POINTING TRIANGLE**
|
||||
- ◀ **U+25C0 BLACK LEFT-POINTING TRIANGLE**
|
||||
- ☰ **U+2630 TRIGRAM FOR HEAVEN** (often used for hamburger menus)
|
||||
- ☱ **U+2631 TRIGRAM FOR LAKE**
|
||||
- ☲ **U+2632 TRIGRAM FOR FIRE**
|
||||
- ☳ **U+2633 TRIGRAM FOR THUNDER**
|
||||
- ☴ **U+2634 TRIGRAM FOR WIND**
|
||||
- ☵ **U+2635 TRIGRAM FOR WATER**
|
||||
- ☶ **U+2636 TRIGRAM FOR MOUNTAIN**
|
||||
- ☷ **U+2637 TRIGRAM FOR EARTH**
|
||||
- ⭠ **U+2B60 LEFTWARDS TRIANGLE-HEADED ARROW**
|
||||
- ⭡ **U+2B61 UPWARDS TRIANGLE-HEADED ARROW**
|
||||
- ⭢ **U+2B62 RIGHTWARDS TRIANGLE-HEADED ARROW**
|
||||
- ⭣ **U+2B63 DOWNWARDS TRIANGLE-HEADED ARROW**
|
||||
- ⭤ **U+2B64 LEFT RIGHT TRIANGLE-HEADED ARROW**
|
||||
- ⭥ **U+2B65 UP DOWN TRIANGLE-HEADED ARROW**
|
||||
- ⭦ **U+2B66 NORTH WEST TRIANGLE-HEADED ARROW**
|
||||
- ⭧ **U+2B67 NORTH EAST TRIANGLE-HEADED ARROW**
|
||||
- ⭨ **U+2B68 SOUTH EAST TRIANGLE-HEADED ARROW**
|
||||
- ⭩ **U+2B69 SOUTH WEST TRIANGLE-HEADED ARROW**
|
||||
- ⮀ **U+2B80 LEFTWARDS TRIANGLE-HEADED ARROW OVER RIGHTWARDS TRIANGLE-HEADED
|
||||
ARROW**
|
||||
- ⮁ **U+2B81 UPWARDS TRIANGLE-HEADED ARROW LEFTWARDS OF DOWNWARDS
|
||||
TRIANGLE-HEADED ARROW**
|
||||
- ⮂ **U+2B82 RIGHTWARDS TRIANGLE-HEADED ARROW OVER LEFTWARDS TRIANGLE-HEADED
|
||||
ARROW**
|
||||
- ⮃ **U+2B83 DOWNWARDS TRIANGLE-HEADED ARROW LEFTWARDS OF UPWARDS TRIANGLE-HEADED
|
||||
ARROW**
|
||||
- ㏑ **U+33D1 SQUARE LN**
|
||||
- Ꞩ **U+A7A8 LATIN CAPITAL LETTER S WITH OBLIQUE STROKE**
|
||||
|
||||
#### Other
|
||||
|
||||
- `build.py scan` command to scan all the files in a given directory for non
|
||||
ASCII glyphs and list those that aren't included in Cozette (yet):
|
||||
|
||||
```
|
||||
$ python build.py scan -s ~/.vim/plugged/vim-airline-themes/
|
||||
All codepoints under /home/fox/.vim/plugged/vim-airline-themes already supported by Cozette.
|
||||
```
|
||||
|
||||
- Now also generating a character map that includes the code points
|
||||
|
||||
### Changed
|
||||
|
||||
#### Glyphs
|
||||
|
||||
- Ξ **U+039E GREEK CAPITAL LETTER XI**: removed the "serifs" since some tools
|
||||
use it as an alternate hamburger menu icon
|
||||
- ╱ ╲ ╳
|
||||
**U+2571 BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT**
|
||||
**U+2572 BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT**
|
||||
**U+2573 BOX DRAWINGS LIGHT DIAGONAL CROSS**
|
||||
|
||||
Tweaked to make them more symmetrical.
|
||||
|
||||
#### Other
|
||||
|
||||
- Tweaked image generation, changed to match the github readme colors
|
||||
- Made README nicer, included a mention of the AUR package and the new charmap
|
||||
|
||||
## [1.3.0] - 2020-02-10
|
||||
|
||||
### Added
|
||||
|
|
@ -16,32 +108,32 @@ Nothing!
|
|||
#### Glyphs
|
||||
|
||||
- Nerdfonts:
|
||||
- ****nf-custom-folder_open (U+E5FE)****
|
||||
- ****nf-custom-c (U+E61D)****, C logo
|
||||
- **nf-custom-cpp (U+E61E)**, C++ logo
|
||||
- **nf-indent-line (U+E621)**, indentation guide
|
||||
- **nf-custom-vim (U+E62B)**
|
||||
- **nf-dev-visualstudio (U+E70C)**
|
||||
- **nf-dev-terminal (U+E795)** (black `>_` symbol)
|
||||
- **nf-dev-terminal_badge (U+E7A2)** (white `>_` symbol), also copied as
|
||||
- **nf-custom-folder_open (U+E5FE)**
|
||||
- **nf-custom-cpp (U+E61D)**, C++ logo
|
||||
- **nf-custom-c (U+E61E)**, C logo
|
||||
- **nf-indent-line (U+E621)**, indentation guide
|
||||
- **nf-custom-vim (U+E62B)**
|
||||
- **nf-dev-visualstudio (U+E70C)**
|
||||
- **nf-dev-terminal (U+E795)** (black `>_` symbol)
|
||||
- **nf-dev-terminal_badge (U+E7A2)** (white `>_` symbol), also copied as
|
||||
**nf-fa-terminal (U+F120)**
|
||||
- **nf-dev-ruby (U+E739)**
|
||||
- **nf-dev-ubuntu (U+E73A)**
|
||||
- **nf-dev-php (U+E73D)**
|
||||
- **nf-dev-markdown (U+E73E)**
|
||||
- **nf-dev-erlang (U+E7AF)**
|
||||
- **nf-dev-erlang (U+E7B1)**
|
||||
- **nf-fa-h_square (U+F0FD)** \[My vim uses it for C headers\]
|
||||
- **nf-dev-ruby (U+E739)**
|
||||
- **nf-dev-ubuntu (U+E73A)**
|
||||
- **nf-dev-php (U+E73D)**
|
||||
- **nf-dev-markdown (U+E73E)**
|
||||
- **nf-dev-erlang (U+E7AF)**
|
||||
- **nf-dev-erlang (U+E7B1)**
|
||||
- **nf-fa-h-square (U+F0FD)** \[My vim uses it for C headers\]
|
||||
- Copied some nf glyphs to code points that should be the same glyph (eg.
|
||||
nf-dev-heroku U+E77B and nf-seti-heroku U+E607)
|
||||
- **nf-linux-archlinux (U+F303)**
|
||||
nf-dev-heroku U+E77B and nf-seti-heroku U+E607)
|
||||
- **nf-linux-archlinux (U+F303)**
|
||||
|
||||
- Four variations on a `+`:
|
||||
|
||||
- **U+2719 OUTLINED GREEK CROSS**
|
||||
- **U+271A HEAVY GREEK CROSS**
|
||||
- **U+271B OPEN CENTRE CROSS**
|
||||
- **U+271C HEAVY OPEN CENTRE CROSS**
|
||||
- ✙ **U+2719 OUTLINED GREEK CROSS**
|
||||
- ✚ **U+271A HEAVY GREEK CROSS**
|
||||
- ✛ **U+271B OPEN CENTRE CROSS**
|
||||
- ✜ **U+271C HEAVY OPEN CENTRE CROSS**
|
||||
|
||||
These should come in handy for git prompts and the like.
|
||||
|
||||
|
|
@ -72,8 +164,8 @@ Nothing!
|
|||
|
||||
#### Glyphs
|
||||
|
||||
- **U+25CF BLACK CIRCLE** for git prompts
|
||||
- **nf-dev-linux (U+E712)** for vim statusbars on Linuces
|
||||
- ● **U+25CF BLACK CIRCLE** for git prompts
|
||||
- **nf-dev-linux (U+E712)** for vim statusbars on Linuces
|
||||
|
||||
#### Other
|
||||
|
||||
|
|
@ -85,8 +177,8 @@ Nothing!
|
|||
|
||||
#### Glyphs
|
||||
|
||||
- **nf-oct-zap (U+26A1 HIGH VOLTAGE SIGN)** for term prompts
|
||||
- **nf-dev-apple (U+E711)** for vim statusbars on Macs
|
||||
- ⚡ **nf-oct-zap (U+26A1 HIGH VOLTAGE SIGN)** for term prompts
|
||||
- **nf-dev-apple (U+E711)** for vim statusbars on Macs
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
@ -104,7 +196,8 @@ Still broken on Windows.
|
|||
- Braille
|
||||
- nf-seti
|
||||
|
||||
[unreleased]: https://github.com/slavfox/Cozette/compare/v.1.3.0...HEAD
|
||||
[unreleased]: https://github.com/slavfox/Cozette/compare/v.1.4.0...HEAD
|
||||
[1.4.0]: https://github.com/slavfox/Cozette/compare/v.1.3.0...v.1.4.0
|
||||
[1.3.0]: https://github.com/slavfox/Cozette/compare/v.1.2.0...v.1.3.0
|
||||
[1.2.0]: https://github.com/slavfox/Cozette/compare/v.1.1.0...v.1.2.0
|
||||
[1.1.0]: https://github.com/slavfox/Cozette/compare/v.1.0.0...v.1.1.0
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ FullName: Cozette
|
|||
FamilyName: Cozette
|
||||
Weight: Medium
|
||||
Copyright: (c) 2020 Slavfox
|
||||
Version: 1.003
|
||||
Version: 1.004
|
||||
ItalicAngle: 0
|
||||
UnderlinePosition: -3071
|
||||
UnderlineWidth: 2048
|
||||
|
|
@ -22,7 +22,7 @@ OS2Version: 1
|
|||
OS2_WeightWidthSlopeOnly: 0
|
||||
OS2_UseTypoMetrics: 0
|
||||
CreationTime: -2082812035
|
||||
ModificationTime: 1581363343
|
||||
ModificationTime: 1581781569
|
||||
PfmFamily: 49
|
||||
TTFWeight: 500
|
||||
TTFWidth: 5
|
||||
|
|
@ -53,23 +53,21 @@ OS2SupYOff: 409
|
|||
OS2StrikeYSize: 2048
|
||||
OS2StrikeYPos: 512
|
||||
OS2Vendor: 'UNKN'
|
||||
OS2CodePages: 00000003.00000000
|
||||
OS2UnicodeRanges: 0000ffff.0000ffff.000003ff.00000000
|
||||
MarkAttachClasses: 1
|
||||
DEI: 91125
|
||||
LangName: 1033 "" "" "" "" "" "" "" "" "" "" "" "" "" "Copyright (c) 2020 Slavfox <slavfoxman@gmail.com>+AAoACgAA-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the +ACIA-Software+ACIA), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:+AAoACgAA-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.+AAoACgAA-THE SOFTWARE IS PROVIDED +ACIA-AS IS+ACIA, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." "https://opensource.org/licenses/MIT"
|
||||
Encoding: UnicodeFull
|
||||
UnicodeInterp: none
|
||||
NameList: AGL For New Fonts
|
||||
NameList: AGL with PUA
|
||||
DisplaySize: -48
|
||||
AntiAlias: 1
|
||||
FitToEm: 0
|
||||
WinInfo: 61377 41 14
|
||||
WinInfo: 8970 39 22
|
||||
OnlyBitmaps: 1
|
||||
BeginPrivate: 0
|
||||
EndPrivate
|
||||
TeXData: 1 0 0 524288 262144 174762 0 -1048576 174762 783286 444596 497025 792723 393216 433062 380633 303038 157286 324010 404750 52429 2506097 1059062 262144
|
||||
BeginChars: 1114113 983
|
||||
BeginChars: 1114113 1035
|
||||
|
||||
StartChar: .notdef
|
||||
Encoding: 0 -1 0
|
||||
|
|
@ -1878,14 +1876,14 @@ Flags: W
|
|||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni0122
|
||||
StartChar: Gcommaaccent
|
||||
Encoding: 290 290 258
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni0123
|
||||
StartChar: gcommaaccent
|
||||
Encoding: 291 291 259
|
||||
Width: 1024
|
||||
Flags: W
|
||||
|
|
@ -2018,14 +2016,14 @@ Flags: W
|
|||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni0136
|
||||
StartChar: Kcommaaccent
|
||||
Encoding: 310 310 278
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni0137
|
||||
StartChar: kcommaaccent
|
||||
Encoding: 311 311 279
|
||||
Width: 1024
|
||||
Flags: W
|
||||
|
|
@ -2053,14 +2051,14 @@ Flags: W
|
|||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni013B
|
||||
StartChar: Lcommaaccent
|
||||
Encoding: 315 315 283
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni013C
|
||||
StartChar: lcommaaccent
|
||||
Encoding: 316 316 284
|
||||
Width: 1024
|
||||
Flags: W
|
||||
|
|
@ -2123,14 +2121,14 @@ Flags: W
|
|||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni0145
|
||||
StartChar: Ncommaaccent
|
||||
Encoding: 325 325 293
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni0146
|
||||
StartChar: ncommaaccent
|
||||
Encoding: 326 326 294
|
||||
Width: 1024
|
||||
Flags: W
|
||||
|
|
@ -2242,14 +2240,14 @@ Flags: W
|
|||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni0156
|
||||
StartChar: Rcommaaccent
|
||||
Encoding: 342 342 310
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni0157
|
||||
StartChar: rcommaaccent
|
||||
Encoding: 343 343 311
|
||||
Width: 1024
|
||||
Flags: W
|
||||
|
|
@ -2326,14 +2324,14 @@ Flags: W
|
|||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni0162
|
||||
StartChar: Tcommaaccent
|
||||
Encoding: 354 354 322
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni0163
|
||||
StartChar: tcommaaccent
|
||||
Encoding: 355 355 323
|
||||
Width: 1024
|
||||
Flags: W
|
||||
|
|
@ -2927,7 +2925,7 @@ Flags: W
|
|||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2015
|
||||
StartChar: afii00208
|
||||
Encoding: 8213 8213 408
|
||||
Width: 1024
|
||||
Flags: W
|
||||
|
|
@ -6951,8 +6949,372 @@ Width: 1024
|
|||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni23CE
|
||||
Encoding: 9166 9166 983
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: infinity
|
||||
Encoding: 8734 8734 984
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: afii10037
|
||||
Encoding: 1059 1059 985
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: afii10065
|
||||
Encoding: 1072 1072 986
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: afii10066
|
||||
Encoding: 1073 1073 987
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: afii10089
|
||||
Encoding: 1095 1095 988
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: afii10071
|
||||
Encoding: 1105 1105 989
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni16A0
|
||||
Encoding: 5792 5792 990
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2070
|
||||
Encoding: 8304 8304 991
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2074
|
||||
Encoding: 8308 8308 992
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2075
|
||||
Encoding: 8309 8309 993
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2076
|
||||
Encoding: 8310 8310 994
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2077
|
||||
Encoding: 8311 8311 995
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2078
|
||||
Encoding: 8312 8312 996
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2079
|
||||
Encoding: 8313 8313 997
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2081
|
||||
Encoding: 8321 8321 998
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2225
|
||||
Encoding: 8741 8741 999
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2226
|
||||
Encoding: 8742 8742 1000
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni229D
|
||||
Encoding: 8861 8861 1001
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2387
|
||||
Encoding: 9095 9095 1002
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni240A
|
||||
Encoding: 9226 9226 1003
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2424
|
||||
Encoding: 9252 9252 1004
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni25B6
|
||||
Encoding: 9654 9654 1005
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni25C0
|
||||
Encoding: 9664 9664 1006
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2630
|
||||
Encoding: 9776 9776 1007
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2631
|
||||
Encoding: 9777 9777 1008
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2632
|
||||
Encoding: 9778 9778 1009
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2633
|
||||
Encoding: 9779 9779 1010
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2634
|
||||
Encoding: 9780 9780 1011
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2635
|
||||
Encoding: 9781 9781 1012
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2636
|
||||
Encoding: 9782 9782 1013
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2637
|
||||
Encoding: 9783 9783 1014
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2B60
|
||||
Encoding: 11104 11104 1015
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2B61
|
||||
Encoding: 11105 11105 1016
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2B62
|
||||
Encoding: 11106 11106 1017
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2B63
|
||||
Encoding: 11107 11107 1018
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2B64
|
||||
Encoding: 11108 11108 1019
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2B65
|
||||
Encoding: 11109 11109 1020
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2B66
|
||||
Encoding: 11110 11110 1021
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2B67
|
||||
Encoding: 11111 11111 1022
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2B68
|
||||
Encoding: 11112 11112 1023
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2B69
|
||||
Encoding: 11113 11113 1024
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2B80
|
||||
Encoding: 11136 11136 1025
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2B81
|
||||
Encoding: 11137 11137 1026
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2B82
|
||||
Encoding: 11138 11138 1027
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2B83
|
||||
Encoding: 11139 11139 1028
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2B84
|
||||
Encoding: 11140 11140 1029
|
||||
Width: 2048
|
||||
VWidth: 0
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2B85
|
||||
Encoding: 11141 11141 1030
|
||||
Width: 2048
|
||||
VWidth: 0
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni2B86
|
||||
Encoding: 11142 11142 1031
|
||||
Width: 2048
|
||||
VWidth: 0
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uni33D1
|
||||
Encoding: 13265 13265 1032
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: uniA7A8
|
||||
Encoding: 42920 42920 1033
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
|
||||
StartChar: u1F512
|
||||
Encoding: 128274 128274 1034
|
||||
Width: 1024
|
||||
Flags: W
|
||||
LayerCount: 2
|
||||
EndChar
|
||||
EndChars
|
||||
BitmapFont: 13 983 10 3 1
|
||||
BitmapFont: 13 1036 10 3 1
|
||||
BDFStartProperties: 42
|
||||
FONT 1 "-slavfox-Cozette-Medium-R-Normal--13-120-75-75-M-60-ISO10646-1"
|
||||
COMMENT 0 "(c) 2020 Slavfox"
|
||||
|
|
@ -6974,7 +7336,7 @@ FONTNAME_REGISTRY 16 ""
|
|||
FONT_NAME 16 "Cozette"
|
||||
FACE_NAME 16 "Cozette"
|
||||
COPYRIGHT 16 "(c) 2020 Slavfox"
|
||||
FONT_VERSION 16 "1.003"
|
||||
FONT_VERSION 16 "1.004"
|
||||
FONT_ASCENT 18 10
|
||||
FONT_DESCENT 18 3
|
||||
UNDERLINE_POSITION 18 -19
|
||||
|
|
@ -7723,7 +8085,7 @@ Lks^9W2PN.
|
|||
BDFChar: 361 925 6 1 5 0 7
|
||||
LrdZ9W0is.
|
||||
BDFChar: 362 926 6 1 5 0 7
|
||||
pkSoh!!%iM
|
||||
p](;5!!!#o
|
||||
BDFChar: 363 927 6 1 5 0 7
|
||||
E/9=+Lkpk+
|
||||
BDFChar: 364 928 6 1 5 0 7
|
||||
|
|
@ -8203,11 +8565,11 @@ BDFChar: 600 9583 6 0 3 3 9
|
|||
BDFChar: 601 9584 6 3 6 3 9
|
||||
J:N0#J:MS=
|
||||
BDFChar: 602 9585 6 0 6 -3 9
|
||||
!WiK-#RCtQ+<Wq"J,fQL
|
||||
!WiK-#RCta+@&2BJ,fQL
|
||||
BDFChar: 603 9586 6 0 6 -3 9
|
||||
J:KmM+<V4,#RCP7!WW3#
|
||||
J:KmM+<V4$#Qt83!WW3#
|
||||
BDFChar: 604 9587 6 0 6 -3 9
|
||||
Jq?BY-n#W<-n%K8JcGcN
|
||||
Jq?BY-n#WT-q$ITJcGcN
|
||||
BDFChar: 605 9588 6 0 3 3 3
|
||||
n,NFg
|
||||
BDFChar: 606 9589 6 3 3 3 9
|
||||
|
|
@ -8964,5 +9326,109 @@ BDFChar: 981 59194 6 0 6 0 6
|
|||
FQU.u]&n)7
|
||||
BDFChar: 982 62211 6 0 6 0 6
|
||||
&.gf\Hu/3N
|
||||
BDFChar: 983 9166 6 1 5 1 6
|
||||
#RC],pcnfZ
|
||||
BDFChar: 984 8734 6 0 6 1 4
|
||||
Cm'rt
|
||||
BDFChar: 985 1059 6 1 5 0 7
|
||||
Lkpj`:`pmr
|
||||
BDFChar: 986 1072 6 1 5 0 5
|
||||
E!U]EQtQI"
|
||||
BDFChar: 987 1073 6 1 5 0 8
|
||||
#]P<uaG>Y.Du]k<
|
||||
BDFChar: 988 1095 6 1 5 0 5
|
||||
Lkpk3#RCD1
|
||||
BDFChar: 989 1105 6 1 5 0 8
|
||||
:]LK7M"lLVDu]k<
|
||||
BDFChar: 990 5792 6 1 4 0 7
|
||||
OJ'sn^jprc
|
||||
BDFChar: 991 8304 6 1 4 4 8
|
||||
@$$J3?iU0,
|
||||
BDFChar: 992 8308 6 1 4 4 8
|
||||
+CLl3+92BA
|
||||
BDFChar: 993 8309 6 1 4 4 8
|
||||
n:9F.huE`W
|
||||
BDFChar: 994 8310 6 1 4 4 8
|
||||
E.Hl.?iU0,
|
||||
BDFChar: 995 8311 6 1 4 4 8
|
||||
n;nbX5QCca
|
||||
BDFChar: 996 8312 6 1 4 4 8
|
||||
@$"cX?iU0,
|
||||
BDFChar: 997 8313 6 1 4 4 8
|
||||
@$#==?iU0,
|
||||
BDFChar: 998 8321 6 1 3 -2 2
|
||||
5eoWMhuE`W
|
||||
BDFChar: 999 8741 6 2 4 -1 8
|
||||
TV.sNTV.sNTV)8b
|
||||
BDFChar: 1000 8742 6 1 5 -1 8
|
||||
:f'tjE6qEX:f%,l
|
||||
BDFChar: 1001 8861 6 1 5 1 5
|
||||
E/=:FDu]k<
|
||||
BDFChar: 1002 9095 6 0 6 0 5
|
||||
":c+W+RT40
|
||||
BDFChar: 1003 9226 6 1 5 -2 7
|
||||
J:N1>!-gbR5X5;L
|
||||
BDFChar: 1004 9252 6 1 5 -2 7
|
||||
OO14n!'ie75^38/
|
||||
BDFChar: 1005 9654 6 1 5 -1 7
|
||||
JAC+4q!d4WJ,fQL
|
||||
BDFChar: 1006 9664 6 1 5 -1 7
|
||||
#T,OGpinb8#QOi)
|
||||
BDFChar: 1007 9776 6 0 6 0 6
|
||||
rVurt!!)uu
|
||||
BDFChar: 1008 9777 6 0 6 0 6
|
||||
mJm7d!!)uu
|
||||
BDFChar: 1009 9778 6 0 6 0 6
|
||||
rVurd!!)uu
|
||||
BDFChar: 1010 9779 6 0 6 0 6
|
||||
mJm7T!!)uu
|
||||
BDFChar: 1011 9780 6 0 6 0 6
|
||||
rVurt!!)Ee
|
||||
BDFChar: 1012 9781 6 0 6 0 6
|
||||
mJm7d!!)Ee
|
||||
BDFChar: 1013 9782 6 0 6 0 6
|
||||
rVurd!!)Ee
|
||||
BDFChar: 1014 9783 6 0 6 0 6
|
||||
mJm7T!!)Ee
|
||||
BDFChar: 1015 11104 6 1 6 2 4
|
||||
5l<kI
|
||||
BDFChar: 1016 11105 6 2 4 1 6
|
||||
5i=mm5X5;L
|
||||
BDFChar: 1017 11106 6 1 6 2 4
|
||||
#lFr.
|
||||
BDFChar: 1018 11107 6 2 4 1 6
|
||||
5X7S"i'78B
|
||||
BDFChar: 1019 11108 6 1 6 2 4
|
||||
8Gl!Y
|
||||
BDFChar: 1020 11109 6 2 4 1 6
|
||||
5i=mmi'78B
|
||||
BDFChar: 1021 11110 6 1 6 1 6
|
||||
i4tus#Qt,-
|
||||
BDFChar: 1022 11111 6 1 6 1 6
|
||||
*"3N(5_&h7
|
||||
BDFChar: 1023 11112 6 1 6 1 6
|
||||
J3Y4k$lf6I
|
||||
BDFChar: 1024 11113 6 1 6 1 6
|
||||
":,R3^u,1m
|
||||
BDFChar: 1025 11136 6 1 6 1 6
|
||||
5l<kQr!39&
|
||||
BDFChar: 1026 11137 6 1 6 1 6
|
||||
8E`T8>Y"hp
|
||||
BDFChar: 1027 11138 6 1 6 1 6
|
||||
#lFrnr'15^
|
||||
BDFChar: 1028 11139 6 1 6 1 6
|
||||
86e\VkXY[R
|
||||
BDFChar: 1029 11140 0 0 0 0 0
|
||||
z
|
||||
BDFChar: 1030 11141 0 0 0 0 0
|
||||
z
|
||||
BDFChar: 1031 11142 0 0 0 0 0
|
||||
z
|
||||
BDFChar: 1032 13265 6 0 5 0 7
|
||||
^d(.e<)cih
|
||||
BDFChar: 1033 42920 6 1 5 0 7
|
||||
G^u0#a9W(@
|
||||
BDFChar: 1034 128274 6 1 5 -1 6
|
||||
E)9C+f\#uo
|
||||
EndBitmapFont
|
||||
EndSplineFont
|
||||
|
|
|
|||
129
README.md
129
README.md
|
|
@ -1,19 +1,49 @@
|
|||
# Cozette
|
||||
|
||||

|
||||
[](https://github.com/slavfox/Cozette/releases/latest)
|
||||
[](https://aur.archlinux.org/packages/cozette-otb/)
|
||||

|
||||

|
||||
[](https://github.com/slavfox/Cozette/blob/master/LICENSE)
|
||||
|
||||

|
||||
|
||||
A bitmap programming font optimized for coziness.
|
||||
|
||||

|
||||
# Contents
|
||||
|
||||
Cozette is based on [Dina][], which itself is based on [Proggy][].
|
||||
It's also heavily inspired by [Creep][]. I absolutely adore Creep, and was
|
||||
- [About Cozette](#about-cozette)
|
||||
- [Installation](#installation)
|
||||
- [Linux](#linux)
|
||||
- [Mac](#mac)
|
||||
- [Windows](#windows)
|
||||
- [Roadmap](#roadmap)
|
||||
- [Character map](#character-map)
|
||||
- [License](#license)
|
||||
|
||||
# About Cozette
|
||||
|
||||
Cozette is based on [Dina], which itself is based on [Proggy].
|
||||
It's also heavily inspired by [Creep]. I absolutely adore Creep, and was
|
||||
using it up until I got a higher-DPI screen for which it was slightly too
|
||||
small - which prompted me to make Cozette.
|
||||
small. That prompted me to make the bitmap font I always wished existed:
|
||||
Cozette; a small-but-not-tiny bitmap font with great coverage of all the
|
||||
glyphs *you* might encounter in the terminal:
|
||||
|
||||

|
||||
|
||||
I'm intentionally putting the emphasis on "you" - although Cozette already
|
||||
has all the glyphs I've seen in my CLI tools so far, *you* might find it's
|
||||
missing a glyph you wish it had. If that's the case, *please [file an issue]*!
|
||||
It's an important goal for Cozette to be a useful bitmap alternative to
|
||||
[Nerd Fonts].
|
||||
|
||||
A nicer character map that includes the codepoints can be found at
|
||||
[the bottom of this README]!
|
||||
|
||||
# Installation
|
||||
|
||||
[You can get Cozette over at the Releases tab](https://github.com/slavfox/Cozette/releases)!
|
||||
### [You can get Cozette over at the Releases tab]!
|
||||
|
||||
Cozette is distributed in two main variants: bitmap and vector.
|
||||
|
||||
|
|
@ -27,35 +57,43 @@ will want to use CozetteVector there. In applications that do support bitmap
|
|||
fonts, you will want to use the normal, bitmap Cozette (unless it's too
|
||||
small for you, in which case, CozetteVector scales better).
|
||||
|
||||
If you're on Linux, the preferred format is `.otb` (for bitmaps) or `.ttf`
|
||||
### Linux
|
||||
The preferred format is `.otb` (for bitmaps) or `.ttf`
|
||||
(for CozetteVector). To install the font, just throw it in your fonts directory
|
||||
(you probably want to follow your distro's instructions). On Ubuntu, if you
|
||||
don't want to reconsider your distro choice, you might need to
|
||||
[specifically enable bitmap fonts](https://bugs.launchpad.net/ubuntu/+source/fontconfig/+bug/1560114).
|
||||
[specifically enable bitmap fonts].
|
||||
|
||||
If you're on Mac, download the `.dfont` and install it with `Font Book.app`.
|
||||
Both the bitmap `Cozette.dfont` and the vector `CozetteVector.dfont` should
|
||||
work.
|
||||
**If you're on Arch**, [ifreund] made [an AUR package] for the .otb! Install it
|
||||
using your AUR helper of choice:
|
||||
```
|
||||
$ yay -S cozette-otb
|
||||
```
|
||||
Or, if you're not using an AUR helper:
|
||||
```
|
||||
$ git clone https://aur.archlinux.org/cozette-otb.git
|
||||
$ cd cozette-otb
|
||||
$ makepkg -si
|
||||
```
|
||||
|
||||
If you're on Windows, just grab `CozetteVector.ttf`. If you want to get the
|
||||
bitmap versions to work,
|
||||
[follow the instructions from here](https://wiki.archlinux.org/index.php/installation_guide).
|
||||
### Mac
|
||||
Download the `.dfont` and install it with `Font Book .app`. Both the bitmap
|
||||
`Cozette.dfont` and the vector `CozetteVector.dfont` should work.
|
||||
|
||||
# Unicode support
|
||||
### Windows
|
||||
Grab `CozetteVector.ttf`. If you want to get the bitmap versions to work,
|
||||
[follow the instructions from here].
|
||||
|
||||
As of the current version, these are the characters included in Cozette:
|
||||
### BSD / Solaris / Haku /Other
|
||||
|
||||

|
||||
|
||||
Supporting as many characters as possible is, however, an important objective
|
||||
for this font, as I'd, ideally, like it to be able to display anything I
|
||||
might need it to. If you want any additional characters added, just submit
|
||||
an issue and I'll do my best.
|
||||
You know what you're doing.
|
||||
|
||||
# Roadmap
|
||||
|
||||
The eventual goal is feature (and character range)-parity with Creep. Here's
|
||||
where Cozette is so far, in the order the features are going to be implemented:
|
||||
Check the [CHANGELOG] for the latest news!
|
||||
|
||||
Here's where Cozette is so far, in the rough order the features are going to be
|
||||
implemented:
|
||||
|
||||
- [x] ASCII
|
||||
- [x] Powerline
|
||||
|
|
@ -69,15 +107,54 @@ where Cozette is so far, in the order the features are going to be implemented:
|
|||
date)
|
||||
- [x] "True" TTF version
|
||||
- [x] Windows support
|
||||
- [x] Full [vim-airline] support
|
||||
- [x] Charmap including the code points (to make it easier for users to
|
||||
report issues/request additions)
|
||||
- [ ] Bold version
|
||||
- [ ] Italic version
|
||||
- [ ] Ligatures
|
||||
|
||||
# Character map
|
||||
|
||||

|
||||
|
||||
# Building
|
||||
|
||||
If you want to build Cozette yourself, you'll need [FontForge]. Once you
|
||||
have that, just clone this repo, open `Cozette/Cozette.sfd` in FontForge,
|
||||
and go to *File → Generate Fonts...*.
|
||||
|
||||
To run the build scripts I use to prepare releases, first install Python 3.8
|
||||
and [pipenv]. Then, install the dependencies and run `build.py fonts`:
|
||||
|
||||
```console
|
||||
$ pipenv install
|
||||
$ pipenv run python3.8 build.py fonts
|
||||
```
|
||||
|
||||
# License
|
||||
|
||||
Cozette is licensed [MIT][] 💜
|
||||
Cozette is licensed [MIT] 💜
|
||||
|
||||
|
||||
[Dina]: https://www.dcmembers.com/jibsen/download/61/
|
||||
[Proggy]: https://github.com/bluescan/proggyfonts
|
||||
[MIT]: ./LICENSE
|
||||
[Creep]: https://github.com/romeovs/creep
|
||||
[great coverage of all the glyphs I might encounter in the terminal]:
|
||||
#character-map
|
||||
[file an issue]: https://github.com/slavfox/Cozette/issues/new
|
||||
[Nerd Fonts]: https://www.nerdfonts.com/
|
||||
[the bottom of this README]: #character-map
|
||||
[You can get Cozette over at the Releases tab]:
|
||||
https://github.com/slavfox/Cozette/releases
|
||||
[ifreund]: https://github.com/ifreund
|
||||
[an AUR package]: https://aur.archlinux.org/packages/cozette-otb/
|
||||
[specifically enable bitmap fonts]:
|
||||
https://bugs.launchpad.net/ubuntu/+source/fontconfig/+bug/1560114
|
||||
[follow the instructions from here]:
|
||||
https://wiki.archlinux.org/index.php/installation_guide
|
||||
[CHANGELOG]: ./CHANGELOG.md
|
||||
[vim-airline]: https://github.com/vim-airline/vim-airline/
|
||||
[fontforge]: https://fontforge.org/en-US/
|
||||
[pipenv]: https://github.com/pypa/pipenv
|
||||
[MIT]: ./LICENSE
|
||||
|
|
|
|||
96
build.py
96
build.py
|
|
@ -5,14 +5,23 @@ import argparse
|
|||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from shlex import quote
|
||||
from shutil import copy
|
||||
from shutil import copy, rmtree
|
||||
from typing import Optional, Sequence, cast
|
||||
|
||||
import crayons # type: ignore
|
||||
|
||||
from cozette_builder.imagegen import read_sample, save_charlist, \
|
||||
save_sample, add_margins
|
||||
from cozette_builder.imagegen import (
|
||||
read_sample,
|
||||
save_charlist,
|
||||
save_sample,
|
||||
add_margins,
|
||||
)
|
||||
from cozette_builder.ttfbuilder import TTFBuilder
|
||||
from cozette_builder.scanner import (
|
||||
scan_for_codepoints,
|
||||
print_codepoints_for_changelog,
|
||||
find_missing_codepoints,
|
||||
)
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parent
|
||||
BUILD_DIR = REPO_ROOT / "build"
|
||||
|
|
@ -42,7 +51,7 @@ def save_images(bdfpath):
|
|||
subprocess.run(["xset", "fp", "rehash"])
|
||||
|
||||
print(crayons.yellow("Saving character map"))
|
||||
save_charlist(FONTNAME, bdfpath, REPO_ROOT / "img" / "characters.png")
|
||||
save_charlist(FONTNAME, bdfpath, REPO_ROOT / "img")
|
||||
|
||||
print(crayons.yellow("Saving sample image"))
|
||||
save_sample(
|
||||
|
|
@ -52,7 +61,7 @@ def save_images(bdfpath):
|
|||
)
|
||||
subprocess.run(["xset", "-fp", tmpdirname])
|
||||
subprocess.run(["xset", "fp", "rehash"])
|
||||
add_margins(REPO_ROOT / "img" / "sample.png", )
|
||||
add_margins(REPO_ROOT / "img" / "sample.png")
|
||||
|
||||
|
||||
def fontforge(open: Path, generate: Sequence[Generate]):
|
||||
|
|
@ -75,20 +84,11 @@ def rename_single(dir: Path, pattern: str, newname: str) -> Path:
|
|||
return cast(Path, next(dir.glob(pattern)).rename(dir / newname))
|
||||
|
||||
|
||||
def mkbdf() -> Path:
|
||||
print()
|
||||
def gen_bitmap_formats() -> Path:
|
||||
fontforge(
|
||||
open=REPO_ROOT / "Cozette" / "Cozette.sfd",
|
||||
generate=[Generate("cozette.", bitmap_fmt="bdf")],
|
||||
)
|
||||
bdfpath = rename_single(BUILD_DIR, "*.bdf", "cozette.bdf")
|
||||
return bdfpath
|
||||
|
||||
|
||||
def gen_bitmap_formats(bdfpath: Path):
|
||||
fontforge(
|
||||
open=bdfpath,
|
||||
generate=[
|
||||
Generate("cozette.", bitmap_fmt="bdf"),
|
||||
Generate("cozette.", "otb"),
|
||||
Generate("cozette.", "fnt"),
|
||||
Generate("cozette_bitmap.ttf", "otb"),
|
||||
|
|
@ -96,6 +96,8 @@ def gen_bitmap_formats(bdfpath: Path):
|
|||
],
|
||||
)
|
||||
rename_single(BUILD_DIR, "*.fnt", "cozette.fnt")
|
||||
bdfpath = rename_single(BUILD_DIR, "*.bdf", "cozette.bdf")
|
||||
return bdfpath
|
||||
|
||||
|
||||
def fix_ttf(ttfpath: Path):
|
||||
|
|
@ -127,25 +129,49 @@ def fix_ttf(ttfpath: Path):
|
|||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("action", choices=["images", "fonts"])
|
||||
subparsers = parser.add_subparsers(dest="action")
|
||||
images = subparsers.add_parser("images")
|
||||
fonts = subparsers.add_parser("fonts")
|
||||
scan = subparsers.add_parser("scan")
|
||||
# noinspection PyTypeChecker
|
||||
scan.add_argument("path", type=Path) # type: ignore
|
||||
scan.add_argument("-s", "--print-source-files", action="store_true")
|
||||
args = parser.parse_args()
|
||||
BUILD_DIR.mkdir(exist_ok=True)
|
||||
os.chdir(BUILD_DIR)
|
||||
print(crayons.blue("Building .bdf..."))
|
||||
bdfpath = mkbdf()
|
||||
print(crayons.green("Done!", bold=True))
|
||||
print(crayons.blue("Building bitmap formats..."))
|
||||
gen_bitmap_formats(bdfpath)
|
||||
print(crayons.green("Done!", bold=True))
|
||||
if args.action == "images":
|
||||
print(crayons.blue("Saving sample images..."))
|
||||
save_images(bdfpath)
|
||||
if args.action == "scan":
|
||||
missing_codepoints = find_missing_codepoints(
|
||||
REPO_ROOT / "Cozette" / "Cozette.sfd",
|
||||
scan_for_codepoints(args.path),
|
||||
)
|
||||
if missing_codepoints:
|
||||
print_codepoints_for_changelog(
|
||||
missing_codepoints, print_source_files=args.print_source_files
|
||||
)
|
||||
else:
|
||||
print(
|
||||
crayons.green(
|
||||
f"All codepoints under {args.path} already "
|
||||
f"supported by Cozette."
|
||||
)
|
||||
)
|
||||
elif args.action in ("images", "fonts"):
|
||||
rmtree(BUILD_DIR, ignore_errors=True)
|
||||
BUILD_DIR.mkdir(exist_ok=True)
|
||||
os.chdir(BUILD_DIR)
|
||||
print(crayons.blue("Building bitmap formats..."))
|
||||
bdfpath = gen_bitmap_formats()
|
||||
print(crayons.green("Done!", bold=True))
|
||||
print(crayons.green("Done!", bold=True))
|
||||
if args.action == "images":
|
||||
print(crayons.blue("Saving sample images..."))
|
||||
save_images(bdfpath)
|
||||
print(crayons.green("Done!", bold=True))
|
||||
else:
|
||||
print(crayons.blue("Generating TTF..."))
|
||||
ttfbuilder = TTFBuilder.from_bdf_path(bdfpath)
|
||||
ttfbuilder.build("cozette-tmp.ttf")
|
||||
print(crayons.green("Done!", bold=True))
|
||||
print(crayons.blue("Fixing TTF..."))
|
||||
fix_ttf(Path("cozette-tmp.ttf"))
|
||||
print(crayons.green("Done!", bold=True))
|
||||
else:
|
||||
print(crayons.blue("Generating TTF..."))
|
||||
ttfbuilder = TTFBuilder.from_bdf_path(bdfpath)
|
||||
ttfbuilder.build("cozette-tmp.ttf")
|
||||
print(crayons.green("Done!", bold=True))
|
||||
print(crayons.blue("Fixing TTF..."))
|
||||
fix_ttf(Path("cozette-tmp.ttf"))
|
||||
print(crayons.green("Done!", bold=True))
|
||||
parser.print_usage()
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ import subprocess
|
|||
import tempfile
|
||||
from pathlib import Path
|
||||
from shlex import quote
|
||||
from typing import Dict, NamedTuple, Optional, Tuple
|
||||
from typing import Dict, NamedTuple, Optional, Tuple, List
|
||||
from unicodedata import east_asian_width as charwidth
|
||||
from PIL import Image, ImageOps
|
||||
from PIL import Image, ImageOps # type: ignore
|
||||
|
||||
from cozette_builder.bdffont import BdfFont
|
||||
|
||||
|
|
@ -138,32 +138,99 @@ def color_text(text: str, palette: Palette) -> str:
|
|||
return colored_text
|
||||
|
||||
|
||||
def save_charlist(fnt: str, bdf_font: Path, output_path: Path):
|
||||
def make_charmap(bdf_font: Path) -> List[str]:
|
||||
with bdf_font.open() as f:
|
||||
bdf = BdfFont.from_bdf(f)
|
||||
text = [
|
||||
" 0 1 2 3 4 5 6 7 8 9 A B C D E F",
|
||||
" ┌───────────────────────────────",
|
||||
]
|
||||
codepoints = sorted(bdf.codepoints)
|
||||
for i in range(0, codepoints[-1] + 16, 16):
|
||||
line = ""
|
||||
for j in range(16):
|
||||
if (cp := i + j) > 32 and cp not in (127,) and cp in codepoints:
|
||||
ch = chr(i + j)
|
||||
else:
|
||||
ch = " "
|
||||
line += ch
|
||||
if not charwidth(ch) == "W":
|
||||
line += " "
|
||||
if line := line.rstrip():
|
||||
text.append(f"U+{i//16:03X}_│{line}")
|
||||
return text
|
||||
|
||||
|
||||
def make_charlist_text(bdf_font: Path) -> str:
|
||||
with bdf_font.open() as f:
|
||||
bdf = BdfFont.from_bdf(f)
|
||||
text = ""
|
||||
for c in bdf.codepoints:
|
||||
if c > 32 and c not in (127,):
|
||||
ch = chr(c)
|
||||
text += ch if charwidth(ch) == "W" else f"{ch} "
|
||||
return text
|
||||
|
||||
|
||||
def stitch_charmap(files: List[Path], target: Path):
|
||||
images = [
|
||||
im.crop((0, 2, im.width, im.height - 2))
|
||||
for path in files
|
||||
if (im := Image.open(path).convert("RGB"))
|
||||
]
|
||||
tot_height = sum(im.height for im in images)
|
||||
width = max(im.width for im in images)
|
||||
new_im = Image.new("RGB", (width, tot_height))
|
||||
y = 0
|
||||
for im in images:
|
||||
new_im.paste(im, (0, y))
|
||||
y += im.height
|
||||
for p in files:
|
||||
p.unlink()
|
||||
new_im.save(target)
|
||||
|
||||
|
||||
def save_charlist(fnt: str, bdf_font: Path, output_dir: Path):
|
||||
sample = wrap_text(make_charlist_text(bdf_font))
|
||||
save_sample(
|
||||
fnt,
|
||||
wrap_text(
|
||||
" ".join(
|
||||
chr(c) for c in bdf.codepoints if c > 32 and c not in (127,)
|
||||
)
|
||||
.replace("⚡ ", "⚡")
|
||||
.replace("\u03a2 ", "")
|
||||
),
|
||||
output_path,
|
||||
sample,
|
||||
output_dir / "characters.png",
|
||||
fgcolor="#24292e",
|
||||
bgcolor="#ffffff",
|
||||
)
|
||||
expand(output_dir / "characters.png", color="#ffffff")
|
||||
print(sample.text)
|
||||
|
||||
charmap = make_charmap(bdf_font)
|
||||
files = []
|
||||
for chunk in range(0, len(charmap), 50):
|
||||
path = output_dir / f"charmap{chunk//50}_tmp.png"
|
||||
text = "\n".join(charmap[chunk : chunk + 50])
|
||||
save_sample(
|
||||
fnt,
|
||||
Sample(text, 39, len(charmap[chunk : chunk + 50])),
|
||||
path,
|
||||
fgcolor="#24292e",
|
||||
bgcolor="#ffffff",
|
||||
)
|
||||
files.append(path)
|
||||
stitch_charmap(files, output_dir / "charmap.png")
|
||||
expand(output_dir / "charmap.png", color="#ffffff")
|
||||
|
||||
|
||||
def expand(sample_path: Path, margin: int = 40, color: str = "#282c34"):
|
||||
im: Image.Image = Image.open(sample_path).convert("RGB")
|
||||
im.load()
|
||||
new_im = ImageOps.expand(im, (margin, margin), fill=color)
|
||||
new_im.save(sample_path)
|
||||
|
||||
|
||||
def add_margins(sample_path: Path, color: str = "#282c34"):
|
||||
im: Image.Image = Image.open(sample_path).convert("RGB")
|
||||
new_w = round((im.height / 3) * 4)
|
||||
new_w = round((im.height / 10) * 16)
|
||||
im.load()
|
||||
new_im = ImageOps.pad(
|
||||
im,
|
||||
(new_w, im.height),
|
||||
method=Image.NEAREST,
|
||||
color=color
|
||||
im, (new_w, im.height), method=Image.NEAREST, color=color
|
||||
)
|
||||
new_im.save(sample_path)
|
||||
|
||||
|
||||
|
|
|
|||
51
cozette_builder/scanner.py
Normal file
51
cozette_builder/scanner.py
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
from typing import Set, Dict, Iterable, List
|
||||
from pathlib import Path
|
||||
from unicodedata import name as uniname
|
||||
|
||||
|
||||
def scan_file_for_nonascii(path: Path) -> Set[int]:
|
||||
with path.open() as f:
|
||||
try:
|
||||
src = f.read()
|
||||
except UnicodeDecodeError:
|
||||
return set()
|
||||
else:
|
||||
return {codepoint for c in set(src) if (codepoint := ord(c)) > 127}
|
||||
|
||||
|
||||
# noinspection PyShadowingBuiltins
|
||||
def scan_for_codepoints(dir: Path) -> Dict[int, List[Path]]:
|
||||
non_ascii_codepoints: Dict[int, List[Path]] = {}
|
||||
for path in dir.glob("**/*"):
|
||||
if path.is_file():
|
||||
for cp in scan_file_for_nonascii(path):
|
||||
non_ascii_codepoints.setdefault(cp, []).append(path)
|
||||
return non_ascii_codepoints
|
||||
|
||||
|
||||
def print_codepoints_for_changelog(
|
||||
codepoints: Dict[int, List[Path]], print_source_files=False
|
||||
) -> None:
|
||||
for cp in sorted(codepoints):
|
||||
ch = chr(cp)
|
||||
try:
|
||||
name = uniname(ch)
|
||||
except ValueError:
|
||||
name = ""
|
||||
print(f"**{ch} U+{cp:04X} {name}**", end="")
|
||||
if print_source_files:
|
||||
print(f": {' '.join(str(p) for p in codepoints[cp])}")
|
||||
else:
|
||||
print("\n", end="")
|
||||
|
||||
|
||||
def find_missing_codepoints(
|
||||
sfdpath: Path, codepoints: Dict[int, List[Path]]
|
||||
) -> Dict[int, List[Path]]:
|
||||
with sfdpath.open() as sfd:
|
||||
defined = set(
|
||||
int(line.split()[2])
|
||||
for line in sfd.readlines()
|
||||
if line.startswith("BDFChar: ")
|
||||
)
|
||||
return {cp: paths for cp, paths in codepoints.items() if cp not in defined}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 12 KiB |
BIN
img/charmap.png
Normal file
BIN
img/charmap.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
BIN
img/sample.png
BIN
img/sample.png
Binary file not shown.
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 6.1 KiB |
Loading…
Reference in a new issue