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 14 Dec 2017, 11:37
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 6 of 8 [106 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Author Message
step

Joined: 04 May 2012
Posts: 953

PostPosted: Wed 31 May 2017, 02:04    Post subject:  

Hi vovchik, there was some sort of misunderstanding, I didn't explain myself well enough.

The small issue I reported, which your code update didn't address, is that it isn't possible to generate boiler-plate text at any point size but 24. Example. Leave the text input box empty. Slide the size slider to any value you want. Press Apply. It renders 24-point boiler-plate text, no matter which size you request.

Also: You wrote, "New version now resets font size slider to 56 after generating the sample text", but I don't see that happening. More importantly, I don't want that. I know, now I'm contradicting myself from my previous post; but that's part of our misunderstanding. In my previous post I thought we were talking about boiler-plate text only, not about all text in general. Anyway, since the latest version doesn't reset the slider back to 56, all is well. Keep it that way. The version I tested is:
Code:

# ls -l
total 96
drwxr-xr-x 2 ftp ftp  4096 May  3 22:51 icon
drwxr-xr-x 2 ftp ftp  4096 May  5 10:02 src
-rwxr-xr-x 1 ftp ftp 84752 May 31 00:08 txt2svg
-rwxr-xr-x 1 ftp ftp    39 May 25 00:54 Txt2Svg

One more thing, is Txt2Svg still needed? I thought you implied that SFR's language fix makes the launcher unnecessary.

_________________
Fatdog64-710|+Packages|Kodi|Findnrun|+forum|gtkmenuplus
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1442
Location: Ukraine

PostPosted: Wed 31 May 2017, 04:40    Post subject:  

Dear step,

The slider does reset to 56 after showing sample text in my latest mod (31 May - right after midnight). The reason I show the sample text at 24px is that it will go off the screen at larger font sizes. And the reason it exists in the first place is (i) so as not to generate a bad SVG when you press Apply and the box is empty and (ii) to give the user some indication about the glyphs that are contained in the font (diacriticals, cyrillic, oriental, UTF-8 symbols etc.). I myself was irritated at the font slider staying at 24px after a sample text, so my misunderstanding your request led to what I think is a good and useful mod. Smile

As for the launcher script, I only have my locale - Australia (although I'm in Europe), so I cannot really test whether SFR's mod is doing its job. I assume it is but would like feedback from somebody using a locale where then decimal separator is, for example, a comma.

With kind regards,
vovchik

Last edited by vovchik on Wed 31 May 2017, 06:07; edited 1 time in total
Back to top
View user's profile Send private message 
souleau


Joined: 23 Oct 2016
Posts: 114

PostPosted: Wed 31 May 2017, 05:33    Post subject:  

vovchik wrote:
As for the launcher script, I only have my locale - Australia (although I'm in Europe), so I cannot really test whether SFR's mod is doing its job. I assume it is but would like feedback from somebody using a locale where then decimal separator is, for example, a comma.


I have a european locale and I am happy to report that it works without a hitch for me.
root_20170531_11h25m16s_urw_chancery_l-56-metal.png
 Description   
 Filesize   63.14 KB
 Viewed   287 Time(s)

root_20170531_11h25m16s_urw_chancery_l-56-metal.png

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


Joined: 23 Oct 2006
Posts: 1442
Location: Ukraine

PostPosted: Wed 31 May 2017, 05:43    Post subject:  

Dear souleau,

Thanks for the report. I think I can safely remove the launcher script now. Smile

With kind regards,
vovchik

PS. And I see you know how to use the little app. Smile
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 953

PostPosted: Wed 31 May 2017, 07:25    Post subject:  

I see what you're saying, the slider resets to 56 but only if the text input box is empty. If the input box contains some text the slider keeps the selected size after showing the rendition. It's good, thanks.
_________________
Fatdog64-710|+Packages|Kodi|Findnrun|+forum|gtkmenuplus
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1442
Location: Ukraine

PostPosted: Thu 01 Jun 2017, 08:44    Post subject:  

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


Code:
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>
vovchik_20170601_15h51m59s_creepy-170-metallic.png
 Description   
 Filesize   66.9 KB
 Viewed   210 Time(s)

vovchik_20170601_15h51m59s_creepy-170-metallic.png

vovchik_20170601_15h37m29s_times_(west)-109-solidify.png
 Description   
 Filesize   89.89 KB
 Viewed   210 Time(s)

vovchik_20170601_15h37m29s_times_(west)-109-solidify.png

vovchik_20170601_14h37m20s_times_(west)-109-solidify.png
 Description   
 Filesize   117.94 KB
 Viewed   226 Time(s)

vovchik_20170601_14h37m20s_times_(west)-109-solidify.png


Last edited by vovchik on Thu 01 Jun 2017, 17:43; edited 1 time in total
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 11262
Location: Gatineau (Qc), Canada

PostPosted: Thu 01 Jun 2017, 10:35    Post subject:  

The man is writing the word "cool" in warm color tones! Wink Ah!
_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1442
Location: Ukraine

PostPosted: Thu 01 Jun 2017, 11:02    Post subject:  

@ 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". Smile Next time I will do something "blue".
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 11262
Location: Gatineau (Qc), Canada

PostPosted: Thu 01 Jun 2017, 12:12    Post subject:  

No problem! I was just teasing! Laughing

My way of saying: "You've done excellent work with this app, vovchik!"

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1442
Location: Ukraine

PostPosted: Thu 01 Jun 2017, 17:07    Post subject:  

@ musher0: Your wish is my command. Smile

@ 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:
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>
vovchik_20170601_22h55m37s_droid_sans-201-glass.png
 Description   
 Filesize   90.88 KB
 Viewed   159 Time(s)

vovchik_20170601_22h55m37s_droid_sans-201-glass.png


Last edited by vovchik on Thu 01 Jun 2017, 17:42; edited 1 time in total
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 953

PostPosted: Thu 01 Jun 2017, 17:18    Post subject:  

Thanks for posting the user GUI settings Smile
_________________
Fatdog64-710|+Packages|Kodi|Findnrun|+forum|gtkmenuplus
Back to top
View user's profile Send private message 
smokey01


Joined: 30 Dec 2006
Posts: 2659
Location: South Australia

PostPosted: Sat 03 Jun 2017, 04:06    Post subject:  

@Vovchik, is there some way to save, export and import these wonderful designs?
_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
souleau


Joined: 23 Oct 2016
Posts: 114

PostPosted: Sat 03 Jun 2017, 08:38    Post subject:  

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:
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.
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1442
Location: Ukraine

PostPosted: Sat 03 Jun 2017, 10:04    Post subject:  

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

@ 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. Smile
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 2634
Location: holland

PostPosted: Sat 03 Jun 2017, 11:38    Post subject:  

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
2017-06-03-172416_918x56_scrot_718x44.png
 Description   GUI setting should not end with a space
 Filesize   41.13 KB
 Viewed   61 Time(s)

2017-06-03-172416_918x56_scrot_718x44.png

root_20170603_12h29m11s_droid_sans_mono_dotted-74-burst.png
 Description   
 Filesize   133.68 KB
 Viewed   65 Time(s)

root_20170603_12h29m11s_droid_sans_mono_dotted-74-burst.png


_________________
Dog Linux website
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 6 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.0670s ][ Queries: 14 (0.0078s) ][ GZIP on ]