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 Thu 22 Jun 2017, 08:26
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
SVG/PNG Fancy Text and Logo Generator
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 8 [106 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Author Message
OscarTalks


Joined: 05 Feb 2012
Posts: 1532
Location: London, England

PostPosted: Sat 06 May 2017, 18:01    Post subject:  

Hello vovchik,

Your pre-compiled static binary does run in DpupWheezy but I wanted to test a build from source. The native bacon was too old so I compiled the latest (3.5.4) with no problems. I also grabbed the HUG file from the website as suggested. Source then compiles and runs fine. Thanks for your excellent work.

_________________
Oscar in England

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


Joined: 23 Oct 2006
Posts: 1432
Location: Ukraine

PostPosted: Sat 06 May 2017, 18:11    Post subject:  

@ musher0 and all

Just added a "yucky" diagonal pattern (best viewed with the solidify and relief filters) and incorporated a very useful mod by alexfish at basic-converter.org that prevents exiting the app by inadvertently clicking on the close button on the taskbar.

@OscarTalks

Great that that your compilation went OK. After I compile, I usually strip and upx, operations that reduce the size of the resulting HUG-based binaries by some 75%, just to keep things small. Smile
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 2159
Location: holland

PostPosted: Sun 07 May 2017, 13:03    Post subject:  

Hello vovchik,

Thanks for your beautiful program!

Tested on Debian(Dog) , first didn't run but found that a symlink libpangocairo-1.0.so > libpangocairo-1.0.so.0 is required to make it work.
So I thought changing line 59 in txt2svg.bac
Code:
CONST pango$ = "libpangocairo-1.0.so"

To:
Code:
CONST pango$ = "libpangocairo-1.0.so.0"

and recompile should do.
But when compiling I get:
Code:
root@jessie:~/src# bacon -o -Os -o -fdata-sections -o -ffunction-sections -o -Wl,--gc-sections txt2svg.bac
Converting 'txt2svg.bac'... 1157
Syntax error: could not parse line 1157 in file 'txt2svg.bac'!


Any idea what I'm possibly missing?
I should note that the error was also already when I tried before making the edit libpangocairo-1.0.so.0 in txt2svg.bac

Fred

_________________
Dog Linux website

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


Joined: 23 Oct 2006
Posts: 1432
Location: Ukraine

PostPosted: Sun 07 May 2017, 13:16    Post subject:  

Dear fredx181,

Thanks. And good that you acre trying to compile it yourself. I think you might be using an older version of bacon. Get the latest, and the latest HUG, from www.bacon-converter.org. The line that cause the stutter was:

Code:
SAVE mysvg$ TO "/tmp/txt2svg.svg"


and that syntax (SAVE TO) appeared only recently. That is probaby the only reason for the error. As for libpangocairo, I have compiled on various systems, including Mint, Tahr and Raspbian Debian for Pi, and got no errors regarding the lib location. Weird.

With kind regards,
vovchik

PS. I am posting a new version soon with hatch, crosshatch and other pattern fills. Smile
pi_20170508_00h10m00s_trebuchet_ms-153-solidify.png
 Description   
 Filesize   79.99 KB
 Viewed   318 Time(s)

pi_20170508_00h10m00s_trebuchet_ms-153-solidify.png


Last edited by vovchik on Sun 07 May 2017, 18:12; edited 1 time in total
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 2159
Location: holland

PostPosted: Sun 07 May 2017, 14:23    Post subject:  

vovchik wrote:
I think you might be using an older version of bacon


Ah, yes, thanks vovchik, compiled fine now (also needed latest hug.bac, indeed)

Quote:
As for libpangocairo, I have compiled on various systems, including Mint, Tahr and Raspbian Debian for Pi, and got no errors regarding the lib location. Weird.


For Debian-Jessie (don't know about other distros) I think the point is that the package libpango1.0-dev has the symlink libpangocairo-1.0.so, but the package libpangocairo1.0 doesn't (has only libpangocairo-1.0.so.0) see screenshot
So I'd like it to work (just to run txt2svg binary, not compiling) also without the dev package installed, which I did now, thanks again Smile

Fred
libpangocairo.png
 Description   libpangocairo-1.0.so.0 in libpangocairo1.0
 Filesize   23.51 KB
 Viewed   361 Time(s)

libpangocairo.png


_________________
Dog Linux website

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


Joined: 23 Oct 2006
Posts: 1432
Location: Ukraine

PostPosted: Sun 07 May 2017, 14:57    Post subject:  

Dear fredx181,

I checked my systems and I do have libpangocairo-1.0.so.0 on all of them, so that might be a better choice for the libname (Rasbpian is some form of Jessie). I'll experiment and ask around. Smile The reason I used what I did is that I wrote that that pango function that gets the bounding box for text a few years ago and never thought about it since. I will aslo ask Peter whether we shouldn't include that GET_SIZE function in HUG, in which case HUG's lib scanner will take care of finding a suitable lib. There is HUGLIB$("pango") in HUG already.

With kind regards,
vovchik
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 880

PostPosted: Sun 07 May 2017, 18:16    Post subject:  

Fatdog64-710, which is based on BLFS, does have /usr/lib64/libpangocairo-1.0.so.0
_________________
Fatdog64-710|+Packages|Findnrun|+forum|gtkmenuplus
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1432
Location: Ukraine

PostPosted: Mon 08 May 2017, 10:37    Post subject:  

@step: Thanks for reporting.
@all: Updated first post (8 May, evening) with new binary and source. Several new filters (glass, icy, metal, slick shadow, etc.) Smile
vovchik_20170508_23h23m05s_droid_sans-101-slick-shadow.png
 Description   
 Filesize   88.18 KB
 Viewed   229 Time(s)

vovchik_20170508_23h23m05s_droid_sans-101-slick-shadow.png

vovchik_20170508_17h41m35s_gooddog-107-metal.png
 Description   
 Filesize   77.52 KB
 Viewed   256 Time(s)

vovchik_20170508_17h41m35s_gooddog-107-metal.png

vovchik_20170508_17h23m54s_retro_stereo_wide-87-icy.png
 Description   
 Filesize   177.99 KB
 Viewed   260 Time(s)

vovchik_20170508_17h23m54s_retro_stereo_wide-87-icy.png

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

Joined: 26 Feb 2007
Posts: 3051
Location: The Blue Marble

PostPosted: Tue 09 May 2017, 00:12    Post subject:  

Vovchik, excellent work!

Suggestion: ability to save/load the "settings" (or "design" if you want to). Use case: let's say I create this nice logo, save the SVG, and exit. A few hours later I look at the SVG and say, uh oh, I should split it into two lines ... but I no longer remember exactly the parameters used to create the original. If there is a handy way to save/load the "design" that would be nice.

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1275
Location: Japan

PostPosted: Tue 09 May 2017, 00:32    Post subject:  

@vovchik: I've never missed font patterns but I miss an important font "color": transparent. I tried 'User color' from the combo box and 'none' in the entry fileld, but this does not work. It is an option in the background combo box and I think it should also be an option for the foreground. With a transparent font and a non-zero stroke-width you can build nice logos without having to fiddle too much with filters.

This is my previous example with fill='none' and stroke-width='10' and '7':
textcolor_transparent_stroke_10_7.png
 Description   
 Filesize   106.31 KB
 Viewed   204 Time(s)

textcolor_transparent_stroke_10_7.png

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


Joined: 11 Dec 2013
Posts: 2159
Location: holland

PostPosted: Tue 09 May 2017, 04:26    Post subject:  

Hi vovchik

jamesbond wrote:
Vovchik, excellent work!

Suggestion: ability to save/load the "settings" (or "design" if you want to). Use case: let's say I create this nice logo, save the SVG, and exit. A few hours later I look at the SVG and say, uh oh, I should split it into two lines ... but I no longer remember exactly the parameters used to create the original. If there is a handy way to save/load the "design" that would be nice.


Indeed that would be great, I was at the point of asking you also.

Another subject: When I complie txt2svg on Debian Stretch the result is a 'shared library' which seems to be normal these days (on newer systems) it works OK when running from terminal, but not by clicking in filemanager.
It's discussed here (and found a workaround):
http://murga-linux.com/puppy/viewtopic.php?p=946786#946786
I'd like it to be a 'real' executable
Anyone idea how to do when compiling a bacon program ?

Fred

_________________
Dog Linux website

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


Joined: 23 Oct 2006
Posts: 1432
Location: Ukraine

PostPosted: Tue 09 May 2017, 06:30    Post subject:  

@ MichiMoppel

Transparency in SVGs is achieved by the absence of RGB or RGBA values, not by drawing in a "transparent" color, which does not exist per se. So "none" for fill would just result in no pixels being given values for the color channels in question. The only way to do this, which would be useful, would be to employ an xor setting in a filter and to invert the colors of the entire image or object. I will play around with that to see whether that can be done. If you have ideas, please post.

@ jamesbond/fredx181

I will see what I could do to implement a log file (with writes activated by a save) and a viewer, which would allow selection and loading. Should be possibible without too much work. What do you think? I don't want to redo the GUI entirely, but I have room for a few buttons where the lower left images are (i.e. placeholders. Smile).

@ fredx181

I compiled normally on Tahr and Debain Jessie (Raspberry PI), and got a normal ELF executable. Stretch might be different. My compile line is in the source. I don't know the solution, but I have encountered the problem with some downloaded programs. They run, but not by clicking in ROX and they need some kind of wrapper. You can probably pass the "no-pie" parameter to gcc by augmenting my compile line and see whether that works. It would be nice if it did.
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 2159
Location: holland

PostPosted: Tue 09 May 2017, 07:21    Post subject:  

vovchik wrote:
I will see what I could do to implement a log file (with writes activated by a save) and a viewer, which would allow selection and loading. Should be possibible without too much work. What do you think? I don't want to redo the GUI entirely, but I have room for a few buttons where the lower left images are (i.e. placeholders. Smile).


Ah, thanks!!

Quote:
you can probably pass the "no-pie" parameter to gcc by augmenting my compile line and see whether that works.

I tried (on Stretch):
Code:
bacon -o -no-pie -o -Os -o -fdata-sections -o -ffunction-sections -o -Wl,--gc-sections txt2svg.bac

But still is a "shared library", but it's not that important, I can just do the compiling on Jessie and the resulting binary runs fine on Stretch also

Here's a self-made deb package "txt2svg" attached (remove fake .gz), tested on Debian Jessie and Stretch, should work on e.g. Ubuntu also, I guess.
I changed line 64 to libpangocairo-1.0.so.0 and compiled on Jessie (and stripped and upx'd)
I will try to follow if you make new version and edit this post to update the deb accordingly

EDIT 10 May 2017: Since there is no libpangocairo dependency problem anymore (vovchik has fixed it) there's no need for a deb, so attachment removed.
To run latest txt2svg on Debian/Ubuntu just dowload and unpack "tahr-32-bit-txt2svg.tar.gz" from first post and run txt2svg binary

Fred

_________________
Dog Linux website


Last edited by fredx181 on Wed 10 May 2017, 10:45; edited 1 time in total
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 3051
Location: The Blue Marble

PostPosted: Tue 09 May 2017, 09:21    Post subject:  

vovchik - yes, all that is needed is a "save/load" button on the main GUI, then another window where you can see list of saved designs (by name) and load them, plus ability to save the existing design to a given name. Or you may want to have two buttons on the main GUI called "save design" and "load design" but that may be too cramped.

fred, try this one:
Code:
bacon -o -fno-pie -o -Os -o -fdata-sections -o -ffunction-sections -o -Wl,--gc-sections txt2svg.bac

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1275
Location: Japan

PostPosted: Tue 09 May 2017, 09:55    Post subject:  

vovchik wrote:
Transparency in SVGs is achieved by the absence of RGB or RGBA values, not by drawing in a "transparent" color, which does not exist per se. So "none" for fill would just result in no pixels being given values for the color channels in question. The only way to do this, which would be useful, would be to employ an xor setting in a filter and to invert the colors of the entire image or object. I will play around with that to see whether that can be done. If you have ideas, please post.

Your answer leaves me puzzled. If "none" would "just result in no pixels being given values for the color channels", wouldn't that be what a total amateur like me could regard as "transparent"? The font has no filling, I see through to the background or - when there is no rectangle background - I see the canvas or whatever it is called. Filters are not needed for that. For the screenshot I didn't use any filters, so when you say "the only way to do this would be a xor setting in the filter" I'm totally lost. Are we talking about two different things?
Code:
<?xml version='1.0' encoding='UTF-8'?>
<svg xmlns='http://www.w3.org/2000/svg' version='1.1'
  width='201' height='295' preserveAspectRatio='none'
  xml:space='preserve' overflow='visible'
  viewBox='0 0 201 295' opacity='1'>
 <g stroke-width='7' stroke='black'
  fill='none' font-family='DejaVu Sans'
  font-size='200' font-style='normal' font-weight='normal'
  text-anchor='middle' opacity='1' dominant-baseline='central'   
  transform='translate(0,0)'
  id='dummy' >
    <text x='50%' dy='200'>A</text>
 </g>
</svg>
svg_font_nofill_nofilter.png
 Description   
 Filesize   18.9 KB
 Viewed   96 Time(s)

svg_font_nofill_nofilter.png

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 8 [106 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
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.0707s ][ Queries: 14 (0.0097s) ][ GZIP on ]