Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 02 Aug 2014, 01:05
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Pfont2
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [23 Posts]   Goto page: Previous 1, 2
Author Message
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Thu 07 Jul 2011, 10:34    Post subject:  

@ Maik.Murks:

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

Code:
<action>gfontsel &</action>

with
Code:
<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 Smile 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.
Back to top
View user's profile Send private message 
maik.murks


Joined: 28 Mar 2011
Posts: 331
Location: at home, at work or on holidays

PostPosted: Thu 07 Jul 2011, 12:50    Post subject:  

vovchik wrote:
@ Maik.Murks:

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

Code:
<action>gfontsel &</action>

with
Code:
<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 Very Happy
Thank you very much for your help and your patience with me Very Happy

Cheers Wink

Maik.Murks
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Thu 07 Jul 2011, 13:10    Post subject: good news  

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 Smile 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
Back to top
View user's profile Send private message 
darkcity


Joined: 23 May 2010
Posts: 2436
Location: near here

PostPosted: Sat 03 Sep 2011, 05:20    Post subject:  

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 ; -)

_________________
helping Wiki for help | IF SendSpace link = "dead" THEN PM me ("up file to http://meownplanet.net/")
Back to top
View user's profile Send private message Visit poster's website 
disciple

Joined: 20 May 2006
Posts: 6427
Location: Auckland, New Zealand

PostPosted: Sat 03 Sep 2011, 06:39    Post subject:  

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 Sad), but I didn't quite have the expertise to write one myself.

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!

Last edited by disciple on Sat 03 Sep 2011, 07:09; edited 1 time in total
Back to top
View user's profile Send private message 
darkcity


Joined: 23 May 2010
Posts: 2436
Location: near here

PostPosted: Sat 03 Sep 2011, 06:53    Post subject:  

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?
Back to top
View user's profile Send private message Visit poster's website 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Tue 23 Oct 2012, 10:40    Post subject:  

Great, works for me on Slacko 5.3.3 Smile

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
Back to top
View user's profile Send private message Visit poster's website 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Wed 31 Oct 2012, 12:50    Post subject:  

Hi vovchik

Can I recommend something?

In pfont2, in function make_gui() there is an entry widget for the filename, add this:
Code:
<default>"'$1'"</default>

In pfont2, at the bottom where make_gui is called, change it to this:
Code:
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:
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 Smile

Regards,
Thunor
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 2 of 2 [23 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0702s ][ Queries: 12 (0.0069s) ][ GZIP on ]