Skip to content

Render LaTeX labels with the shape's font color, instead of stroke - #2943

Open
rachtsingh wants to merge 1 commit into
d2lang:masterfrom
rachtsingh:latex-font-color
Open

rachtsingh wants to merge 1 commit into
d2lang:masterfrom
rachtsingh:latex-font-color

Conversation

@rachtsingh

Copy link
Copy Markdown

LaTeX labels were filled with the shape's stroke color, so they ignored style.font-color. This gives more flexibility to set font colors independent of the stroke (a feature I'm currently trying to use). I guess this ties it to font-color instead of stroke, but I think that's more reasonable (and you can always customize using LaTeX textcolor).

Applies to both SVG output (d2svg) and PNG/PDF/PPTX/GIF exports (d2scenebuild).

Example:

eq: |latex
  e^x
| {
  shape: rectangle
  style.stroke: black
  style.font-color: blue
}
image

LaTeX labels were filled with the shape's stroke color, so they ignored
style.font-color. This gives more flexibility to set font colors
independent of the stroke (a feature I'm currently trying to use)

Applies to both SVG output (d2svg) and PNG/PDF/PPTX/GIF exports
(d2scenebuild).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant