oldherl / syllazh

Linux TTY font for Chinese, but treat it as a syllabic writing / 中文 Linux TTY 字体,但是表音文字
100 stars 3 forks source link

如何调整字体大小?How to resize the fontsize? #3

Open AClon314 opened 2 months ago

AClon314 commented 2 months ago

问题1

个人审美,似乎要手动再次制作一个小几号的字体,没有办法在tty直接缩放字体。 已参考链接: https://unix.stackexchange.com/questions/49779/can-i-change-the-font-of-the-text-mode-console

readme改进建议

Ubuntu 24.04 nobel (linux mint 22)的应该是/usr/share/consolefonts目录,好像arch的是/usr/share/kbd/consolefonts。否则就得手动指定路径setfont /usr/share/kbd/consolefonts/syllazh 想要在TTY登录用户后启用,在非root用户下的~/.bashrc加入一行:

setfont syllazh 2> /dev/null

(问题2:我试过/root/.bashrc,但不行,只能在用户~/.bashrc才行)

oldherl commented 2 months ago

是的,本字体是点阵字体,要使用小一些的字号的话,必须重新制作一个新的字体。tty 上只能用 setfont -d 选项来放大一倍显示,而不能缩小或更改为其他倍数。 目前这个字体的尺寸是32×24,其中汉字为24×24像素。我有计划(但无时间表)制作一个高度为16的字体,主要是为了支持老一些的内核和 kbd。

至于如何设置 tty 默认字体,请参考所使用的发行版的文档。在 Arch 上可以使用 /etc/vconsole.conf 来设置。

English translation for reference:

Yes, there's no way to resize this bitmap font. A smaller font must be produced separately if you want a smaller size. The only way to change the size in tty is to double it by setfont -d. The only size of the current font is 32x24 pixels, where the Chinese characters occupy 24×24 pixels. I have a plan to make another font in 16px, mainly to support older kernel and kbd.

Please refer to your distro's documentation about how to change the default tty font. On Arch Linux, the config is in /etc/vconsole.conf