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
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.

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

root_20170606_23h31m05s_comic_sans_ms-195-wetpaint

#101 Post by smokey01 »

This is a lot of fun.
Attachments
root_20170606_23h31m05s_comic_sans_ms-195-wetpaint.png
(154.45 KiB) Downloaded 191 times

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

#102 Post by vovchik »

@ all: thanks for testing and feedback. I am working on a few enhancements involving rotation and skewing axes. My code seems to be working, but I am still trying to figure out some things regarding autoscaling and x and y origins after transforms. It may take a while to finesse these features (after which I will post), but here are some examples.
Attachments
vovchik_20170607_19h58m21s_droid_sans-177-solidify.png
(129.76 KiB) Downloaded 129 times
vovchik_20170607_19h22m11s_droid_sans-83-pointlighting.png
(108.56 KiB) Downloaded 133 times
vovchik_20170607_19h52m07s_droid_sans-138-metallic.png
(34.87 KiB) Downloaded 132 times

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

#103 Post by musher0 »

What? Rotations?

Geez, vovchik, you have too much imagination !!! :lol: ;)

But keep going, man, keep going !!! :)

BFN.
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

#104 Post by vovchik »

@ smokey01 and musher0: Thanks guys.

@ all: am now posting a preliminary version with rotation and skewing on the X and Y axes. Still working out autosizing and placement, but it works in principle. Also attached is my template for the attached pic.
Attachments
usergui.txt.tar.gz
(328 Bytes) Downloaded 149 times
vovchik_20170607_23h21m03s_droid_sans-136-gummibearshadow.png
(87.03 KiB) Downloaded 116 times

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

#105 Post by step »

Great! So the background gradient is rotated with the foreground object.
edit: No, not always at least; replacing Xblur with ColorStripeThin shows horizontal lines as background behind the rotated text.
[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

#106 Post by vovchik »

@ step: I am only doing the transforms on the text object at the moment, but also transforming backgrounds is an idea. I'll give it some thought and experiment. The filters are subject to the transform, since they are linked to the text object, and some may, unfortunatelty, not work as expected. I am investigating.

Post Reply