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.
.
GUI text-size utility gets width & height of text.
GUI text-size utility gets width & height of text.
- Attachments
-
- text-size.zip
- UnZip and move to: /usr/bin
- (19.75 KiB) Downloaded 228 times
-
- Menu_Xfe.png
- (69.67 KiB) Downloaded 240 times
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
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