|
1 | 1 | # tkw-font
|
2 | 2 |
|
3 |
| -Tiny kakwa font, a really small 7 pixels monospace bitmap font. |
| 3 | +Tiny kakwa font: a really small 7 pixels monospace bitmap font. |
4 | 4 |
|
5 | 5 | 
|
6 | 6 |
|
7 |
| -# Generate & Install |
| 7 | +# Generate font files & Installation |
8 | 8 |
|
9 | 9 | ## Prerequisites
|
10 | 10 |
|
11 |
| -### macOS |
| 11 | +### MacOS |
| 12 | + |
12 | 13 | ```sh
|
13 | 14 | brew install fontforge font-util
|
14 | 15 | ```
|
15 | 16 |
|
16 | 17 | ### Debian/Ubuntu
|
| 18 | + |
17 | 19 | ```sh
|
18 | 20 | sudo apt install fontforge xfonts-utils
|
19 | 21 | ```
|
20 | 22 |
|
21 | 23 | ## Targets
|
22 | 24 |
|
23 | 25 | ### Build Targets
|
24 |
| -- `all-fonts` - Generate all formats `PCF.GZ`, `PCF`, and `OTB` formats. |
| 26 | + |
| 27 | +- `all-fonts` - Generate all formats `PCF.GZ`, `PCF`, and `OTB` formats (default). |
25 | 28 | - `pcf` - Generate `PCF`
|
26 | 29 | - `pcf.gz` - Generate `PCF.GZ`
|
27 | 30 | - `otb` - Generate OpenType Bitmap (`OTB`).
|
28 | 31 |
|
29 | 32 | ### Utility Targets
|
| 33 | + |
30 | 34 | - `clean` - Removes generated font files.
|
31 |
| -- `index` - Creates an X11 font index in the font directory. |
32 |
| -- `rehash` - Refreshes the X11 font cache. |
33 |
| -- `noindex` - No-op target used in conditional rules. |
34 | 35 |
|
35 | 36 | ## Installation
|
36 | 37 |
|
37 |
| -### System-wide Installation |
| 38 | +### Installation Targets |
38 | 39 |
|
39 |
| -As Root: |
40 |
| -```sh |
41 |
| -make install PREFIX=/usr |
42 |
| -``` |
43 |
| -This installs fonts to `/usr/local/share/fonts/`. |
| 40 | +- `index` - Creates an X11 font index in the font directory. |
| 41 | +- `rehash` - Refreshes the X11 and fontconfig font cache. |
| 42 | +- `install-fonts` - Install only the fonts |
| 43 | +- `install-conf` - Install only the fc configuration |
44 | 44 |
|
45 | 45 | ### User Installation (Non-root)
|
46 | 46 |
|
47 | 47 | As User:
|
48 | 48 | ```sh
|
49 |
| -make install INSTALL_USER=true |
| 49 | +make install INSTALL_USER=true -j |
| 50 | +``` |
| 51 | + |
| 52 | +This installs fonts to `~/.fonts/` and the config to `~/.fonts.conf.d/`. |
| 53 | +It also refresh `fc-cache` and X11 font cache. |
| 54 | + |
| 55 | +### System-wide Installation |
| 56 | + |
| 57 | +As Root: |
| 58 | +```sh |
| 59 | +make install -j |
50 | 60 | ```
|
51 |
| -This installs fonts to `~/.fonts/`. |
52 | 61 |
|
53 |
| -## Fontconfig |
| 62 | +This installs fonts to: |
| 63 | +* `otb` - `/usr/share/fonts/opentype/tkw-font/` |
| 64 | +* `pcf.gz` - `/usr/share/fonts/X11/misc/` |
| 65 | + |
| 66 | +And the config to `/etc/fonts/conf.d/`. |
| 67 | + |
| 68 | +To tweak this install, use the usual variables (`PREFIX`, `SYSCONFDIR`, `DESTDIR`) or manually copy the fonts in the appropriate directories of your system. |
| 69 | + |
| 70 | +## Fontconfig & X11 indexation |
54 | 71 |
|
55 | 72 | You can test the availability of the font with the following commands:
|
56 | 73 |
|
| 74 | +X11: |
57 | 75 | ```sh
|
| 76 | +# Check font path: |
| 77 | +xset q |
58 | 78 | # Check presence in X11
|
59 | 79 | xlsfonts | grep tkw
|
60 | 80 | ```
|
61 | 81 |
|
| 82 | +Fontconfig: |
62 | 83 | ```sh
|
63 | 84 | # Check Presence in Wayland/fontconfig
|
64 | 85 | fc-list | grep tkw
|
65 | 86 | ```
|
66 | 87 |
|
67 |
| -If you encounter issues, install `misc/71-enable-tkw-font.conf` in the appropriate directory (`/etc/fonts/conf.d` on Debian). |
68 |
| - |
69 |
| -And then, rescan the fonts `fc-cache -fvr`. |
| 88 | +# Trying tkw-font |
70 | 89 |
|
71 |
| -# Using |
72 |
| - |
73 |
| -## XTerm |
| 90 | +Here is a quick way to try tkw-font: |
74 | 91 |
|
75 | 92 | ```sh
|
76 |
| -xterm -bg black -fg white -fn -tkw-tkw-r-normal--7-70-72-72-c-40-iso8859-1 -fb -tkw-tkw-r-normal--7-70-72-72-c-40-iso8859-1 |
77 |
| -``` |
| 93 | +# With Xterm |
| 94 | +xterm -bg black -fg white -fn -tkw-tkw-r-normal--7-70-72-72-c-40-iso8859-1 -xrm "XTerm.vt100.allowBoldFonts: false" |
78 | 95 |
|
79 |
| -## Foot |
80 |
| -```sh |
| 96 | +# With foot |
81 | 97 | foot --font tkw:size=5
|
82 | 98 | ```
|
0 commit comments