• Stars
    star
    886
  • Rank 51,520 (Top 2 %)
  • Language
    Ruby
  • License
    Other
  • Created almost 13 years ago
  • Updated over 1 year ago

Reviews

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

Repository Details

💌 Bitmapped programming font, based on Tamsyn

Tamzen font

This is my personal fork of the wonderful Tamsyn font by Scott Fial. It's programmatically forked from Tamsyn version 1.11 by the Rakefile script (see Building below) which backports glyphs from older versions while deleting deliberately empty glyphs (which serve as unimplemented markers) to allow secondary fallback fonts to provide real glyphs at those code points.

The "TamzenForPowerline" fonts contain additional Powerline symbols that I initially generated using ZyX_I's bitmap-font-patcher and then later hand-tuned to perfection using the gbdfed(1) graphical bitmap font editor:

  • For all icons, I expanded them to occupy the maximum available space.
  • For the fork icon ( U+E0A0), I made the branch larger than the trunk.
  • For the newline icon ( U+E0A1), I made the "N" at the bottom larger.
  • For the padlock icon ( U+E0A2), I replaced the keyhole with // lines.

Overview

Screenshots

$ cat screenshot.txt
ABCDEFGHIJKLMNOPQRSTUVWXYZ 12345
abcdefghijklmnopqrstuvwxyz 67890
{}[]()<>$*-+=/#_%^@\&|~?'"`!,.;:
Illegal1i = oO0          
The quick brown fox, (..) Hello,
jumps over lazy dog. /__\ World!

Tamzen10x20r.bdf Tamzen10x20b.bdf

TamzenForPowerline10x20r.bdf TamzenForPowerline10x20b.bdf

Tamzen8x16r.bdf Tamzen8x16b.bdf

TamzenForPowerline8x16r.bdf TamzenForPowerline8x16b.bdf

Tamzen8x15r.bdf Tamzen8x15b.bdf

TamzenForPowerline8x15r.bdf TamzenForPowerline8x15b.bdf

Tamzen7x14r.bdf Tamzen7x14b.bdf

TamzenForPowerline7x14r.bdf TamzenForPowerline7x14b.bdf

Tamzen7x13r.bdf Tamzen7x13b.bdf

TamzenForPowerline7x13r.bdf TamzenForPowerline7x13b.bdf

Tamzen6x12r.bdf Tamzen6x12b.bdf

TamzenForPowerline6x12r.bdf TamzenForPowerline6x12b.bdf

Tamzen5x9r.bdf Tamzen5x9b.bdf

TamzenForPowerline5x9r.bdf TamzenForPowerline5x9b.bdf

man manual page man manual page man manual page man manual page man manual page tmux, vim, etc.

Installation

Using a package manager:

Packaging status

Manually, in Linux:

  • Download a release or clone this Git repository into ~/.fonts/tamzen-font and then run:

    xset +fp ~/.fonts/tamzen-font/bdf
    xset fp rehash
    
  • You should now be able to see the "Tamzen" font family in xfontsel.

Manually, in Windows:

  • Copy the files from the ttf/ folder into your Windows Fonts folder.

Manually, in macOS:

  • Drag & drop the files from the ttf/ folder into your Font Book app.

Linux VT integration

  1. Switch to a Linux VT (virtual terminal) by pressing Control-Alt-F1.

  2. Run showconsolefont to see how the character map currently looks.

  3. Run setfont ~/.fonts/tamzen-font/psf/TamzenForPowerline10x20.psf.

  4. See how the character map now displays glyphs from the Tamzen font.

  5. Try running setfont with other Tamzen fonts in the psf/ folder.

See https://wiki.archlinux.org/index.php/Fonts#Console_fonts for details.

XTerm integration

The following Xresources allow you to dynamically switch between the various Tamzen fonts by holding down Control and right-clicking in the XTerm terminal.

XTerm*font  : -*-tamzen-medium-*-*-*-16-*-*-*-*-*-*-*
XTerm*font1 : -*-tamzen-medium-*-*-*-9-*-*-*-*-*-*-*
XTerm*font2 : -*-tamzen-medium-*-*-*-12-*-*-*-*-*-*-*
XTerm*font3 : -*-tamzen-medium-*-*-*-13-*-*-*-*-*-*-*
XTerm*font4 : -*-tamzen-medium-*-*-*-15-*-*-*-*-*-*-*
XTerm*font5 : -*-tamzen-medium-*-*-*-16-*-*-*-*-*-*-*
XTerm*font6 : -*-tamzen-medium-*-*-*-20-*-*-*-*-*-*-*

! Tamzen fonts for use with Powerline
XTerm*font  : -*-tamzenforpowerline-medium-*-*-*-16-*-*-*-*-*-*-*
XTerm*font1 : -*-tamzenforpowerline-medium-*-*-*-9-*-*-*-*-*-*-*
XTerm*font2 : -*-tamzenforpowerline-medium-*-*-*-12-*-*-*-*-*-*-*
XTerm*font3 : -*-tamzenforpowerline-medium-*-*-*-13-*-*-*-*-*-*-*
XTerm*font4 : -*-tamzenforpowerline-medium-*-*-*-15-*-*-*-*-*-*-*
XTerm*font5 : -*-tamzenforpowerline-medium-*-*-*-16-*-*-*-*-*-*-*
XTerm*font6 : -*-tamzenforpowerline-medium-*-*-*-20-*-*-*-*-*-*-*

Feed the above snippet into the xrdb(1) program and then start a new XTerm to see its effect. Afterwards, you can add this snippet to your ~/.Xdefaults or ~/.Xresources files to have these settings be automatically applied by XTerm.

URxvt integration

The following command aliases let you dynamically switch between the various Tamzen fonts when run inside a shell that is attached to the URxvt terminal.

alias font="printf '\e]710;%s\007'"

alias Tamzen-9=Tamzen5x9r
alias Tamzen5x9r='font -misc-tamzen-medium-r-normal--9-65-100-100-c-50-iso8859-1'
alias Tamzen5x9b='font -misc-tamzen-bold-r-normal--9-65-100-100-c-50-iso8859-1'

alias Tamzen-12=Tamzen6x12r
alias Tamzen6x12r='font -misc-tamzen-medium-r-normal--12-87-100-100-c-60-iso8859-1'
alias Tamzen6x12b='font -misc-tamzen-bold-r-normal--12-87-100-100-c-60-iso8859-1'

alias Tamzen-13=Tamzen7x13r
alias Tamzen7x13r='font -misc-tamzen-medium-r-normal--13-101-100-100-c-70-iso8859-1'
alias Tamzen7x13b='font -misc-tamzen-bold-r-normal--13-101-100-100-c-70-iso8859-1'

alias Tamzen-14=Tamzen7x14r
alias Tamzen7x14r='font -misc-tamzen-medium-r-normal--14-101-100-100-c-70-iso8859-1'
alias Tamzen7x14b='font -misc-tamzen-bold-r-normal--14-101-100-100-c-70-iso8859-1'

alias Tamzen-15=Tamzen8x15r
alias Tamzen8x15r='font -misc-tamzen-medium-r-normal--15-108-100-100-c-80-iso8859-1'
alias Tamzen8x15b='font -misc-tamzen-bold-r-normal--15-108-100-100-c-80-iso8859-1'

alias Tamzen-16=Tamzen8x16r
alias Tamzen8x16r='font -misc-tamzen-medium-r-normal--16-108-100-100-c-80-iso8859-1'
alias Tamzen8x16b='font -misc-tamzen-bold-r-normal--16-108-100-100-c-80-iso8859-1'

alias Tamzen-20=Tamzen10x20r
alias Tamzen10x20r='font -misc-tamzen-medium-r-normal--20-145-100-100-c-100-iso8859-1'
alias Tamzen10x20b='font -misc-tamzen-bold-r-normal--20-145-100-100-c-100-iso8859-1'

# Tamzen fonts for use with Powerline
alias TamzenForPowerline-9=TamzenForPowerline5x9r
alias TamzenForPowerline5x9r='font -misc-tamzenforpowerline-medium-r-normal--9-65-100-100-c-50-iso10646-1'
alias TamzenForPowerline5x9b='font -misc-tamzenforpowerline-bold-r-normal--9-65-100-100-c-50-iso10646-1'

alias TamzenForPowerline-12=TamzenForPowerline6x12r
alias TamzenForPowerline6x12r='font -misc-tamzenforpowerline-medium-r-normal--12-87-100-100-c-60-iso10646-1'
alias TamzenForPowerline6x12b='font -misc-tamzenforpowerline-bold-r-normal--12-87-100-100-c-60-iso10646-1'

alias TamzenForPowerline-13=TamzenForPowerline7x13r
alias TamzenForPowerline7x13r='font -misc-tamzenforpowerline-medium-r-normal--13-101-100-100-c-70-iso10646-1'
alias TamzenForPowerline7x13b='font -misc-tamzenforpowerline-bold-r-normal--13-101-100-100-c-70-iso10646-1'

alias TamzenForPowerline-14=TamzenForPowerline7x14r
alias TamzenForPowerline7x14r='font -misc-tamzenforpowerline-medium-r-normal--14-101-100-100-c-70-iso10646-1'
alias TamzenForPowerline7x14b='font -misc-tamzenforpowerline-bold-r-normal--14-101-100-100-c-70-iso10646-1'

alias TamzenForPowerline-15=TamzenForPowerline8x15r
alias TamzenForPowerline8x15r='font -misc-tamzenforpowerline-medium-r-normal--15-108-100-100-c-80-iso10646-1'
alias TamzenForPowerline8x15b='font -misc-tamzenforpowerline-bold-r-normal--15-108-100-100-c-80-iso10646-1'

alias TamzenForPowerline-16=TamzenForPowerline8x16r
alias TamzenForPowerline8x16r='font -misc-tamzenforpowerline-medium-r-normal--16-108-100-100-c-80-iso10646-1'
alias TamzenForPowerline8x16b='font -misc-tamzenforpowerline-bold-r-normal--16-108-100-100-c-80-iso10646-1'

alias TamzenForPowerline-20=TamzenForPowerline10x20r
alias TamzenForPowerline10x20r='font -misc-tamzenforpowerline-medium-r-normal--20-145-100-100-c-100-iso10646-1'
alias TamzenForPowerline10x20b='font -misc-tamzenforpowerline-bold-r-normal--20-145-100-100-c-100-iso10646-1'

WezTerm integration

Specify your desired font size along with the name of your desired font variant (either Tamzen or TamzenForPowerline) in your ~/.wezterm.lua configuration file:

return {
  font_size = 10,
  font = wezterm.font_with_fallback { 'TamzenForPowerline' },
}

You can also disable ligatures just for Tamzen fonts since they lack ligatures:

return {
  font_size = 10,
  font = wezterm.font_with_fallback {
    {
      family = 'TamzenForPowerline', weight = 'Medium',
      -- disable ligatures for Tamzen since it lacks them
      harfbuzz_features = { 'calt=0', 'clig=0', 'liga=0' },
    },
  },
}

Building

Docker method

If you have Docker available, use the convenient rake docker command:

rake docker

Manual method

You can build the Tamzen fonts for yourself by running these commands:

bundle exec rake                 # build things only when necessary
bundle exec rake clobber         # destroy everything that we built
bundle exec rake clobber default # rebuild everything from scratch

But first, you'll need to install these dependencies (assuming Debian):

# NOTE: the "xfonts-utils" package provides both bdftopcf(1) and fonttosfnt(1)
sudo apt-get install ruby git imagemagick xfonts-utils bdf2psf default-jre gbdfed openjdk-11-jdk-headless
gem install bundler -v 2.3.26
bundle install

Similarly, if you've opted to use bitmap-font-patcher integration:

sudo apt-get install python python-fontforge python-pip python-dev libfreetype6-dev
pip install --user bdflib
pip install --user Pillow

License

Like my work? 👍 Please spare a life today as thanks! 🐄🐖🐑🐔🐣🐟🙊
Why? For 💕 ethics, the 🌎 environment, and 💪 health; see link above. 🙇

Copyright 2011 Suraj N. Kurapati https://github.com/sunaku

Copyright 2010 Scott Fial http://www.fial.com/~scott/

Distributed under the same terms as the Tamsyn font. See LICENSE file.

More Repositories

1

dasht

💁 Search API docs offline, in terminal or browser
Shell
827
star
2

md2man

📚 Converts markdown into UNIX manual pages
Ruby
372
star
3

glove80-keymaps

"Glorious Engrammer" keymap for Glove80 keyboard
HTML
346
star
4

vim-shortcut

💇 Discoverable & searchable shortcuts for (Neo)Vim
Vim Script
191
star
5

tork

💞 Tests your Ruby code, in parallel, as you change it
Ruby
180
star
6

vim-dasht

💁 (Neo)Vim plugin for dasht integration
Vim Script
132
star
7

home

🏡 My $HOME directory (dot files & bin scripts)
Shell
128
star
8

.vim

✌️ A modular (Neo)Vim configuration
Vim Script
112
star
9

vim-ruby-minitest

Vim highlighting & completion for MiniTest
Vim Script
107
star
10

engrammer

Arno's Engram layout for programmers
Makefile
97
star
11

vim-unbundle

🎁 Fast, filetype-lazy loader of Vim scripts & plugins
Vim Script
96
star
12

wmiirc

Ruby configuration for WMII window manager
Ruby
81
star
13

tmux-navigate

🥂 Seamless tmux/vim navigation (over SSH too!)
Shell
56
star
14

vim-hicterm

🌈 Highlights terminal color code numbers (0-255)
Vim Script
41
star
15

vim-modusline

🌈 Mode-specific statusline colors
Vim Script
39
star
16

binman

🤓 Creates manual pages from header comments
Ruby
36
star
17

wmii

My fork of the WMII window manager.
C
36
star
18

readably

📚 Static blogs: YAML + Slim → HTML5
Ruby
32
star
19

simple-ftp

My final project for CMPE-150 at UCSC during Spring 2004.
C
27
star
20

rumai

Ruby interface to 9P2000 protocol and WMII window manager
Ruby
21
star
21

bdf2fon

Convert X11 BDF fonts to Microsoft .FNT and .FON formats
C
16
star
22

ruby-vpi

Ruby interface to IEEE 1364-2005 Verilog VPI
Ruby
15
star
23

sunaku.github.io

🌟 My own little corner of the Web
HTML
10
star
24

.dwm

My dwm configuration with Ruby statusbar.
C
10
star
25

inochi

Infrastructure for Ruby projects
Ruby
10
star
26

ruby-coroutine-example

How to embed Ruby inside C coroutines.
C
9
star
27

ember

eRuby template processor
Ruby
8
star
28

sm4tik-font

BDF font of sm4tik's 8x8 XBM icons.
8
star
29

erbook

Write books, manuals, and documents in eRuby.
JavaScript
7
star
30

structy_record

🎩 Provides a Struct-like interface for Records
Elixir
7
star
31

beakl15p

BEAKL-15p keyboard layout
7
star
32

swig-ruby-ffi

Ruby FFI language module for SWIG
C++
7
star
33

kwalify

YAML schema validation for Ruby
6
star
34

libixp

Mirror of 9P2000 library from WMII window manager.
C
5
star
35

rassmalog

Static blogging with YAML and eRuby
Ruby
5
star
36

detest

Assertion testing library for Ruby
Ruby
5
star
37

babelfish

Ruby interface to Yahoo! BabelFish translation service.
Ruby
4
star
38

ofc2_to_png

Open Flash Chart 2 JSON to PNG converter
JavaScript
4
star
39

.dmenu

My dmenu configuration.
C
3
star
40

knights-tour

Knight's Tour algorithm in C, OpenGL, and Cg. This was my final project for CMPE-220 at UCSC during Winter 2007.
C
3
star
41

vim-ruby-shoulda-context

Vim highlighting & completion for shoulda-context.
Vim Script
2
star
42

programming-elixir-issues

Sample project from the Programming Elixir book
Elixir
2
star
43

firefox-tranquility

My fork of the Tranquility addon for Firefox
JavaScript
1
star
44

test-loop

MOVED TO sunaku/testr
1
star
45

kernel_hash

Adds a Kernel#Hash() method like Kernel#Array()
Ruby
1
star
46

redcarpet-manpage

renamed to md2man
1
star
47

test-unit-must

Selfish "must" assertions for Test::Unit
Ruby
1
star
48

ff-bash

For each File (GNU BASH)
Shell
1
star
49

opener

👐 A 33-line alternative to Ruby's launchy gem
Ruby
1
star
50

testr

MOVED TO sunaku/tork
1
star
51

onig-5.9.2

My patches to Oniguruma 5.9.2
C
1
star
52

test-unit-must.vim

Vim syntax highlighting for test-unit-must assertions
Vim Script
1
star
53

enthium

Engrammer meets Hands Down Promethium keyboard layout
1
star
54

equal_rights_for_hash

Adds Kernel#Hash() and generic #to_h() methods.
Ruby
1
star