Page 1 of 2

Posted: Thu 07 Jul 2011, 14:34
by vovchik
@ Maik.Murks:

In my little script called "pfont2", which is /usr/local/bin", you can replace the line 179:

Code: Select all

<action>gfontsel &</action>
with

Code: Select all

<action>Xdialog --fontsel "" 0 0 &</action>
I took Zigbert's code, if I remember correctly, but Xdialog does the exact same thing. This should work in all Puppies, since Xdialog is present in all of them, I think. Let me know whether it works for you. If so, I will change Pfont2 to use Xdialog for the installed font display.

@ disciple:

Good question :) I think a tiny script along the lines of the above will do the trick and we can reduce Puppy by a few kilobytes (gfontsel is 6k, but a script is much smaller), and "a byte saved is a byte earned".

With kind regards,
vovchik

PS. Rod/Gatordog has written a font display prog in BaCon. It is in Programming/Bacon Bits.

Posted: Thu 07 Jul 2011, 16:50
by maik.murks
vovchik wrote:@ Maik.Murks:

In my little script called "pfont2", which is /usr/local/bin", you can replace the line 179:

Code: Select all

<action>gfontsel &</action>
with

Code: Select all

<action>Xdialog --fontsel "" 0 0 &</action>
I took Zigbert's code, if I remember correctly, but Xdialog does the exact same thing. This should work in all Puppies, since Xdialog is present in all of them, I think. Let me know whether it works for you. If so, I will change Pfont2 to use Xdialog for the installed font display.

Hi vovchik.

I‘ve changed line 179 in that manner you‘ve told me. And what should I say? It simply works. Well, it works like a charme :D
Thank you very much for your help and your patience with me :D

Cheers :wink:

Maik.Murks

good news

Posted: Thu 07 Jul 2011, 17:10
by vovchik
Dear Maik.Murks,

I am glad you managed to do the edit and that it worked. I think I will do it that way in the next release, if I don't have my own previewer written by then :) What is important is that you pointed out (i) that gfontsel was missing in some Puppies, and (ii) that gfontsel is actually unnecessary in Puppy distros if Xdialog is present. So, thanks to you!

With kind regards,
vovchik

Posted: Sat 03 Sep 2011, 09:20
by darkcity
http://puppylinux.org/wikka/PFont2

I've added to wiki.

I too get the problem of the preview image not showing next to the description and have to use Viewnior.

I've installed the gtk-splash - but then it show the [X] image not found icon next to description.

Cheers ; -)

Posted: Sat 03 Sep 2011, 10:39
by disciple
Are you making any progress with your previewer, vovchik? Will it be able to preview .ttf files which aren't installed? (EDIT - sorry, yes of course it will, that's the whole point of this app, and why I didn't ask this question when I first saw this thread.)
In the past I spent quite a long time searching for something lightweight to do that (the only thing for linux seems to be Opcion, written in Java :(), but I didn't quite have the expertise to write one myself.

Posted: Sat 03 Sep 2011, 10:53
by darkcity
It can preview ttf fonts- it create an image file in /tmp

however for some reason it doesn't display the image file correctly in the app itself.

---

When you click preview - do you get a window containing a description of the font but no image?

Posted: Tue 23 Oct 2012, 14:40
by thunor
Great, works for me on Slacko 5.3.3 :)

I'm actually interested in the preview part only as you might've guessed from my pfontview program and I've found that changing ROX's "Set Run Action..." to ttf "@" does the trick.

The fonts which I've downloaded that gtk/Pango refuse to initialise to are successfully shown using your ttf program so that's good.

Regards,
Thunor

Posted: Wed 31 Oct 2012, 16:50
by thunor
Hi vovchik

Can I recommend something?

In pfont2, in function make_gui() there is an entry widget for the filename, add this:

Code: Select all

<default>"'$1'"</default>
In pfont2, at the bottom where make_gui is called, change it to this:

Code: Select all

make_gui "$1"
Now you can pass in a filename from another program i.e. pfontview's Pfont2 menuitem.

In ttf, comment-out the following code to stop limiting files to *.ttf files:

Code: Select all

mylow=$(echo $mysuffix |tr '[A-Z]' '[a-z]')
...
...
if [[ "$mylow" == "ttf" ]]; then
...
...
else
	gtkdialog-splash -placement top -timeout 4 -fontsize medium -icon "gtk-dialog-error" -text "$msg_nottf"
fi
Now you can view *.otf files :)

Regards,
Thunor

Posted: Fri 12 Oct 2018, 02:12
by perdido
The last version of puppy this worked correctly was Puppy Precise 5.7.1
Nice utility, would be nice if updated for later puppies.

Image


Image

.