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 Wed 03 Sep 2014, 03:33
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
GUI text-size utility gets width & height of text.
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 5016
Location: Arizona, U.S.A.

PostPosted: Wed 04 Dec 2013, 00:57    Post subject:  GUI text-size utility gets width & height of text.  

I posted this useful dev`s tool for sizing GUI text widgets.

# Now it takes Bash piped stdin, so it can do a list all at once
Example: echo -e 'abc\n01234567\n\n\nzzzzz' | /root/0_BaCon/label_pixels2/text-size -f Sans 20

# It also now takes /path/file as last argument to input a list.
Example: /root/0_BaCon/label_pixels2/text-size -l -w /root/0_BaCon/label_pixels2/test.tx

It reports the pixel size of each line, or it can report the entire list's block of text.
Before it only took one line at a time as an argument.

Now it can also work without trailing arguments. There are default: Font, W/H, & Angle.

It will output any combination of: PixelWidth:PixelHeight:TextLines ( so no parsing the output )


It`s written in BaCon, and it`s compiled on Precise-5.4.X.5. If problems I'll post code.
It`s UPXed, so hopefully it works with most Linuxes. If not, say so and I`ll post non UPXed.

For help type in rxvt: text-size -?

### Notice how the menu text is both Left & Right justified, making the buttons all the same width.
.
text-size.zip
Description  UnZip and move to: /usr/bin
zip

 Download 
Filename  text-size.zip 
Filesize  19.75 KB 
Downloaded  105 Time(s) 
Menu_Xfe.png
 Description   
 Filesize   69.67 KB
 Viewed   187 Time(s)

Menu_Xfe.png

Back to top
View user's profile Send private message 
slavvo67

Joined: 12 Oct 2012
Posts: 372
Location: The other Mr. 305

PostPosted: Fri 31 Jan 2014, 23:08    Post subject:  

Hi Sunburnt:

Forgive me but I'm curious what this application would be used for. I gather for document conversions or to confirm you have the same size text in an entire document?

Thanks and best regards,

Slavvo67
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5016
Location: Arizona, U.S.A.

PostPosted: Sat 01 Feb 2014, 14:56    Post subject:  

Hi slavvo67; Mostly I use it for text placement, as the pic shows.
The buttons have both left-justified and right-justified text on them.

Here is my original post that shows it`s markup text ability.
http://www.murga-linux.com/puppy/viewtopic.php?t=88292
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.0427s ][ Queries: 12 (0.0058s) ][ GZIP on ]