Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Every version of Terminus I try.. Will not work... #106

Closed
Anonrate opened this issue Aug 4, 2017 · 7 comments

Comments

Projects
None yet
8 participants
@Anonrate
Copy link

commented Aug 4, 2017

So I have been going at this for hours now. I'm sure you all have heard of the font Terminus. It's the only font I will use in the Terminal. I just discovered kitty about 12 hours ago, and in that 12 hours all I've been trying to do is get the font Terminus to work.

Versions that I have used are as follows:

  • Font package from Debian Stretch xfonts-terminus
  • I've manually built the original font (Both PSF and PCF)
  • I've tried the Powerline version of the font in the format of PCF
  • Lastly.. I tried the very shitty looking TTF format from ax86 [1]

I will also put a code version of this arrow so you can navigate to the locations with ease.
image

Every single one failed to show any signs of being present.

Trying to resolve the issue myself, I have also tried:

  • I have got all the required packages to build Kitty and have successfully built it without error.
  • Other fonts will work, and if it wasn't for the TTF format of Terminus not working as well... I would have guessed that it is only bitmap fonts that wont work.
  • I've rebuilt that font cache via fc-cache -fv
  • Tried with a fully configured kitty.conf
  • Tried with and without haveing bold_font, italic_font, bold_italic_font with still no avail.
  • Tried using the full qualified name of the font, rather than just the alias.
  • Increasing the size of the font
  • Specified full font family(?) name (with Regular, Medium, etc..) with and without the same casing
  • I've enabled bitmap fonts by removing 70-no-bitmaps.conf from the font configure directy.
  • I've tried changing the TERM variable to xterm-256color
  • I've tried with and without system wcwidth
  • I've ran Kitty from a different directoy

[1]: Got this error while running python3 .src/kitty with only font_family Terminus (TTF) in the config file.

Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File ".src/kitty/__main__.py", line 7, in 
    main()
  File ".src/kitty/kitty/main.py", line 315, in main
    run_app(opts, args)
  File ".src/kitty/kitty/main.py", line 223, in run_app
    boss = Boss(window, opts, args)
  File ".src/kitty/kitty/boss.py", line 107, in __init__
    self.sprites.do_layout(cell_size.width, cell_size.height)
  File ".src/kitty/kitty/shaders.py", line 65, in do_layout
    self.pre_render()
  File ".src/kitty/kitty/shaders.py", line 76, in pre_render
    send()  # blank
  File ".src/kitty/kitty/shaders.py", line 71, in send
    buf = render_cell(*a, **kw)[0]
  File ".src/kitty/kitty/fonts/render.py", line  41, in render_cell
    first, second = rc(text, bold, italic)
  File ".src/kitty/kitty/fonts/freetype.py", line 260, in render_cell
    bitmap_char = render_char(text, bold, italic, width)
  File ".src/kitty/kitty/fonts/freetype.py", line 183, in render_char
    return render_using_face(font, face, text, width, italic, bold)
  File ".src/kitty/kitty/fonts/freetype.py", line 131, in render_using_face
    bitmap = render_to_bitmap(font, face, text)
  File ".src/kitty/kitty/fonts/freetype.py", line 125, in render_to_bitmap
    format(text, bitmap.pixel_mode)
ValueError: FreeType rendered the glyph for ' ' with an unsupported pixel mode: 1

It's now comming up to about 14-15 hours now and I really need to get some sleep. I will check back when I'm up, and will provide any other information that may be needed. System specs are as follows though.

Debian Stretch
RX 480
NVME
i7 6850K
32GB DDR4
Open Source Drivers

@IllanFed

This comment has been minimized.

Copy link

commented Aug 4, 2017

Dublicate of #52
#52 (comment)

@kovidgoyal

This comment has been minimized.

Copy link
Owner

commented Aug 4, 2017

Relevant bug reports: #52 and #97

So, to sumamrize, if you use a new enough version of freetype you should be able to use the terminus ttf font. And kitty does not support bitmapped fonts.

@kovidgoyal kovidgoyal closed this Aug 4, 2017

@sajattack

This comment has been minimized.

Copy link

commented May 7, 2018

I'm getting weird looking glyphs using Terminus (TTF) 4.46 and freetype 2.9.0.
screenshot

@kacejot

This comment has been minimized.

Copy link

commented Jun 28, 2018

What should I write in the config file to change font?
There is an abstract thing font_family in the config file. What should I write there? There is no instructions how to set a font by its name.

I want to set Terminus font and here is output of fc-list:

/usr/share/fonts/misc/ter-x12b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/misc/ter-x22b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/misc/ter-x32b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/misc/ter-x18b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/misc/ter-x20b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/misc/ter-x28b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/misc/ter-x16b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/misc/ter-x14n.pcf.gz: xos4 Terminus:style=Regular
/usr/share/fonts/misc/ter-x14b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/misc/ter-x24n.pcf.gz: xos4 Terminus:style=Regular
/usr/share/fonts/misc/ter-x24b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/misc/ter-x16n.pcf.gz: xos4 Terminus:style=Regular
/usr/share/fonts/misc/ter-x18n.pcf.gz: xos4 Terminus:style=Regular
/usr/share/fonts/misc/ter-x20n.pcf.gz: xos4 Terminus:style=Regular
/usr/share/fonts/misc/ter-x28n.pcf.gz: xos4 Terminus:style=Regular
/usr/share/fonts/misc/ter-x12n.pcf.gz: xos4 Terminus:style=Regular
/usr/share/fonts/misc/ter-x22n.pcf.gz: xos4 Terminus:style=Regular
/usr/share/fonts/misc/ter-x32n.pcf.gz: xos4 Terminus:style=Regular

Help, please. I have spent a lot of time in search of a way to set the font, but there is no result.

@SolitudeSF

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2018

kitty does not support bitmap fonts. here is truetype version of Terminus

@isaz

This comment has been minimized.

Copy link
Contributor

commented Sep 9, 2018

Note for using Terminus TTF, you need to use the right font_size to have the embedded bitmaps selected, otherwise the auto-generated (ugly) outlines will be used.
Try starting kitty with -o font_size=12.0 for example with increments of 0.1 till you get it right for your screen ppi.

@iderik

This comment has been minimized.

Copy link

commented Nov 12, 2018

Here is a table of point versus pixel sizes for Terminus (TTF): https://files.ax86.net/terminus-ttf/
There is also some information about how to calculate point size for other DPI/PPI than 96 on that website.

Also, this is how I set the font in kitty.conf

font_family Terminus (TTF)
bold_font Terminus (TTF) Bold
italic_font Terminus (TTF) Italic

Since my monitor has really weird DPI (92), the point size for 16 and 18 pixel sizes is 12.522~ respective 14.087

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.