You are not logged in.

#1 2020-04-21 20:10:15

doaster
Member
Registered: 2020-04-21
Posts: 5

[SOLVED] Font size of xclock

I have tried to set the font size of xclock in digital mode.

The fonts-conf man page says that the format of a font is

<families>-<point sizes>:<name1>=<values1>:<name2>=<values2>...

So I used fc-list to pick a font:

Bitstream Vera Sans:style=Roman

And tried the command

xclock -d -font 'Bitstream Vera Sans-36:style=Roman'

but this does not change the font size.
It gives the warning:

Warning: Cannot convert string "Bitstream Vera Sans-36:style=Roman" to type FontStruct

which is not helpful to me.
I also tried to set the property

xclock.font: Bitstream Vera Sans-36:style=Roman

in the Xresources file. That doesn't work either.

Any ideas how to accomplish changing the font size in xclock?

Last edited by doaster (2020-04-22 10:45:33)

Offline

#2 2020-04-21 20:49:29

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [SOLVED] Font size of xclock

A post I found out on the internet says:

The font notation is probably different then expected. You can use the xfontsel program to select (the notation) for the font wanted.

https://www.linuxquestions.org/question … ost2764185

Last edited by ratcheer (2020-04-21 20:50:34)

Offline

#3 2020-04-21 21:16:55

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: [SOLVED] Font size of xclock

This seems to work:

xclock -digital -face 'Bitstream Vera Sans:size=36'

So use this in ~/.Xresources:

XClock.Clock.analog: false
XClock.Clock.face: Bitstream Vera Sans:size=36

Jin, Jîyan, Azadî

Offline

#4 2020-04-22 10:42:53

doaster
Member
Registered: 2020-04-21
Posts: 5

Re: [SOLVED] Font size of xclock

Head_on_a_Stick wrote:

This seems to work:

xclock -digital -face 'Bitstream Vera Sans:size=36'

So use this in ~/.Xresources:

XClock.Clock.analog: false
XClock.Clock.face: Bitstream Vera Sans:size=36

That works for me. Thanks!
I should have paid more attention to the man page,
the solution is to use -face instead of -font.

Offline

Board footer

Powered by FluxBB