additional field type FONT

527 views
Skip to first unread message

L18L

unread,
Jun 18, 2011, 10:37:38 AM6/18/11
to yad-common
Hi Victor,
we have a little app for setting console parameters. In a form we have
now
--field="Font":CB "$font_style! `fc-list | sort -f -u | tr '\n' '!' |
sed s/style=//g `"\
--field="Fontsize":NUM "$fsize" \
which is working well but having an additional field type for font
would be greatly appreciated.
--field="Font":FNT "$font_style_size"
Thanks in advance
L18L
http://murga-linux.com/puppy/viewtopic.php?t=68624

Victor Ananjevsky

unread,
Jun 18, 2011, 12:27:59 PM6/18/11
to yad-c...@googlegroups.com

"yad --form --field font:fn" give you what you want

On Sat, 18 Jun 2011 07:37:38 -0700 (PDT)
L18L <u.ri...@web.de> wrote:

> Hi Victor,
> we have a little app for setting console parameters. In a form we have
> now
> --field="Font":CB "$font_style! `fc-list | sort -f -u | tr '\n' '!' |
> sed s/style=//g `"\
> --field="Fontsize":NUM "$fsize" \
> which is working well but having an additional field type for font
> would be greatly appreciated.
> --field="Font":FNT "$font_style_size"
> Thanks in advance
> L18L

> Delivered-To: anan...@gmail.com
> Received: by 10.

--
Victor Ananjevsky <anan...@gmail.com>

L18L

unread,
Jun 18, 2011, 1:26:32 PM6/18/11
to yad-common


On 18 Jun., 18:27, Victor Ananjevsky <anana...@gmail.com> wrote:
> "yad --form --field font:fn" give you what you want

So it was just another undocumented feature.
Thank you very much.

Victor Ananjevsky

unread,
Jun 18, 2011, 1:33:58 PM6/18/11
to yad-c...@googlegroups.com

not undocumented. this field type described in both command-line help (--help-form) and man page

--
Victor Ananjevsky <anan...@gmail.com>

L18L

unread,
Jun 18, 2011, 4:02:52 PM6/18/11
to yad-common
Sorry, it is not yet what I really want.

yad --form --field="cursor":fn

opens the dialog, font family "cursor" preselected. That is good!

But I want some more preselected:
- style (italic,bold,...)
- and size
- and preview text, ( for example "В чащах юга жил бы цитрус? Да, но
фальшивый экземпляр!"
which includes all letters.)

Too many wishes?

Victor Ananjevsky

unread,
Jun 19, 2011, 2:26:39 AM6/19/11
to yad-c...@googlegroups.com
On Sat, 18 Jun 2011 13:02:52 -0700 (PDT)
L18L <u.ri...@web.de> wrote:

> Sorry, it is not yet what I really want.
>
> yad --form --field="cursor":fn
>
> opens the dialog, font family "cursor" preselected. That is good!
>
> But I want some more preselected:
> - style (italic,bold,...)
> - and size

> - and preview text, ( for example "О©Ґ О©ҐО©ҐО©ҐО©ҐО©Ґ О©ҐО©ҐО©Ґ О©ҐО©ҐО©Ґ О©ҐО©Ґ О©ҐО©ҐО©ҐО©ҐО©ҐО©Ґ? О©ҐО©Ґ, О©ҐО©Ґ
> О©ҐО©ҐО©ҐО©ҐО©ҐО©ҐО©ҐО©ҐО©Ґ О©ҐО©ҐО©ҐО©ҐО©ҐО©ҐО©ҐО©ҐО©Ґ!"


> which includes all letters.)
>
> Too many wishes?

just use pango font description to set initial font. for example:

yad --form --field "font:fn" "Sans Italic 10"

there are no preview text for form. but if you need this, you may use "yad --font" instead

>
> On 18 Jun., 19:26, L18L <u.rin...@web.de> wrote:
> > On 18 Jun., 18:27, Victor Ananjevsky <anana...@gmail.com> wrote:
> >
> > > "yad --form --field font:fn" give you what you want
> >
> > So it was just another undocumented feature.

> Delivered-To: ananasik

--
Victor Ananjevsky <anan...@gmail.com>

L18L

unread,
Jun 19, 2011, 5:40:12 AM6/19/11
to yad-common
Hi Victor,

thanks for your quick reply.
My apologies for not having RTFM (read the FINE manual).

> just use pango font description to set initial font for example:
>
> yad --form --field "font:fn" "Sans Italic 10"

That is the solution.

I have found that this can be applied to yad --font too:

yad --font --preview="quick brown fox...or another localized phrase" --
fontname="Sans Italic 10"

---> fontname can be not just fontname
but "pango font description"
that is "fontname fontstyle fontsize"

Thanks again
Keep up the good work
My regards
L18L

On 19 Jun., 08:26, Victor Ananjevsky <anana...@gmail.com> wrote:
> On Sat, 18 Jun 2011 13:02:52 -0700 (PDT)
>
> L18L <u.rin...@web.de> wrote:
> > Sorry, it is not yet what I really want.
>
> > yad --form --field="cursor":fn
>
> > opens the dialog, font family "cursor" preselected. That is good!
>
> > But I want some more preselected:
> > - style (italic,bold,...)
> > - and size
> > - and preview text, ( for example " ? ,
> > !"
> >                       which includes all letters.)
>
> > Too many wishes?
>
> just use pango font description to set initial font. for example:
>
> yad --form --field "font:fn" "Sans Italic 10"
>
> there are no preview text for form. but if you need this, you may use "yad --font" instead
>
>
>
> > On 18 Jun., 19:26, L18L <u.rin...@web.de> wrote:
> > > On 18 Jun., 18:27, Victor Ananjevsky <anana...@gmail.com> wrote:
>
> > > > "yad --form --field font:fn" give you what you want
>
> > > So it was just another undocumented feature.
> > Delivered-To: ananasik
>
> --
> Victor Ananjevsky <anana...@gmail.com>

Victor Ananjevsky

unread,
Jun 19, 2011, 6:11:30 AM6/19/11
to yad-c...@googlegroups.com
On Sun, 19 Jun 2011 02:40:12 -0700 (PDT)
L18L <u.ri...@web.de> wrote:

> Hi Victor,
>
> thanks for your quick reply.
> My apologies for not having RTFM (read the FINE manual).
>
> > just use pango font description to set initial font for example:
> >
> > yad --form --field "font:fn" "Sans Italic 10"
>
> That is the solution.
>
> I have found that this can be applied to yad --font too:
>
> yad --font --preview="quick brown fox...or another localized phrase" --
> fontname="Sans Italic 10"
>
> ---> fontname can be not just fontname
> but "pango font description"
> that is "fontname fontstyle fontsize"

yes. i update man page with description of how to set initial font

>
> Thanks again
> Keep up the good work
> My regards
> L18L
>
> On 19 Jun., 08:26, Victor Ananjevsky <anana...@gmail.com> wrote:
> > On Sat, 18 Jun 2011 13:02:52 -0700 (PDT)
> >
> > L18L <u.rin...@web.de> wrote:
> > > Sorry, it is not yet what I really want.
> >
> > > yad --form --field="cursor":fn
> >
> > > opens the dialog, font family "cursor" preselected. That is good!
> >
> > > But I want some more preselected:
> > > - style (italic,bold,...)
> > > - and size
> > > - and preview text, ( for example " ? ,
> > > !"

> > > О©Ґ О©Ґ О©Ґ О©Ґ О©Ґ О©Ґ О©Ґ О©Ґ О©Ґ О©Ґ О©Ґ which includes all letters.)


> >
> > > Too many wishes?
> >
> > just use pango font description to set initial font. for example:
> >
> > yad --form --field "font:fn" "Sans Italic 10"
> >
> > there are no preview text for form. but if you need this, you may use "yad --font" instead
> >
> >
> >
> > > On 18 Jun., 19:26, L18L <u.rin...@web.de> wrote:
> > > > On 18 Jun., 18:27, Victor Ananjevsky <anana...@gmail.com> wrote:
> >
> > > > > "yad --form --field font:fn" give you what you want
> >
> > > > So it was just another undocumented feature.
> > > Delivered-To: ananasik
> >
> > --

> Delivered-To: anan...@gmail.com
> Receiv

--
Victor Ananjevsky <anan...@gmail.com>

L18L

unread,
Jun 19, 2011, 7:15:42 AM6/19/11
to yad-common
And/Or change "fontname" to "fontDescription" ?
Reply all
Reply to author
Forward
0 new messages