Menu

#252 fontname d'ont work on --text-info

New
nobody
None
High
Defect
2015-05-11
2015-05-09
No

Hello.

For he began, lose for my angles.

I tested --fontname use within a text-info, but it does not work.

This is my code:

yad --text-info --fixed --geometry=260x135+$activeWinXErr+$activeWinYErr --image="/usr/share/icons/oxygen/64x64/status/dialog-warningError.png" --fontname=@font@ " big green font" "monospace 20" --button="gtk-close:1";

And this other:

yad --text-info --fixed --geometry=260x135+$activeWinXErr+$activeWinYErr --image="/usr/share/icons/oxygen/64x64/status/dialog-warningError.png" --column=@font@ " big green font" "monospace 20" --button="gtk-close:1";

And other:

yad --text-info --fixed --geometry=260x135+$activeWinXErr+$activeWinYErr --image="/usr/share/icons/oxygen/64x64/status/dialog-warningError.png" --fontname=@font@ --text=" big green font" "monospace 20" --button="gtk-close:1";

Victor, can you tell me how I use FontName within a text-info. How did you tell John Pezzano, within a list works correctly --fontname @ @ font = "text" "font type"

Thanks in advance.

Discussion

  • Torre Collons

    Torre Collons - 2015-05-09

    Operating System information

    Ubuntu 12.04 LTS
    Gtk Version: 2.24.10-0ubuntu6.1

     
  • John Pezzano

    John Pezzano - 2015-05-10

    Here is what I did in lieu of using fontname

    yad --image=dialog-question --timeout=2 \
    --text='<span color=\"blue\" font="24">'"${Revision}"'</span>' \
    --button="gtk-ok:0"  --undecorated  --center --width 600
    

    I used this:

       '<span color=\"blue\" font="24">'"${Revision}"'</span>'
    

    which has

       '<span color=\"blue\" font="24">'
    

    to set font and color of text. Note there is no space after the closing single
    quote.I followed that with the contents of my variable:

        "${Revision}"
    

    and then with no space, the end to the span:

        '</span>'
    

    This is different than what I wanted to do for a --list output where I was able to use the @font@

     
  • Torre Collons

    Torre Collons - 2015-05-10

    Hi John

    Thank you for your comments, I've tried your option and actually works, what I discovered is that --text option is one thing, and another leaves within the text bounding box.

    To modify --text option does tell you to change the text bounding box does --fontname option.

    To change the font in your option, I tried:

    <span font="Times New Roman bold italic 24">

    and working properly, including different colors and fonts in the same sentence.

    See the next message

     

    Last edit: Torre Collons 2015-05-11
  • Torre Collons

    Torre Collons - 2015-05-11

    Hi

    After an entire day learning how the wiki works, here is the result.

    I deleted the attachment of the previous message

    Here comes the message within --text; and a second message within the textbox area

    #!/bin/bash
    
    yad --text-info --fixed --center \
    --image="/usr/share/icons/gnome/48x48/status/gtk-dialog-warning.png" \
    --text='<span color=\\"red\\" font="Verdana 14" >In this directory, \\nno there  </span>\
    <span color=\\"red\\" font="12" > \\".pdf\\". </span> \
    <span color=\\"blue\\" font= "12" >\\n\\nNow, get out of the script !. </span>' \
    --button="gtk-close:1";'

    Here comes the message only within --text

    #!/bin/bash
    echo -en "Now, get out of the script !" \
    | yad --text-info --width=300 --height=230 --center \
    --image="/usr/share/icons/gnome/48x48/status/gtk-dialog-warning.png" \
    --fontname="verdana bold Italic 16" --fore=blue --back=yellow \
    --text='<span color=\\"red\\" font= "Courier 20" > You did not enter the\nname of the compressed file. </span>' \
    --button="gtk-close:1"
     

Log in to post a comment.