asciidoctor / asciidoctor-diagram

:left_right_arrow: Asciidoctor diagram extension, with support for AsciiToSVG, BlockDiag (BlockDiag, SeqDiag, ActDiag, NwDiag), Ditaa, Erd, GraphViz, Mermaid, Msc, PlantUML, Shaape, SvgBob, Syntrax, UMLet, Vega, Vega-Lite and WaveDrom.
http://asciidoctor.org
MIT License
439 stars 107 forks source link

Support for more config options with the meme extension #391

Open justinselbo opened 2 years ago

justinselbo commented 2 years ago

I was wondering if we could get more config options for the meme extension to mark images. Such as:

pepijnve commented 2 years ago

Top and bottom margin should be trivial to do.

I'm not sure how padding would be defined, but we could do left and right margins. If that's not what you meant, could you describe what you are looking for in a bit more detail?

Font size and alignment are a bit trickier. At the moment imagemagick's best fit labels are used. It simply tries to fit the top and bottom label in an area that's as wide as the background image and 1/5th the height of the image. If a point size is specified you get exact sizing of the text and then we could left, right or center align the labels. Is that what you're looking for?

"etc." is too open ended to be actionable. If there's anything concrete that's missing, feel free to add it here.

justinselbo commented 2 years ago

Padding with left and right margins is perfect, I was thinking it could be used in conjunction with alignments. It's not really necessary more just a quality of life thing. Maybe left-margin and right-margin is a better term or way to implement it.

For font sizing/alignment that would work. I just want the option to be able to control how large the text is that is being written over the image, as it is usually too large/invasive due to the 1/5th measurement from height of the image like you mentioned. Point size seems like it would fix that. It sounds like aligning like you described would still work. Is there any way to change the height of the banner away from 1/5th of the image height? Not sure that it's very important if we can just set point size for the text anyways.

My bad, I don't have much experience opening tickets for open source software. The only other thing I can think of is being able to change the transparency of the text. However, that's not super important to me so if that is unrealistic then no worries.