[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [STUMP] Unable to load a TTF font in StumpWM

From: Paul Lathrop
Subject: Re: [STUMP] Unable to load a TTF font in StumpWM
Date: Thu, 2 May 2019 16:51:47 -0400

Hi Christopher,

I found this hard to get working myself! Here's the relevant code from my config:

;; Set the font. Note that since I'm using a TTF font, I need to first
;; load the ttf-fonts module, then (and this was hard to figure out!)
;; I need to call xft:cache-fonts or xft is unable to locate the
;; Monoid font.
(load-stump-contrib-module "util/ttf-fonts")

(defparameter *font*
  (make-instance 'xft:font :family "Monoid" :subfamily "Retina" :size 12)
  "Font specification for stumpwm windows.")

(set-font *font*)

Hope that helps!

Paul Lathrop (he/him, they/them)
Software Architect
Heroku Production Engineering

On Wed, Apr 17, 2019 at 5:09 PM Christopher Culver <address@hidden> wrote:
I was interested in using both two fonts in my modeline, i.e. a standard
mono font and an emoji font that would provide e.g. wifi and battery
symbols. This commit:

suggests that users can now load multiple fonts by loading the module
"ttf-fonts" and then passing two arguments to the set-font function. I
tried to do just that:

(set-font (make-instance 'xft:font :family "DejaVu Sans Mono" :subfamily "Book" :size 12)
          (make-instance 'xft:font :family "Noto Color Emoji" :subfamily "Regular" :size 12))

Strangely, I am unable to load Noto Color Emoji. StumpWM gives an error
that no such font is found. However, the output of fc-list shows:

/usr/share/fonts/TTF/NotoColorEmoji.ttf: Noto Color Emoji:style=Regular

Therefore, I assume that I am passing it correctly to (set-font...). Is
there any reason why StumpWM’s ttf-fonts module would not be able to
load Noto Color Emoji?

(I don’t think this error has anything to do with trying to pass two
fonts to the set-font function. I get the error that Noto Color Emoji is
not found even when I pass it as the only argument to set-fonts.)

Christopher Culver

Stumpwm-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]