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
37 stars 4 forks source link

Improvements #13

Open fire-bot opened 4 years ago

fire-bot commented 4 years ago

Sent by Matthias E.. Created by fire.


Dear Shane Carr,

I really like your Card Creatr Studio and find it quite useful. If there is any chance you continue the development I would love to see two more features.

1. a card group option would be awesome (bundle cards in folders)

2. add PUG support for text (multiline). I really miss this cause I can't add colors or bold/italic stuff to the text. Or do I miss something?

In any case keep up the great work!

Best regards

Matthias Eichner

skylord-a52 commented 4 months ago

Agreed on the second point. Some method of inline formatting support (whether that's Pug, HTML, markdown, etc) would be very helpful.

This issue provides a way to inject HTML into card text. But it's more than a bit of a hack and requires knowledge of HTML, CSS, and Pug to understand and extend. Doing things like changing the font size or globally changing the font color require either manually typing them in your field, or defining a CSS style in Pug. Both of which, as far as I can tell, don't allow accessing variables.

style.
    .cardbody {
        font-size=10;
        color: white; // using the "font_color" field defined elsewhere doesn't work.
    }

foreignObject(x=0, y=130, width=180, height=100)
    div(class="cardbody") !{body}
sffc commented 4 months ago

The g element in SVG is similar to the div element in HTML and you can apply styles to it. The +text and +textWrap pseudo elements also accept styles.

To create bold or italic text, currently you should add a bold or italic font. To make just a few letters boldface out of a larger text block, you may have success using https://boldtext.io/ paired with a full Unicode font such as the built-in Deja Vu Sans.