txt2svg - logo generator
Apr 30, 2017 20:14:23 GMT 1
Post by vovchik on Apr 30, 2017 20:14:23 GMT 1
Dear all,
I have been working on a little application to generate fancy text using svg filters. Here is a little HUG-based app that does that and deposits the results (svgs and pngs) in $HOME/txt2svg (a directory it creates the first time it is run). Use the latest HUG. It is still a work in progress, and can certainly be improved. Have fun. All improvements/bug fixes are welcome. I tested on Mint-32 and Raspberrry PI Raspbian, and it works.
With kind regards,
vovchik
UPDATED: 1 May 2017. Fixed the needless approximation in the bounding box calculation by using pango. Much better, and accurate.
UPDATED: 2 May 2017: Added a few enhancements.
UPDATED: 5 May 2017: Better internal handling of default font. Display window now closes after save.
UPDATED: 5 May 2017: Peter's fix for pango_layout_get_pixel_size included, as is a radial gradient option (accessed via combo box colors under "Radial").
UPDATED: 5 May 2017 (evening) New filters (Bevel, Distort, Shadow Drop and Warp).
UPDATED: 6 May 2017 (afternoon) MochiMoppel, Puppy linux forum, suggested a spinbox for stroke-width. Implemented and very useful.
UPDATED: 6 May 2017 (late afternoon) musher0, Puppy linux forum, using a French locale, had SVGs generated containing commas as decimal separators - and the vertical placement of text elements was not working. I though I had solved it by placing SETENVIRON "LC_NUMERIC", "C" at the start of the code but that is not working. Launching by LANG=en_CA.utf8;txt2svg seems to work.
UPDATED: 6 May 2017 (early evening) Added pattern handing.
UPDATED: 7 May 2017 (just past midnight) Included Alex's very useful mod that prevents a taskbar closure of the image window, which would needlessly crash the app. Added a "Diagonal" pattern.
UPDATED: 7 May 2017 (evening) Added hatch, crosshatch and candystripe patterns.
UPDATED: 8 May 2017 (afternoon) Added Glass, Icy and Metal filters.
UPDATED: 8 May 2017 (evening) Added more filters, including slick shadow.
UPDATED 10 May 2017 (morning) Fixed positioning of bounding box and transparency when that option is selected. Added a few more filters. Also added a "Stroke only" option in the font color combobox.
UPDATED 12 May (evening) Added saving and loading from Templates. New button on main window. Other little enhancements.
UPDATED 14 May (evening) Added 10 new filters.
UPDATED 17 May (evening) Added 7 new filters (Fluid Fantasy is nice). Also put all filters into a string array.
UPDATED 21 May (evening) Added more filters and patterns, and re-organized some bits of code.
UPDATED 24 May (morning) Added more filters and patters. Fixed some grad fill in patterns.
UPDATED 25 May (after midnight) Added more filters/patterns and a tiny launch script to prevent locale problems associated with decimal delimiters in generated svg files.
UPDATED 25 May (evening) More patterns and better fills. Also no need for script launcher as SRF (Puppy Linux Forum) has solved the locale problem (decimal separator) and the fix is now in the code.
UPDATED 27 May (afternoon) Added all sorts of interesting pattern fills.
UPDATED 30 May (afternoon) Added more pattern fills, cleaned code and did some code golfing.
UPDATED 30 May (early evening) Fixed a few bugs - some wrong filters being selected due to naming "conflicts".
UPDATED 31 May (midnight) More little bug fixes in patterm/filter naming/lookup.
UPDATED 1 June (afternoon) Fixed a few naming bugs in patterns, improved patterns, added patterns.
UPDATED 1 June (evening): Fixed/debugged some code that could have caused problems in future with added filters/patterns. Added more patterns.
UPDATED 3 June (afternoon) A few bug fixes. Additional patterns and filters.
UPDATED 5 June (evening) More patterns, some of them useful and nice.
UPDATED 7 June (evening) A few patterns and added rotation and X/Y axis skewing (still working out placement and autoscaling bits, but it works).
UPDATED 10 June (afternoon): did a bit of work on the size of a bounding box with rotation. More work needed.
I have been working on a little application to generate fancy text using svg filters. Here is a little HUG-based app that does that and deposits the results (svgs and pngs) in $HOME/txt2svg (a directory it creates the first time it is run). Use the latest HUG. It is still a work in progress, and can certainly be improved. Have fun. All improvements/bug fixes are welcome. I tested on Mint-32 and Raspberrry PI Raspbian, and it works.
With kind regards,
vovchik
UPDATED: 1 May 2017. Fixed the needless approximation in the bounding box calculation by using pango. Much better, and accurate.
UPDATED: 2 May 2017: Added a few enhancements.
UPDATED: 5 May 2017: Better internal handling of default font. Display window now closes after save.
UPDATED: 5 May 2017: Peter's fix for pango_layout_get_pixel_size included, as is a radial gradient option (accessed via combo box colors under "Radial").
UPDATED: 5 May 2017 (evening) New filters (Bevel, Distort, Shadow Drop and Warp).
UPDATED: 6 May 2017 (afternoon) MochiMoppel, Puppy linux forum, suggested a spinbox for stroke-width. Implemented and very useful.
UPDATED: 6 May 2017 (late afternoon) musher0, Puppy linux forum, using a French locale, had SVGs generated containing commas as decimal separators - and the vertical placement of text elements was not working. I though I had solved it by placing SETENVIRON "LC_NUMERIC", "C" at the start of the code but that is not working. Launching by LANG=en_CA.utf8;txt2svg seems to work.
UPDATED: 6 May 2017 (early evening) Added pattern handing.
UPDATED: 7 May 2017 (just past midnight) Included Alex's very useful mod that prevents a taskbar closure of the image window, which would needlessly crash the app. Added a "Diagonal" pattern.
UPDATED: 7 May 2017 (evening) Added hatch, crosshatch and candystripe patterns.
UPDATED: 8 May 2017 (afternoon) Added Glass, Icy and Metal filters.
UPDATED: 8 May 2017 (evening) Added more filters, including slick shadow.
UPDATED 10 May 2017 (morning) Fixed positioning of bounding box and transparency when that option is selected. Added a few more filters. Also added a "Stroke only" option in the font color combobox.
UPDATED 12 May (evening) Added saving and loading from Templates. New button on main window. Other little enhancements.
UPDATED 14 May (evening) Added 10 new filters.
UPDATED 17 May (evening) Added 7 new filters (Fluid Fantasy is nice). Also put all filters into a string array.
UPDATED 21 May (evening) Added more filters and patterns, and re-organized some bits of code.
UPDATED 24 May (morning) Added more filters and patters. Fixed some grad fill in patterns.
UPDATED 25 May (after midnight) Added more filters/patterns and a tiny launch script to prevent locale problems associated with decimal delimiters in generated svg files.
UPDATED 25 May (evening) More patterns and better fills. Also no need for script launcher as SRF (Puppy Linux Forum) has solved the locale problem (decimal separator) and the fix is now in the code.
UPDATED 27 May (afternoon) Added all sorts of interesting pattern fills.
UPDATED 30 May (afternoon) Added more pattern fills, cleaned code and did some code golfing.
UPDATED 30 May (early evening) Fixed a few bugs - some wrong filters being selected due to naming "conflicts".
UPDATED 31 May (midnight) More little bug fixes in patterm/filter naming/lookup.
UPDATED 1 June (afternoon) Fixed a few naming bugs in patterns, improved patterns, added patterns.
UPDATED 1 June (evening): Fixed/debugged some code that could have caused problems in future with added filters/patterns. Added more patterns.
UPDATED 3 June (afternoon) A few bug fixes. Additional patterns and filters.
UPDATED 5 June (evening) More patterns, some of them useful and nice.
UPDATED 7 June (evening) A few patterns and added rotation and X/Y axis skewing (still working out placement and autoscaling bits, but it works).
UPDATED 10 June (afternoon): did a bit of work on the size of a bounding box with rotation. More work needed.