SVG/PNG Fancy Text and Logo Generator

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#81 Post by vovchik »

@ all: updated source and Tahr 32-bit binary in first post. Fixed naming bugs (patterns), improved patterns, added patterns.

Code: Select all

User GUI settings:

vovchik_20170601_15h51m59s_creepy-170-metallic.svg|Yikes!|Black|0|#FF00FF|100|1|#FFFF00|#FF0000|↓|0|Corkscrew|47|azure|100|1|#B21818|#595050|↓|0|Normal|0|0|Creepy|105|Normal|0|170|Center|0|100|Metallic|35|1|68|15|4|#B21313|0|430|180|0|-35|<EOR>

vovchik_20170601_15h37m29s_times_(west)-109-solidify.svg|COOL|Crosshatch2|48|#FF00FF|100|1|#FFFF00|#7F3808|↓|0|Splash|79|azure|100|1|#FFF6DD|#443333|↓|0|Normal|0|8|Times (West)|459|Normal|0|109|Center|0|100|Solidify|59|1|58|25|5|#FFFFDD|0|385|138|0|0|<EOR>

vovchik_20170601_14h37m20s_times_(west)-109-solidify.svg|COOL|Crosshatch2|48|#FF00FF|100|1|#FFFF00|#7F3808|↓|0|Trefoil|85|azure|100|1|#FFFFDD|#443333|↓|0|Normal|0|8|Times (West)|459|Normal|0|109|Center|0|100|Solidify|59|1|58|25|5|#FFFFDD|0|385|138|0|0|<EOR>
Attachments
vovchik_20170601_15h51m59s_creepy-170-metallic.png
(66.9 KiB) Downloaded 237 times
vovchik_20170601_15h37m29s_times_(west)-109-solidify.png
(89.89 KiB) Downloaded 238 times
vovchik_20170601_14h37m20s_times_(west)-109-solidify.png
(117.94 KiB) Downloaded 252 times
Last edited by vovchik on Thu 01 Jun 2017, 21:43, edited 1 time in total.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#82 Post by musher0 »

The man is writing the word "cool" in warm color tones! ;) Ah!
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#83 Post by vovchik »

@ musher0: Never even thought about it, but your eye is good and picks things up. I usually just type "asdf", given the 100s of times I have to test things (which gets kind of boring), and, for a change and departing from my usual debugging ritual, I decided to type "cool". :) Next time I will do something "blue".

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#84 Post by musher0 »

No problem! I was just teasing! :lol:

My way of saying: "You've done excellent work with this app, vovchik!"
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#85 Post by vovchik »

@ musher0: Your wish is my command. :)

@ all: fixed/debugged some code that could have caused problems in future with added filters/patterns. Added more patterns. Updated source and 32-bit Tahr binary in first post.

Code: Select all

User GUI settings:
vovchik_20170601_22h59m02s_droid_sans-201-glass.svg|cool|Rectangles|76|#FF00FF|100|1|#C4F8F6|#0039FF|↓|0|Hexagon|61|azure|100|1|#DBECFB|#013C5A|↓|0|Normal|0|9|Droid Sans|133|Normal|0|201|Center|0|100|Glass|19|1|100|14|3|#CACACA|1|497|266|0|0|<EOR>
Attachments
vovchik_20170601_22h55m37s_droid_sans-201-glass.png
(90.88 KiB) Downloaded 187 times
Last edited by vovchik on Thu 01 Jun 2017, 21:42, edited 1 time in total.

step
Posts: 1349
Joined: Fri 04 May 2012, 11:20

#86 Post by step »

Thanks for posting the user GUI settings :)
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#87 Post by smokey01 »

@Vovchik, is there some way to save, export and import these wonderful designs?

User avatar
souleau
Posts: 148
Joined: Sun 23 Oct 2016, 15:24

#88 Post by souleau »

smokey01 wrote:@Vovchik, is there some way to save, export and import these wonderful designs?
Whenever you save a design, it stores them in a location as an svg, a png, but there is also a log file called txt2svg.log, which serves as a template.
The default location is a folder in the root called txt2svg.
In the logfile are two lines, one for the png and one for the svg.

Code: Select all

root_20170531_11h23m18s_urw_chancery_l-56-metal.svg|Enormously Important<NL>Statement Here|Stroke only|86|#FF00FF|100|1|#FF6100|#FCF2F2|↓|0|Radial|86|azure|100|1|#740707|#595050|↖|3|Normal|0|3|URW Chancery L|23|Normal|0|56|Center|0|100|Metal|34|1|100|3|3|#F9AF74|1|662|184|0|12|<EOR>
root_20170531_11h25m16s_urw_chancery_l-56-metal.svg|Enormously Important<NL>Statement Here|Stroke only|86|#FF00FF|100|1|#FF6100|#FCF2F2|↓|0|Radial|86|azure|100|1|#740707|#070505|↖|3|Normal|0|3|URW Chancery L|23|Normal|0|56|Center|0|100|Metal|34|1|100|3|3|#F9AF74|1|662|184|0|12|<EOR>
If you would paste this code in a text editor, and save it as txt2svg.log, and save it in the ~/txt2svg folder, or append it to the existing code in a txt2svg.log, you could then start up the application, and you will see the template button at the bottom of the window. If you press that you have the option to either load the png or svg version of the image code.
What you would get, provided you have the Chancery font installed (which, probably not, but you could always change it into something else), is the image I posted a while back in this thread.

So yes, totally possible to import/export designs.

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#89 Post by vovchik »

@ souleau, smokey01:

Thanks, guys, for testing, ivnestigating and reporting. Actutally, it is even simpler than you might imagine. When you save an image, txt2svg always writes the png and svg files to $HOME/txt2svg. In that same directory, it also creates an entry for that saved design in txt2svg.log. So, in order to ressurect a saved design, simply click the "Template" button way at the bottom, and you will get a list of saved settings (listing of saves). Choose the template you want to ressurect and click the "Load" button. The program will the load the GUI with those earlier saved settings for that image. Eventually the log file might get big and some of the entries (automatic naming for convenience) might seem confusing. You can just load that log file into a text editor (geany, for example) and change the first field to something more meaningful (fields are separated by a "|"). You can also delete some entries, but be careful not to delete any fields. Eventually (soon, I think) I will write a little editor into the code that will facilitate naming those templates after the fact, template deletion, and, if I am up to it and feeling ambitious, even give an image thumbnail preview for purposes of selection, just to make things easy. :)

@ all: Will be posting an update soon, with a lot more filters and patterns; some of them very nice and/or useful, I think, some less so. :)

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#90 Post by fredx181 »

Hi vovchik,

Thanks for the Template option and all the new improvements !!

I had some trouble with adding one of your example GUI settings
Did copy and paste from your post on a newline in txt2svg.log and loaded fine, but when I saved a next one and clicked the Template button the window was empty.
I think the cause was in the copy/paste with a space at the end (see pic), after removing the space all was fine again.

Fred
Attachments
2017-06-03-172416_918x56_scrot_718x44.png
GUI setting should not end with a space
(41.13 KiB) Downloaded 87 times
root_20170603_12h29m11s_droid_sans_mono_dotted-74-burst.png
(133.68 KiB) Downloaded 91 times

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#91 Post by smokey01 »

@vovchik, just tried compiling your 3rd June version in Fatdog64-710 like:

bacon txt2svg.bac

and I get the following error:

Code: Select all

# bacon txt2svg.bac
Converting 'txt2svg.bac'... 4221
Syntax error: could not parse line 4221 in file 'txt2svg.bac': "APPEND CONCAT__b2c__string_var( DUMP_GUI__b2c__string_var(1) , NL__b2c__string_var ) TO filelog__b2c__string_var"
#
Cheers

User avatar
misko_2083
Posts: 114
Joined: Tue 08 Nov 2016, 13:42

#92 Post by misko_2083 »

smokey01 wrote:@vovchik, just tried compiling your 3rd June version in Fatdog64-710 like:

bacon txt2svg.bac

and I get the following error:

Code: Select all

# bacon txt2svg.bac
Converting 'txt2svg.bac'... 4221
Syntax error: could not parse line 4221 in file 'txt2svg.bac': "APPEND CONCAT__b2c__string_var( DUMP_GUI__b2c__string_var(1) , NL__b2c__string_var ) TO filelog__b2c__string_var"
#
Cheers
@smokey, it's compiling on Debian Jessie 64bit.
I paste the hug.bac in ~/Downloads/tahr-32-bit-txt2svg/
http://www.basic-converter.org/hug.bac
Then, I use next

Code: Select all

/usr/local/bin/bacon.sh -o -Os -o -fdata-sections -o -ffunction-sections -o -Wl,--gc-sections  ~/Downloads/tahr-32-bit-txt2svg/src/txt2svg.bac
Image

step
Posts: 1349
Joined: Fri 04 May 2012, 11:20

#93 Post by step »

@smokey01, for compiling in Fatdog64-710 you need two things: latest hug.bac (see misko_2083's link, and put it in /usr/share/bacon/libs/); update the bacon compiler (bacon-3.5.4-x86_64-1 from gslapt).
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#94 Post by smokey01 »

Thanks step & misko_2083,

I had compiled this before but I had built my own bacon but hadn't installed it. I ran it from the bacon compile directory.

The hug.bac file is not seen in the /usr/share/bacon/libs directory.

Looking at the txt2svg script, hug.bac is being call at ../hug.bac, one level up.

When I changed the txt2svg line from:

Code: Select all

INCLUDE "../hug.bac", WINDOW, BUTTON, HSLIDER, COMBO, EDIT, SPIN, \
	HSEPARATOR, VSEPARATOR, IMAGE, TEXT, GRAB$, GET, SETPROPERTY, \
	FONT, SYNC, TOGGLE, ATTACH, DISPLAY, SCREENSIZE, HUGLIB$, CHECK, \
	HUGOPTIONS, MARK, ENTRY, SHOW, HIDE, CALLBACK, INIT, SET, QUIT, \
	ENABLE, DISABLE, LIST
INIT
to

Code: Select all

INCLUDE "hug.bac", WINDOW, BUTTON, HSLIDER, COMBO, EDIT, SPIN, \
	HSEPARATOR, VSEPARATOR, IMAGE, TEXT, GRAB$, GET, SETPROPERTY, \
	FONT, SYNC, TOGGLE, ATTACH, DISPLAY, SCREENSIZE, HUGLIB$, CHECK, \
	HUGOPTIONS, MARK, ENTRY, SHOW, HIDE, CALLBACK, INIT, SET, QUIT, \
	ENABLE, DISABLE, LIST
INIT
or move the hug.bac file one level up, then it worked.

I had this same problem last time.

I think it would make sense to add the full path to the hug.bac file like:

Code: Select all

INCLUDE "/usr/share/bacon/libs/hug.bac",
at line 84.

Cheers

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#95 Post by vovchik »

@ smokey01, step & misko_2083: Thanks, guys, for compiling and testing. The reason I put HUG one level up (which is obvious from the INCLUDE ../) is that I have lots of Bacon projects and create directories for each one. As HUG is in a directory above, I use that one copy for all of them. The reason I do not put it in /usr/share/lib/bacon is that, whicle that may be a convention for some, it isn't for me. I keep all sorts of INCLUDES in the ../ dev dir for any project (canvas includes, gdk includes, gtk includes, motif includes, my own widgets, curses, fltk wrappers etc.). As I have posted at least 800 programs on the BaCon forum, I have a lot of projects and have a need for that type of organization and do not wish to use a system directory "/usr" for source code that is not meant to be universal. And I noticed that misko_2083 is using bacon.sh. While this can be done, using the compiled version (bacon binary) is some 20x faster, and I have to compile and test 20 or 30x a day. I would recommend using the compiled version simply for speed, although the bash version works fine. Have fun, guys, and post your fancy text creations. :) If you have ideas regarding filters or patterns, let me know. In future, I think it would be good to include some rotate and skew spinboxes, but that would require modifying the GUI a bit. I am thinking...

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#96 Post by smokey01 »

@vovchik, what happened to UserColor?

Or am I going blind? Apparently I am because I eventually found it. The list probably needs to be alphabetised a little better. Maybe it should be first on the list then Transparent.
Attachments
UserColor.png
How do I select colours?
(72.17 KiB) Downloaded 343 times

step
Posts: 1349
Joined: Fri 04 May 2012, 11:20

#97 Post by step »

@smokey01,
you're right, of course, I build txt2svg with an automated Fatdog64 pkgbuild script that doctors the path to hug.bac, but I had forgotten about that.

Code: Select all

sed -i 's#../hug.bac#/usr/share/bacon/libs/hug.bac#' src/txt2svg.bac
...
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#98 Post by vovchik »

@ all: UPDATED 5 June (evening) More patterns, some of them useful and nice. :)
Attachments
vovchik_20170605_22h35m57s_droid_sans-223-motion.png
(166.69 KiB) Downloaded 243 times
vovchik_20170605_18h17m10s_droid_sans-56-none.png
(14.43 KiB) Downloaded 251 times

step
Posts: 1349
Joined: Fri 04 May 2012, 11:20

#99 Post by step »

@vovchik,

thank you for the new update. When I run it from a terminal window:

(txt2svg:1780): librsvg-WARNING **: SourceA1pha not found

It it really A1pha or should it be Alpha with an L?

About usability, would you please consider a by-column combo-box lay-out for the sorted lists of filters and fonts instead of the current by-row lay-out? My eyes automatically move top-to-bottom rather than left-to-right when I click a combo-box down-arrow. So the by-row lay-out looks unsorted to me - it takes me longer to find what I'm looking for. It was acceptable when the combo-box contained just a few filters, but now with 72 filters it's time for me to ask. Thank you.
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]

User avatar
souleau
Posts: 148
Joined: Sun 23 Oct 2016, 15:24

#100 Post by souleau »

I feel a bit guilty requesting this, because it will be a challenge to incorporate this in the GUI, but is there perhaps any possibility to implement pattern and filter scaling?

I realize you're probably not jumping at the thought of adding 3 more parameter fields, so I would totally understand if this idea went to the backburner.

Post Reply