You are not logged in.

#1 2013-06-27 22:17:46

PolyBender
Member
Registered: 2013-05-11
Posts: 24

Broken TTF fonts in urxvt

Hello!

I was messing around trying out different fonts under urxvt and it seems that after successfully installing and using the terminus font, I am no longer able to use my old TTF ones (droid and dejavu). I read through the fonts wiki pages and could not find anything that helped.

>>> fc-list : file | grep Droid
/usr/share/fonts/TTF/DroidSansArmenian.ttf: 
/usr/share/fonts/TTF/DroidSansEthiopic-Regular.ttf: 
/usr/share/fonts/TTF/DroidSansHebrew-Regular.ttf: 
/usr/share/fonts/TTF/DroidSansFallbackLegacy.ttf: 
/usr/share/fonts/TTF/DroidKufi-Bold.ttf: 
/usr/share/fonts/TTF/DroidKufi-Regular.ttf: 
/usr/share/fonts/TTF/DroidSansHebrew-Bold.ttf: 
/usr/share/fonts/TTF/DroidSansGeorgian.ttf: 
/usr/share/fonts/TTF/DroidSansEthiopic-Bold.ttf: 
/usr/share/fonts/TTF/DroidSansJapanese.ttf: 
/usr/share/fonts/TTF/DroidNaskh-Regular.ttf: 
/usr/share/fonts/TTF/DroidSerif-BoldItalic.ttf: 
/usr/share/fonts/TTF/DroidSans-Bold.ttf: 
/usr/share/fonts/TTF/DroidSansTamil-Regular.ttf: 
/usr/share/fonts/TTF/DroidSerif-Regular.ttf: 
/usr/share/fonts/TTF/DroidNaskh-Regular-SystemUI.ttf: 
/usr/share/fonts/TTF/DroidSans.ttf: 
/usr/share/fonts/TTF/DroidSansThai.ttf: 
/usr/share/fonts/TTF/DroidNaskh-Bold.ttf: 
/usr/share/fonts/TTF/DroidSansArabic.ttf: 
/usr/share/fonts/TTF/DroidSerif-Bold.ttf: 
/usr/share/fonts/TTF/DroidSansDevanagari-Regular.ttf: 
/usr/share/fonts/TTF/DroidSansFallback.ttf: 
/usr/share/fonts/TTF/DroidSerif-Italic.ttf: 
/usr/share/fonts/TTF/DroidSansTamil-Bold.ttf: 
/usr/share/fonts/TTF/DroidSansMono.ttf: 
/usr/share/fonts/TTF/DroidSansFallbackFull.ttf:

>>> xset -q
Keyboard Control:
  auto repeat:  on    key click percent:  0    LED mask:  00000002
  XKB indicators:
    00: Caps Lock:   off    01: Num Lock:    on     02: Scroll Lock: off
    03: Compose:     off    04: Kana:        off    05: Sleep:       off
    06: Suspend:     off    07: Mute:        off    08: Misc:        off
    09: Mail:        off    10: Charging:    off    11: Shift Lock:  off
    12: Group 2:     off    13: Mouse Keys:  off
  auto repeat delay:  660    repeat rate:  25
  auto repeating keys:  00ffffffdffffbbf
                        fadfffefffedffff
                        9fffffffffffffff
                        fff7ffffffffffff
  bell percent:  50    bell pitch:  400    bell duration:  100
Pointer Control:
  acceleration:  2/1    threshold:  4
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  600    cycle:  600
Colors:
  default colormap:  0x20    BlackPixel:  0x0    WhitePixel:  0xffffff
Font Path:
  /usr/share/fonts/TTF,built-ins
DPMS (Energy Star):
  Standby: 600    Suspend: 600    Off: 600
  DPMS is Enabled
  Monitor is On

>>> pacman -Qs droid
local/ttf-droid 20121017-2
    General-purpose fonts released by Google as part of Android

I use the droid font for my awesome wm taskbar and firefox and both are working just fine. It used to work for urxvt too, until recently. Does anyone have any idea what might be wrong? Oh and here's the .Xresources font line, in case that might be it. I kind of doubt it's the syntax though, I haven't touched that line at all.

URxvt.font: xft:droid:size=9

Offline

#2 2013-06-27 22:51:12

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: Broken TTF fonts in urxvt

Have you tried other ttf fonts?  I just tried (I use terminus normally) and it's also failing here with droid, droid sans, and monaco.

Edit: sorry, I see now you also tried deja vu - so I'm just confirming I have the same issue then.

Last edited by Trilby (2013-06-27 22:52:32)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2013-06-27 22:52:12

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Broken TTF fonts in urxvt

It very well might be your urxvt resource syntax.  The match to "droid" will depend on what your fontconfig states is the default font when it can't find a match.  For example, with my setup:

$ fc-match droid       # This may surprise you.
DejaVuSans.ttf: "DejaVu Sans" "Book"

$ fc-match "Droid Sans"
DroidSans.ttf: "Droid Sans" "Regular"

$ fc-match "Droid Sans Mono"
DroidSansMono.ttf: "Droid Sans Mono" "Regular"

I believe you want to be more specific with the font you select:

urxvt*font: xft:Droid Sans Mono

Offline

#4 2013-06-27 22:52:41

PolyBender
Member
Registered: 2013-05-11
Posts: 24

Re: Broken TTF fonts in urxvt

@Trilby: Yes. I installed ttf-liberation and none of them has been working either.

Last edited by PolyBender (2013-06-27 22:54:50)

Offline

#5 2013-06-27 22:55:13

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: Broken TTF fonts in urxvt

thisoldman, if that were the case, then these bad matches would just use DejaVu, right?  That's not happening.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2013-06-27 22:57:14

PolyBender
Member
Registered: 2013-05-11
Posts: 24

Re: Broken TTF fonts in urxvt

@ThisOldMan Thank you for answering. Unfortunately, Droid Sans or Droid Sans Mono do not seem to work either. Neither do the DejaVu, or any other TTF fonts I could find.

Offline

#7 2013-06-27 23:26:15

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Broken TTF fonts in urxvt

Did you try the fc-match command?  What does it return?  I am puzzled.

With no X resources set for urxvt:

# These show the correct fonts for me:

$ urxvt -fn "xft:Droid Sans Mono" &
$ urxvt -fn "xft:Droid Sans" &
$ urxvt -fn "xft:Droid Serif" &
$ urxvt -fn "xft:Terminus" &

# This gives me DejaVu Sans:
$ urxvt -fn "xft:droid" &

Terminus is 'community/terminus-font 4.38-2, the Droid fonts are community/ttf-droid 20121017-2.

Offline

#8 2013-06-27 23:40:19

PolyBender
Member
Registered: 2013-05-11
Posts: 24

Re: Broken TTF fonts in urxvt

This is a little weird to me.

>>> fc-match Droid
DejaVuSans.ttf: "DejaVu Sans" "Book"
>>> fc-match "Droid Sans"
DroidSans.ttf: "Droid Sans" "Regular"
>>> fc-match "Droid Sans Mono"
DroidSansMono.ttf: "Droid Sans Mono" "Regular

#This actually shows the right font!
>>> urxvt -fn "xft:Droid Sans Mono"
urxvt: default locale unavailable, check LC_* and LANG variables. Continuing.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

And yes, both fonts are properly installed.

>>> pacman -Qs droid
local/ttf-droid 20121017-2
    General-purpose fonts released by Google as part of Android
>>> pacman -Qs terminus
local/terminus-font 4.38-2
    A superb, monospace bitmap font (for X11 and console)

Last edited by PolyBender (2013-06-27 23:43:03)

Offline

#9 2013-06-27 23:46:56

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Broken TTF fonts in urxvt

Don't you think those locale warnings are probably something you should take care of?  I'd imagine that it wouldn't be to much of a stretch think that they might be wreaking some kind of havoc that might be causing this.

Offline

#10 2013-06-28 00:02:35

PolyBender
Member
Registered: 2013-05-11
Posts: 24

Re: Broken TTF fonts in urxvt

@WonderWoofy: You're right. I must have been tired during the installation process, I accidently uncommented the wrong line. The locale errors are gone now, and Droid Sans Mono works now!

#This works!
>>> urxvt -fn "xft:Droid Sans Mono" &
>>> urxvt -fn "xft:Droid Sans Mono:size=9" &

#This font is still not recognized
>>> urxvt -fn "xft:Droid Sans" &

And using URxvt.font: xft:Droid Sans Mono in .Xresources actually works! Weirdly enough, Droid Sans still does not.

EDIT: I just tried the liberation fonts. Liberation Mono works, Liberation Sans does not. Sans rendering might be the issue?
RE-EDIT: DejaVu Sans Mono works, but DejaVu Sans does not. This is a mess.

Last edited by PolyBender (2013-06-28 00:17:36)

Offline

#11 2013-06-28 00:39:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: Broken TTF fonts in urxvt

I guess I just added noise to this thread - my locale is fine, but ttf fonts still are a no go.  My curiosity is slighly piqued as to why this fails, but as I don't use those fonts anyways, I probably wont pursue it.

PolyBender, would you really want to use a non-monospaced font in a terminal - can terminals even use non monospaced fonts? edit: I suppose they can (vte's can at least), but I don't know how they can then calculate the number of columsn which is requested by many programs.

Last edited by Trilby (2013-06-28 00:44:19)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#12 2013-06-28 00:44:16

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Broken TTF fonts in urxvt

@Trilby, they can use non-monospaced fonts, but like you, I have no clue why you would want that.  The terminal to me is a place where function far outweighs asthetics.

Offline

#13 2013-06-28 00:45:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: Broken TTF fonts in urxvt

I'm trying to imagine a ncurses application running with a non-monospaced font ... it plays out like a low budget horror movie in my mind.

edit: ok, just had to test.  non-monospaced fonts seem to still be drawn with uniform spacing.  Which makes it slightly less grotesque than I imagined - but still ugly as hell: a font not made for monospacing is monospaced.

Last edited by Trilby (2013-06-28 00:47:18)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB