terrastruct / d2

D2 is a modern diagram scripting language that turns text to diagrams.
https://d2lang.com
Mozilla Public License 2.0
17.11k stars 422 forks source link

Style: Bold works, Italic works, Bold Italic doesn't #802

Open BarryNolte opened 1 year ago

BarryNolte commented 1 year ago

Ubuntu: 22.04 D2: v0.1.6

Italic renders as italic, but is 'dim' [fill:#676C7E] Combining of the bold and italic styles renders as 'dim-bold', but no slant.

x--y : Bold { style: { bold: true italic: false } }

image

x--y : Italic { style: { bold: false italic: true } }

image

x--y : BoldItalic { style: { bold: true italic: true } }

image

alixander commented 1 year ago

we don't actually have BoldItalic source sans font in D2. i've never seen it used tbh. added a tag in case someone wants to take it, i won't object, but probably won't do it myself unless someone shows a real need

BarryNolte commented 1 year ago

At the least this should spit out a warning. I don't think it's an error so much as a, "you asked to do something I can't, but I'm going to try to come close as I can". Both Word and Acrobat have similar warnings when a font is used in a document that doesn't exist on the system.

alixander commented 1 year ago

yeah we eventually want to have this category of "this'll work but we're ignoring some stuff". kind of like linting, and users can specify if they want that to stop the world or not.