jgraph / drawio

draw.io is a JavaScript, client-side editor for general diagramming.
https://www.drawio.com
Other
40.61k stars 7.57k forks source link

Small caps in text #3140

Closed edemaine closed 8 months ago

edemaine commented 1 year ago

Is your feature request related to a problem? Please describe. I would like to be able to write "x NOR y" where NOR is actually small-caps, like this: image

Describe the solution you'd like There are already buttons for bold, italic, underline, strikethrough, subscript, and superscript. I'd like another button for small caps.

Describe alternatives you've considered The current workaround is to write the small-caps text with capital letters, select it, and manually decrease its font size. This results in something like this (sorry, slightly different font): image

But some fonts have actual small-caps variants. Wikipedia says "Well-designed small capitals are not simply scaled-down versions of normal capitals; they normally retain the same stroke weight as other letters and have a wider aspect ratio for readability."

Additional context I tried manually editing an SVG file to add <span style="font-variant: small-caps">, but this wasn't preserved when loading with diagrams.net (perhaps unsurprisingly).

stilobique commented 1 year ago

Agree with this feedback. However, all typo can't support this feature, maybe it's an issue.

stale[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information.

davidjgraph commented 8 months ago

Best to use math typesetting for this, it has the largest range of formatting. Can also use HTML if you're familiar with the syntax.