1

I use yad fonts as style, like the man page required:

yad --width=250 --text 'foo bar base' --fontname="Serif bold italic 90"

there's no difference if I do

yad --width=250 --text 'foo bar base' --fontname="Serif bold italic 10"

bug or PEBKAC?

Modified example from doc page: http://smokey01.com/yad/

Better real test case, using <span font="24"> trick (display the tag as is without HTML rendering):

yad --no-focus --on-top --borders=10 --geometry -0+80 --height=100 --no-markup --question --title 'title' --text '<span font="24">coucou\nhey\n20230228</span>'

1 Answers1

1

This was a bug, which was fixed back in February 2020.

However, that's not where your problem lies!

The --fontname option works only in the font selector (--font), print options (--print), and text info (--text-info) dialogues.

For the text part of the dialogue, you need to use <span>.

Example: A simple prompt with parts of the text prompt highlighted.

yad --text='Part of this is <span foreground="red" font="Impact" font-size="xx-large">red and big!</span>.'

Example: For text-info, you might have the following, where the text prompt is green, and the displayed text-info box uses Liberation Serif:

yad --text-info --listen --text='<span foreground="green">List of trees</span>' --fontname='Liberation Serif Regular 10'
Paddy Landau
  • 306
  • 2
  • 10