Hi,
I want to change font and fontsize in a script (shows time and date). In earlier fvwm versions (2.5.12 and later) it worked.
I do the following:
- define two Env variables in the config]SetEnv fontsize 12
SetEnv used_font “Arial”[/code] - In the script]Init
Begin
Set $time_font = (GetOutput {echo xft:$[used_font]:pixelsize=$[fontsize]:bold} 1 -1)
:
ChangeFont 1 $time_font
End
:
Widget 1
Property
Size 75 23
Position 0 0
Colorset 11
Font “xft:sans:pixelsize=14:bold”
Type ItemDraw
Flags NoReliefString
End[/code]
but it shows only a small dash
WithDo {echo } $time_font
a “correct” string appears in .xsessions-error:[fvwm][Echo]: xft:Arial:pixelsize=12:bold
As I’ve changed $[fontsize] with e.g. “12” the time string is displayed in the correct font and size.
I’ve changed the variable $[fontsize] with single and double quotes but result is the same - only a small dash.
Also, if I’ve changed the widget property font string like
Font "xft:$[used_font]:pixelsize=$[fontsize]:bold"
Only
Font "xft:$[used_font]:pixelsize=14:bold"
works.
Has there anything changed since 2.5.12 or do I something wrong?
[Edit]: I am using Fvwm 2.6.2
Thanks,
Thomas