脾脏等宽位图字体
Spleen Monospaced Bitmap Fonts

原始链接: https://github.com/fcambus/spleen

## 脾气字体的概要 脾气字体是一种等宽位图字体,提供六种尺寸(5x8 到 32x64),设计灵感源自波德莱尔。它以多种格式分发——BDF、PCF、PSF、OTB、OTF、.dfont 和 FON——以兼容 Linux、macOS、Windows,甚至 DOS。 较大的尺寸(8x16、16x32、32x64)完全支持代码页 437,而所有尺寸(除 5x8 和最初的 6x12 之外)都包含广泛的 Unicode 字符集,如 ISO/IEC 8859-1、拉丁扩展-A、框绘制和盲文。5x8 版本仅限于基本的 ASCII 和盲文。最近的版本在 6x12 尺寸中添加了拉丁-1 补充,并支持 Powerline 符号。 安装方式因操作系统而异,通常涉及字体路径更新和配置。虽然提供 OpenType (OTF) 版本,但在支持的情况下,首选位图版本。脾气字体是开源的(BSD 2 条款许可),值得注意的是,它是 OpenBSD 的默认控制台字体,并已集成到其他项目中,如 FreeBSD、Haiku 和各种嵌入式库。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 单空间位图字体 (github.com/fcambus) 11 分,keyle 2小时前 | 隐藏 | 过去 | 收藏 | 2 评论 jasonjmcghee 7分钟前 [–] README中的ASCII艺术是否损坏了?回复 duskwuff 6分钟前 | 父评论 [–] 没有,这只是受涂鸦风格启发的奇特字体风格。我认为这种风格在盗版社区很流行。回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请YC | 联系 搜索:
相关文章

原文

                                                   ::::::::::::::::::::
                                                   :::              :::
              _____       _______ __. ________ ________ ________.   :::
             _)  _//__ __/ __   /   |.\  __  /.\  __  /.\  _.   |   :::
            .\____   /.\   )/  /    ||   )/   |   )/   |   \|   |   :::
            |   )/    |     __/|     \   _____|   _____|    |   |_  :::
            |____     |_____|  |_____/____\\  |____\\  |    |____/  :::
        - -- -- \_____| -H7--------------------------- `----' ----- ::: - -
                                                   :::              :::
                                                   ::::::::::::::::::::

Spleen is a monospaced bitmap font available in 6 sizes:

  • 5x8
  • 6x12
  • 8x16
  • 12x24
  • 16x32
  • 32x64

Each size is provided in the Glyph Bitmap Distribution Format (BDF), and release tarballs contain the fonts in the following formats: PCF, PSF (for the Linux console), OTB, OTF, .dfont for macOS users, and FON for Windows users.

All font sizes contain all ISO/IEC 8859-1 characters (Basic Latin and Latin-1 Supplement Unicode block), Latin Extended-A characters, as well as Box Drawing, Block Elements, and Braille Patterns Unicode blocks, except for the 5x8 and the 6x12 versions.

Due to character size constraints, the 5x8 version only contains printable ASCII characters, the Braille Patterns Unicode block, and light Box Drawing characters. Please also note that there is no OpenType version for this size.

As of Spleen 1.8.0, there is now a 6x12 version containing the same Unicode blocks as the 5x8 version and the Latin-1 Supplement Unicode block.

As of Spleen 2.0.0, the 8x16, 16x32 and 32x64 versions have full support for Code page 437 (IBM PC).

Spleen also has support for Powerline symbols out of the box.

The font name is a reference to Baudelaire.

The following screenshots show Spleen 16x32 displaying code and prose.

Spleen - Hello

Spleen - L'etranger

ASCII characters for all sizes:

Spleen 5x8:

Spleen - ASCII characters - 5x8

Spleen 6x12:

Spleen - ASCII characters - 6x12

Spleen 8x16:

Spleen - ASCII characters - 8x16

Spleen 12x24:

Spleen - ASCII characters - 12x24

Spleen 16x32: Spleen - ASCII characters - 16x32

Spleen 32x64: Spleen - ASCII characters - 32x64

-misc-spleen-medium-r-normal--8-80-72-72-c-50-iso10646-1
-misc-spleen-medium-r-normal--12-120-72-72-c-60-iso10646-1
-misc-spleen-medium-r-normal--16-160-72-72-c-80-iso10646-1
-misc-spleen-medium-r-normal--24-240-72-72-c-120-iso10646-1
-misc-spleen-medium-r-normal--32-320-72-72-c-160-iso10646-1
-misc-spleen-medium-r-normal--64-640-72-72-c-320-iso10646-1

Spleen packages are available for:

Clone the repository, convert the files to the Portable Compiled Format (PCF) using bdftopcf and run mkfontdir in the directory.

Alternatively, release tarballs provide PCF files for each size.

OTB versions are also available.

macOS users should use the .dfont files provided in the release tarballs.

DOS users should run the SPLEEN.COM executable provided in the release tarballs to enable the font.

This has been tested in DOSBox and FreeDOS on real hardware.

Windows users should use the .fon or .otf files provided in the release tarballs.

Update the font path to include Spleen:

xset +fp /usr/local/share/fonts/spleen/

Update .Xdefaults and add one of the following directives:

xterm*faceName: spleen:pixelsize=8:antialias=false
xterm*faceName: spleen:pixelsize=12:antialias=false
xterm*faceName: spleen:pixelsize=16:antialias=false
xterm*faceName: spleen:pixelsize=24:antialias=false
xterm*faceName: spleen:pixelsize=32:antialias=false
xterm*faceName: spleen:pixelsize=64:antialias=false

Launch xterm.

Ubuntu has bitmap fonts support disabled by default, instructions to enable it are available here.

Release tarballs provide PSF files for each size, setfont can be used to load and set the desired font.

NetBSD has .fnt files for each size which can be loaded using wsfontload(8).

For example, to load Spleen 16x32:

wsfontload -N spleen-16x32 -w 16 -h 32 /usr/share/wscons/fonts/spleen-16x32.fnt
wsconsctl -dw font=spleen-16x32

The FreeBSD package contains .fnt files which can be loaded using vidcontrol(1).

For example, to load Spleen 16x32:

vidcontrol -f /usr/local/share/fonts/spleen/spleen-16x32.fnt

Spleen release tarballs now contains OTF versions generated automatically from the BDF files, using bdf2sfd. Each font has a different name, allowing them to be installed alongside.

Please note that OTF versions should be used as last resort, always prefer bitmap versions if they are supported on your platform.

They should be used in the exact size specified below, with anti-aliasing disabled.

  • Spleen 6x12: 9 Pt (12 pixels)
  • Spleen 8x16: 12 Pt (16 pixels)
  • Spleen 12x24: 18 Pt (24 pixels)
  • Spleen 16x32: 24 Pt (32 pixels)
  • Spleen 32x64: 48 Pt (64 pixels)

Spleen is released under the BSD 2-Clause license. See LICENSE file for details.

Spleen is developed by Frederic Cambus.

GitHub: https://github.com/fcambus/spleen

  • Spleen was imported in the OpenBSD src tree in September 2018
  • Spleen is the default font for OpenBSD consoles since January 2019
  • Spleen was imported in the NetBSD src tree in March 2019
  • Spleen 12x24 was used in the Haiku kernel debugger (on high resolution displays) from May 2021 to June 2022
  • Spleen was imported in the FreeBSD base system in May 2023
  • msTERM, a Terminal program for MailStation devices uses Spleen 5x8
  • FBInk, a library to print text & images to an eInk Linux framebuffer embeds Spleen 16x32
  • U8g2, a monochrome graphics library for embedded devices includes all Spleen sizes
  • Ansilove, an ANSI and ASCII art to PNG converter includes Spleen
联系我们 contact @ memedata.com