sffc / card-creatr-studio

Software for creating card game prototypes, made for Mac, Windows, and Linux. Powered by Electron and Vue.
GNU General Public License v3.0
42 stars 4 forks source link

Similar project #11

Closed fire-bot closed 4 years ago

fire-bot commented 4 years ago

Sent by Dmitry Yatcenko. Created by fire.


DeCard.exe: program for design/translation/redesign of card games.
Allows you to create set of the same type cards according to the template, by replacing text and pictures.

WITHOUT UNDERSTANDING SVG FORMAT WORK WITH THE PROGRAM IS IMPOSSIBLE!

The program works with images in SVG format and a text table with a separator <Tab> (supported by GoogleTable):
using macros [<column number>] - [1], [2] ... [xxx] substitutes the values of the text cells
tables into the displayed text or SVG attributes (color, visibility, font size, image link ... any SVG attributes!).

The native SVG 1.1 does not support text with images and auto-wrapping text, 
(later versions are still at draft level and do not have a rendering engine) 
but DeCard handles this:

For <text> with a (non-standard) tag <rect width = "???" height = "???" /> works auto-wrapping,
the macro [P] starts a new line, and the prefix [Z] activate text scalling (by decreasing the font size).

For HTML objects of type <foreignObject>, conversion to native SVG is performed.
If the specified height is not enough, vertical centering is performed.
The following HTML tags are processed:
<b> ... </b> <i> ... </i> <u> ... </u>
<p> ... </p> <br/> <hr />
<div align = "left / center / right"> ... </div>
<font size = "1..7" face = "Arial / Comic Sans MS / ..." color = "" text-indent = ""> ... </font>
<img src = "bitmap file" width = "xxx" height = "yyy" />
<use src = "# defs ref" width = "xxx" height = "yyy" />
<use src = "clipart.svg # ref" width = "xxx" height = "yyy" />

The SVG template can be developed in a third-party SVG (or text) editor, in the program itself there are minimal possibilities for this.
Also, for any tag (with all its nesting), the text replacement block works in the program:
For example - in the text table inside the cell for HTML-block use the macro "Gain 2[berries].", and the program perform the replacement:
[berries] = <use src = "# berry" width = "60" height = "50" />
[resin] = <use src = "# resin" width = "60" height = "50" />
...

The program is written in Delphi7, the source code is attached.

Author: Dmitry Yatsenko
[yatcenko@gmail.com](mailto:yatcenko@gmail.com)
(ready to help with templates for free)

The program does not require installation, just unzip the archive.
Third-party utilities are used for rendering in PNG, creating and combining PDFs:
(PDF export is not compatible with SVG filters)

Core rendering library
<https://github.com/RazrFalcon/resvg>
The program comes with a 32-bit version of the libraries; 
in the Win64 system, replace the files from the Render64.zip archive

Helper rendering library 
<https://opensourcepack.blogspot.com/2012/06/rsvg-convert-svg-image-conversion-tool.html>

PDF merge tool 
<https://community.coherentpdf.com/>

SVG format description
<https://www.w3.org/Graphics/SVG/>

https://drive.google.com/drive/folders/1NVAJs--uTpCYR3gauDGULkRTOfhTpZZk

sffc commented 4 years ago

Thanks for the info. Feel free to send a PR to upstream some of this additional functionality.