* [gentoo-user] Please explain X fonts?
@ 2015-03-27 2:15 Walter Dnes
2015-03-27 3:38 ` Matti Nykyri
2015-03-27 22:43 ` [gentoo-user] " walt
0 siblings, 2 replies; 7+ messages in thread
From: Walter Dnes @ 2015-03-27 2:15 UTC (permalink / raw
To: Gentoo Users List
I ran into this issue just now setting up X on my ancient netbook that
I've just re-installed on. It's been an ongoing issue of mine that I've
solved with an ugly hack. I'd like to know "the right way" of doing it.
I have a ~/.xinitrc file like so...
#!/bin/bash
[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources /usr/bin/xterm -bg black -fg cyan -geometry 50x9+0+0 -fn lucidasanstypewriter-12 &
/usr/bin/xterm -bg black -fg cyan -geometry +0+0 -fn lucidasanstypewriter-12 &
exec /usr/bin/icewm > ~/.icewm.log 2>&1
Some time ago, somebody decided to deprecate iso8859-1 fonts. And
when I run startx, the text console comes up with
========================================================================
/usr/bin/xterm: cannot load font 'lucidasanstypewriter'
/usr/bin/xterm: cannot load font 'lucidasanstypewriter'
Warning: Cannot convert string "lucidasanstypewriter" to type FontStruct
Warning: Unable to load any usable ISO8859 font
Warning: Unable to load any usable ISO8859 font
Error: Aborting: no font found
Warning: Cannot convert string "lucidasanstypewriter" to type FontStruct
Warning: Unable to load any usable ISO8859 font
Warning: Unable to load any usable ISO8859 font
Error: Aborting: no font found
========================================================================
xterms come up with some dinky little font. It's bad enough on a 24
in 1920x1080 monitor. On an 11" 1366x768 netbook, it's unreadable.
When I do a control-right-click on an xterm to manipulate fonts, the
xterm crashes.
One of the nice things about having multiple machines, is that I still
had another machine with the old fonts. For a few years, I've preserved
a copy of /usr/share/fonts from that machine as fonts_do_not_delete. So
each time fonts are "updated" on my machines, I rename /usr/share/fonts
to /usr/share/fonts.borken and copy the fonts_do_not_delete directory as
/usr/share/fonts.
OK, so whats supposed to be "the right way" to get working xterms with
lucidasanstypewriter-12?
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Please explain X fonts?
2015-03-27 2:15 [gentoo-user] Please explain X fonts? Walter Dnes
@ 2015-03-27 3:38 ` Matti Nykyri
2015-03-27 22:43 ` [gentoo-user] " walt
1 sibling, 0 replies; 7+ messages in thread
From: Matti Nykyri @ 2015-03-27 3:38 UTC (permalink / raw
To: gentoo-user@lists.gentoo.org
[-- Attachment #1: Type: text/plain, Size: 1656 bytes --]
> On Mar 27, 2015, at 4:15, "Walter Dnes" <waltdnes@waltdnes.org> wrote:
>
> #!/bin/bash
> [[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources /usr/bin/xterm -bg black -fg cyan -geometry 50x9+0+0 -fn lucidasanstypewriter-12 &
> /usr/bin/xterm -bg black -fg cyan -geometry +0+0 -fn lucidasanstypewriter-12 &
> exec /usr/bin/icewm > ~/.icewm.log 2>&1
>
> Some time ago, somebody decided to deprecate iso8859-1 fonts. And
> when I run startx, the text console comes up with
Why not use some new TTF? Put the config to ~/Xdefaults:
XTerm*faceName: Liberation Mono XTerm*faceSize: 12
> xterms come up with some dinky little font. It's bad enough on a 24
> in 1920x1080 monitor. On an 11" 1366x768 netbook, it's unreadable.
> When I do a control-right-click on an xterm to manipulate fonts, the
> xterm crashes.
X server abjusts font sizes according to the DPI value. The DPI value it calculates might be wrong though: bad EDID most likely. Set the DPI value in you Xorg.conf file to make the fonts in constant size.
> One of the nice things about having multiple machines, is that I still
> had another machine with the old fonts. For a few years, I've preserved
> a copy of /usr/share/fonts from that machine as fonts_do_not_delete. So
> each time fonts are "updated" on my machines, I rename /usr/share/fonts
> to /usr/share/fonts.borken and copy the fonts_do_not_delete directory as
> /usr/share/fonts.
CONFIG_PROTECT the directory or make the fonts immutable so they don't get removed. chattr +i
> OK, so whats supposed to be "the right way" to get working xterms with
> lucidasanstypewriter-12?
--
-Matti
[-- Attachment #2: Type: text/html, Size: 3109 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [gentoo-user] Re: Please explain X fonts?
2015-03-27 2:15 [gentoo-user] Please explain X fonts? Walter Dnes
2015-03-27 3:38 ` Matti Nykyri
@ 2015-03-27 22:43 ` walt
2015-03-29 9:23 ` lee
1 sibling, 1 reply; 7+ messages in thread
From: walt @ 2015-03-27 22:43 UTC (permalink / raw
To: gentoo-user
On 03/26/2015 07:15 PM, Walter Dnes wrote:
<snip all questions I can't answer>
> When I do a control-right-click on an xterm to manipulate fonts, the
> xterm crashes.
I had the same problem once. IIRC, strace showed me that xterm was trying
to load the "default" font but there was no value set for "default".
Somehow I managed to set the "default" font, but I can't remember how it
did it. Maybe someone else can supply details?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Re: Please explain X fonts?
2015-03-27 22:43 ` [gentoo-user] " walt
@ 2015-03-29 9:23 ` lee
2015-03-29 20:27 ` Urs Schütz
0 siblings, 1 reply; 7+ messages in thread
From: lee @ 2015-03-29 9:23 UTC (permalink / raw
To: gentoo-user
walt <w41ter@gmail.com> writes:
> On 03/26/2015 07:15 PM, Walter Dnes wrote:
>
> <snip all questions I can't answer>
>
>> When I do a control-right-click on an xterm to manipulate fonts, the
>> xterm crashes.
>
> I had the same problem once. IIRC, strace showed me that xterm was trying
> to load the "default" font but there was no value set for "default".
>
> Somehow I managed to set the "default" font, but I can't remember how it
> did it. Maybe someone else can supply details?
My xterm shows that it's using the default font. I would guess that the
default might be set through .Xresources or through command line
parameters.
There's not much explanation here, the following just works for me:
AFAIK, the font names are case sensitive. For .Xresources:
xterm*FaceName: xft:Source Code Pro:pixelsize=14:style=Regular
You can also use 'xterm -fa "LucidaTypewriter-16"', see man xterm.
Support for truetype must be compiled into xterm (x11-terms/xterm
truetype). If you use fvwm with tt-fonts, also use 'truetype'.
As to fonts, I highly recommend "Source Code Pro" and "Source Sans Pro".
They finally resolved my long search for good fonts. Unfortunately,
they don't come with Gentoo. I copied them over from a Fedora
installation, so you might be able to extract them from their RPMs.
I haven't been able to create them from their sources, though. It
requires some special program which didn't work. Maybe someone knows
how to do that?
And for emacs, in .Xressources:
Emacs.FontBackend: xft
and in .emacs:
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:inherit nil :stipple nil :background "black" :foreground "green" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 120 :width normal :foundry "adobe" :family "Source Code Pro"))))
'(font-lock-comment-delimiter-face ((t (:inherit font-lock-comment-face :foreground "deep sky blue"))))
'(font-lock-comment-face ((t (:foreground "goldenrod"))))
'(font-lock-warning-face ((t (:inherit error :foreground "DarkSlateGray1")))))
with:
app-editors/emacs X athena Xaw3d xft -gtk -motif tookit-scroll-bars gif imagemagick jpeg png svg tiff xpm gnutls gzip-el inotify libxml2 wide-int
To show which fonts are installed, there's 'fc-list'. When you want
user specific fonts, put them into ~/.config/fonts/ and run 'fc-cache'.
--
Again we must be afraid of speaking of daemons for fear that daemons
might swallow us. Finally, this fear has become reasonable.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Re: Please explain X fonts?
2015-03-29 9:23 ` lee
@ 2015-03-29 20:27 ` Urs Schütz
2015-04-02 0:03 ` lee
0 siblings, 1 reply; 7+ messages in thread
From: Urs Schütz @ 2015-03-29 20:27 UTC (permalink / raw
To: gentoo-user
On 03/29/15 06:23, lee wrote:
> walt <w41ter@gmail.com> writes:
>
>> On 03/26/2015 07:15 PM, Walter Dnes wrote:
>>
>> <snip all questions I can't answer>
>>
>
> As to fonts, I highly recommend "Source Code Pro" and "Source Sans Pro".
> They finally resolved my long search for good fonts. Unfortunately,
> they don't come with Gentoo. I copied them over from a Fedora
> installation, so you might be able to extract them from their RPMs.
>
> I haven't been able to create them from their sources, though. It
> requires some special program which didn't work. Maybe someone knows
> how to do that?
>
No need to extract them, they come with Gentoo unstable
$ eix source-pro
[I] media-fonts/source-pro
Available versions: (~)20121216^bs (~)20130316^bs (~)20141211^bs
{X cjk}
Installed versions: 20141211^bs(17:20:12 03/29/15)(X -cjk)
Homepage: http://adobe-fonts.github.io/source-sans-pro
http://adobe-fonts.github.io/source-serif-pro
http://adobe-fonts.github.io/source-code-pro
Description: Adobe's open source typeface family designed
for UI environments
<snip>
Urs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Re: Please explain X fonts?
2015-03-29 20:27 ` Urs Schütz
@ 2015-04-02 0:03 ` lee
2015-04-02 20:48 ` Urs Schütz
0 siblings, 1 reply; 7+ messages in thread
From: lee @ 2015-04-02 0:03 UTC (permalink / raw
To: gentoo-user
Urs Schütz <u.schutz@bluewin.ch> writes:
> On 03/29/15 06:23, lee wrote:
>> walt <w41ter@gmail.com> writes:
>>
>>> On 03/26/2015 07:15 PM, Walter Dnes wrote:
>>>
>>> <snip all questions I can't answer>
>>>
>>
>> As to fonts, I highly recommend "Source Code Pro" and "Source Sans Pro".
>> They finally resolved my long search for good fonts. Unfortunately,
>> they don't come with Gentoo. I copied them over from a Fedora
>> installation, so you might be able to extract them from their RPMs.
>>
>> I haven't been able to create them from their sources, though. It
>> requires some special program which didn't work. Maybe someone knows
>> how to do that?
>>
>
> No need to extract them, they come with Gentoo unstable
>
> $ eix source-pro
> [I] media-fonts/source-pro
Cool, thank you, I'll try that tomorrow!
Is that both fonts or only Source Code Pro?
--
Again we must be afraid of speaking of daemons for fear that daemons
might swallow us. Finally, this fear has become reasonable.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Re: Please explain X fonts?
2015-04-02 0:03 ` lee
@ 2015-04-02 20:48 ` Urs Schütz
0 siblings, 0 replies; 7+ messages in thread
From: Urs Schütz @ 2015-04-02 20:48 UTC (permalink / raw
To: gentoo-user
On 04/01/15 21:03, lee wrote:
> Urs Schütz <u.schutz@bluewin.ch> writes:
>
>> On 03/29/15 06:23, lee wrote:
>>> walt <w41ter@gmail.com> writes:
>>>
>>>> On 03/26/2015 07:15 PM, Walter Dnes wrote:
>>>>
>>>> <snip all questions I can't answer>
>>>>
>>>
>>> As to fonts, I highly recommend "Source Code Pro" and "Source Sans Pro".
>>> They finally resolved my long search for good fonts. Unfortunately,
>>> they don't come with Gentoo. I copied them over from a Fedora
>>> installation, so you might be able to extract them from their RPMs.
>>>
>>> I haven't been able to create them from their sources, though. It
>>> requires some special program which didn't work. Maybe someone knows
>>> how to do that?
>>>
>>
>> No need to extract them, they come with Gentoo unstable
>>
>> $ eix source-pro
>> [I] media-fonts/source-pro
>
> Cool, thank you, I'll try that tomorrow!
>
> Is that both fonts or only Source Code Pro?
>
>
It is both fonts, in different weights.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-04-02 20:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-27 2:15 [gentoo-user] Please explain X fonts? Walter Dnes
2015-03-27 3:38 ` Matti Nykyri
2015-03-27 22:43 ` [gentoo-user] " walt
2015-03-29 9:23 ` lee
2015-03-29 20:27 ` Urs Schütz
2015-04-02 0:03 ` lee
2015-04-02 20:48 ` Urs Schütz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox