• Stars
    star
    234
  • Rank 171,630 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created over 7 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The complete opposite of a font

Tofu

screenshot
For the curious, this is font-manager

What is this?

This is an attempt by me to make a font (collection) that is just a box with the unicode code point inside. These are usually not in a font but rather programmatically generated by programs as they encounter characters that have no associated glyph.

Why?

Because I wanted zero width characters in my code to be not zero width. I was trying out vss code (pretty nice imo) and found I should be able to use some CSS magic to make it so that certain characters are displayed by this font. (see also)

Things that need to get fixed

  • It's not very readable when small. Make better tofu template
  • The size of the generated font collection can probably be made smaller (for example by excluding unassigned characters)
  • The progress bar isn't smooth since the fontforge lib provides no way to measure its progress when loading the generated .sfd files

This is stupid

Yeah probably, but for its very specific use case it's not terribly bad.

Generating a font

Caching should take care of the intensive IO issue, if not then use a ramdisk.

I used python3 for this, it may work in python2. If it does not please feel free to make a pull request to fix it but I am not actively supporting python2.

The syntax for the program is as follows. gen_tofu.py 0000-FFFD [10000-1FFFF] [-s X]
0000 is the start of the first range
FFFD is the end of the first range
10000 is the start of the second range (optional, you can use as many ranges as you want)
1FFFF is the end of the second range (optional)
X is the number of characters that each font will contain (optional)

License

MIT, not sure if the font needs a special license. โ–ฏ

More Repositories

1

Legofy

Make images look as if they are made out of 1x1 LEGO blocks
Python
3,147
star
2

unicode_bot

telegram bot for giving unicode information
Rust
23
star
3

vail

WIP MTProto implementation in Rust
Rust
18
star
4

rust-tg-botapi

Telegram bot api wrapper in Rust
Rust
12
star
5

Powershell-Telegram-Bot

PowerShell
12
star
6

GitHub-WinClassic

Windows Classic style for GitHub
CSS
11
star
7

AutoTG

A script to automatically generate a json serialization of the telegram bot api documentation to easily generate libraries.
Python
10
star
8

joycontrolrs

Rust port of joycontrol
Rust
9
star
9

Activity-Scraper

Python
7
star
10

Youtube-Distant-Sound

Volume fades as you scroll away from the video
JavaScript
6
star
11

Lua-tg

tg-cli tcp commands sender for lua
Lua
5
star
12

JargonBot

Go
3
star
13

ProgTech-Bot

Telegram bot used for, stuff...
Python
3
star
14

aoc

my bad code for adventofcode.com
Python
2
star
15

botato

user-configurable telegram bot
Rust
2
star
16

-OLD-UnicodeInfoBot

See https://github.com/JuanPotato/unicode_bot
Go
2
star
17

dotfiles

โ€คโ€ฅโ€ฆ โธฌ : โ โž ยท โš โ– โ˜ โ™
Shell
2
star
18

Wallpaper-of-Life

Interactive i3 wallpaper displaying Conway's Game of Life
Rust
2
star
19

sed_bot

Telegram bot to do s/.../.../ replacements
Rust
1
star
20

PasteBot

Telegram bot to let you send messages such as shrugs to copypastas from inline
Rust
1
star
21

charname

Unicode character name library in rust with slight modifications
Rust
1
star
22

mednat

Rust
1
star
23

braillify

Rust
1
star
24

bitorder

Library to read and write bits in lsb or msb order.
Rust
1
star
25

pi-pico-pi

Calculating 1 million digits on the Raspberry Pi Pico
C
1
star
26

XKCD-search-bot

It works
Rust
1
star
27

my_first_async_calculator.rs

Rust
1
star
28

OP-Forum-Extensions

Chrome extensions for the Oneplus Forum
JavaScript
1
star
29

Wordle-Solver

Rust
1
star