[kmscon-devel] Setting Font Name & Size
John Magolske
listmail at b79.net
Mon May 12 21:30:57 PDT 2014
Hi,
I'm trying to sort out how to go about setting font name & size. Could
the name be picked from the output of `fc-list`? For example, to use
the Terminus 18 font:
% fc-list | grep Terminus | grep 18
/usr/share/fonts/X11/misc/ter-u18b_iso-8859-1.pcf.gz: Terminus:style=Bold
/usr/share/fonts/X11/misc/ter-u18b_unicode.pcf.gz: Terminus:style=Bold
/usr/share/fonts/X11/misc/ter-u18n_unicode.pcf.gz: Terminus:style=Regular
/usr/share/fonts/X11/misc/ter-u18n_iso-8859-1.pcf.gz: Terminus:style=Regular
I tried this:
# kmscon --font-name Terminus --font-size 18
Which launched kmscon using Terminus, but at a size larger than 18
pixels tall. Realizing "font-size" here is in points, I set "font-dpi"
as well, trying a value of 72:
# kmscon --font-name Terminus --font-size 18 --font-dpi 72
Ok, that seems to set it to an 18 pixel height. Is there a way to
specify Regular / Bold? Some guesses (that didn't work):
# kmscon --font-name Terminus:style=Bold --font-size 18
# kmscon --font-name Terminus B --font-size 18
Also, I have a certain 9x20 bdf font I'd like to use, so I copied
it to /usr/share/fonts/X11/misc and ran what I thought were the
appropriate commands:
# cp sgiscreen-9x20.bdf /usr/share/fonts/X11/misc
# cd /usr/share/fonts/X11/misc
# mkfontdir
# cat fonts.dir | grep sgi
# sgiscreen-9x20.pcf sgiscreen-9x20
# fc-cache .
# fc-list | grep sgi
#
fc-cache is not seeing it, but it does show up in fc-scan:
# fc-scan .
[...]
Pattern has 20 elts (size 32)
family: "sgiscreen-9x20"(s)
style: "Regular"(s)
slant: 0(i)(s)
weight: 80(i)(s)
width: 100(i)(s)
pixelsize: 13(f)(s)
spacing: 100(i)(s)
foundry: "unknown"(s)
antialias: False(s)
file: "/usr/share/fonts/X11/misc/sgiscreen-9x20.bdf"(s)
index: 0(i)(s)
outline: False(s)
scalable: False(s)
charset:
(s)
lang: (s)
fontversion: 0(i)(s)
fontformat: "BDF"(s)
decorative: False(s)
hash: "sha256:93790602774ac93f6f25513db530d9b03d3860918c7975eeaa66838cf959c43d"(s)
postscriptname: "sgiscreen-9x20"(s)
a few attempts to load it:
# kmscon --font-name sgiscreen-9x20
# kmscon --font-name sgiscreen-9x20 --font-size 20 --font-dpi 72
...does not load. I'm wondering what directory to drop this bdf file
in and what commands to run to have it recognized & loaded by kmscon.
Thanks for any help,
John
--
John Magolske
http://B79.net/contact
More information about the kmscon-devel
mailing list