From 65d36215f96aa43aa8fe4ef252fda5e943db2b5b Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 16 Mar 2023 15:02:06 -0700 Subject: [PATCH] fix monospaced edge labels --- d2graph/d2graph.go | 7 +- .../testdata/dots-real/sketch.exp.svg | 168 ++++++++-------- .../TestCLI_E2E/internal_linked_pdf.exp.pdf | Bin 81564 -> 81564 bytes e2etests/stable_test.go | 5 + .../patterns/real-lines/dagre/board.exp.json | 48 ++--- .../patterns/real-lines/dagre/sketch.exp.svg | 174 ++++++++--------- .../patterns/real/dagre/board.exp.json | 36 ++-- .../patterns/real/dagre/sketch.exp.svg | 168 ++++++++-------- .../stable/mono-edge/dagre/board.exp.json | 180 ++++++++++++++++++ .../stable/mono-edge/dagre/sketch.exp.svg | 109 +++++++++++ .../stable/mono-edge/elk/board.exp.json | 171 +++++++++++++++++ .../stable/mono-edge/elk/sketch.exp.svg | 109 +++++++++++ .../stable/mono-font/dagre/board.exp.json | 14 +- .../stable/mono-font/dagre/sketch.exp.svg | 164 ++++++++-------- .../stable/mono-font/elk/board.exp.json | 14 +- .../stable/mono-font/elk/sketch.exp.svg | 164 ++++++++-------- 16 files changed, 1055 insertions(+), 476 deletions(-) create mode 100644 e2etests/testdata/stable/mono-edge/dagre/board.exp.json create mode 100644 e2etests/testdata/stable/mono-edge/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/stable/mono-edge/elk/board.exp.json create mode 100644 e2etests/testdata/stable/mono-edge/elk/sketch.exp.svg diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index 6bd17ca84..ac75889f2 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -1424,8 +1424,13 @@ func (g *Graph) SetDimensions(mtexts []*d2target.MText, ruler *textmeasure.Ruler if g.Theme != nil && g.Theme.SpecialRules.CapsLock { edge.Attributes.Label.Value = strings.ToUpper(edge.Attributes.Label.Value) } + usedFont := fontFamily + if edge.Attributes.Style.Font != nil { + f := d2fonts.D2_FONT_TO_FAMILY[edge.Attributes.Style.Font.Value] + usedFont = &f + } - dims := GetTextDimensions(mtexts, ruler, edge.Text(), fontFamily) + dims := GetTextDimensions(mtexts, ruler, edge.Text(), usedFont) if dims == nil { return fmt.Errorf("dimensions for edge label %#v not found", edge.Text()) } diff --git a/d2renderers/d2sketch/testdata/dots-real/sketch.exp.svg b/d2renderers/d2sketch/testdata/dots-real/sketch.exp.svg index 6af97984a..a7a278fb3 100644 --- a/d2renderers/d2sketch/testdata/dots-real/sketch.exp.svg +++ b/d2renderers/d2sketch/testdata/dots-real/sketch.exp.svg @@ -1,16 +1,16 @@ - + .d2-2398127276 .fill-N1{fill:#0A0F25;} + .d2-2398127276 .fill-N2{fill:#676C7E;} + .d2-2398127276 .fill-N3{fill:#9499AB;} + .d2-2398127276 .fill-N4{fill:#CFD2DD;} + .d2-2398127276 .fill-N5{fill:#DEE1EB;} + .d2-2398127276 .fill-N6{fill:#EEF1F8;} + .d2-2398127276 .fill-N7{fill:#FFFFFF;} + .d2-2398127276 .fill-B1{fill:#0D32B2;} + .d2-2398127276 .fill-B2{fill:#0D32B2;} + .d2-2398127276 .fill-B3{fill:#E3E9FD;} + .d2-2398127276 .fill-B4{fill:#E3E9FD;} + .d2-2398127276 .fill-B5{fill:#EDF0FD;} + .d2-2398127276 .fill-B6{fill:#F7F8FE;} + .d2-2398127276 .fill-AA2{fill:#4A6FF3;} + .d2-2398127276 .fill-AA4{fill:#EDF0FD;} + .d2-2398127276 .fill-AA5{fill:#F7F8FE;} + .d2-2398127276 .fill-AB4{fill:#EDF0FD;} + .d2-2398127276 .fill-AB5{fill:#F7F8FE;} + .d2-2398127276 .stroke-N1{stroke:#0A0F25;} + .d2-2398127276 .stroke-N2{stroke:#676C7E;} + .d2-2398127276 .stroke-N3{stroke:#9499AB;} + .d2-2398127276 .stroke-N4{stroke:#CFD2DD;} + .d2-2398127276 .stroke-N5{stroke:#DEE1EB;} + .d2-2398127276 .stroke-N6{stroke:#EEF1F8;} + .d2-2398127276 .stroke-N7{stroke:#FFFFFF;} + .d2-2398127276 .stroke-B1{stroke:#0D32B2;} + .d2-2398127276 .stroke-B2{stroke:#0D32B2;} + .d2-2398127276 .stroke-B3{stroke:#E3E9FD;} + .d2-2398127276 .stroke-B4{stroke:#E3E9FD;} + .d2-2398127276 .stroke-B5{stroke:#EDF0FD;} + .d2-2398127276 .stroke-B6{stroke:#F7F8FE;} + .d2-2398127276 .stroke-AA2{stroke:#4A6FF3;} + .d2-2398127276 .stroke-AA4{stroke:#EDF0FD;} + .d2-2398127276 .stroke-AA5{stroke:#F7F8FE;} + .d2-2398127276 .stroke-AB4{stroke:#EDF0FD;} + .d2-2398127276 .stroke-AB5{stroke:#F7F8FE;} + .d2-2398127276 .background-color-N1{background-color:#0A0F25;} + .d2-2398127276 .background-color-N2{background-color:#676C7E;} + .d2-2398127276 .background-color-N3{background-color:#9499AB;} + .d2-2398127276 .background-color-N4{background-color:#CFD2DD;} + .d2-2398127276 .background-color-N5{background-color:#DEE1EB;} + .d2-2398127276 .background-color-N6{background-color:#EEF1F8;} + .d2-2398127276 .background-color-N7{background-color:#FFFFFF;} + .d2-2398127276 .background-color-B1{background-color:#0D32B2;} + .d2-2398127276 .background-color-B2{background-color:#0D32B2;} + .d2-2398127276 .background-color-B3{background-color:#E3E9FD;} + .d2-2398127276 .background-color-B4{background-color:#E3E9FD;} + .d2-2398127276 .background-color-B5{background-color:#EDF0FD;} + .d2-2398127276 .background-color-B6{background-color:#F7F8FE;} + .d2-2398127276 .background-color-AA2{background-color:#4A6FF3;} + .d2-2398127276 .background-color-AA4{background-color:#EDF0FD;} + .d2-2398127276 .background-color-AA5{background-color:#F7F8FE;} + .d2-2398127276 .background-color-AB4{background-color:#EDF0FD;} + .d2-2398127276 .background-color-AB5{background-color:#F7F8FE;} + .d2-2398127276 .color-N1{color:#0A0F25;} + .d2-2398127276 .color-N2{color:#676C7E;} + .d2-2398127276 .color-N3{color:#9499AB;} + .d2-2398127276 .color-N4{color:#CFD2DD;} + .d2-2398127276 .color-N5{color:#DEE1EB;} + .d2-2398127276 .color-N6{color:#EEF1F8;} + .d2-2398127276 .color-N7{color:#FFFFFF;} + .d2-2398127276 .color-B1{color:#0D32B2;} + .d2-2398127276 .color-B2{color:#0D32B2;} + .d2-2398127276 .color-B3{color:#E3E9FD;} + .d2-2398127276 .color-B4{color:#E3E9FD;} + .d2-2398127276 .color-B5{color:#EDF0FD;} + .d2-2398127276 .color-B6{color:#F7F8FE;} + .d2-2398127276 .color-AA2{color:#4A6FF3;} + .d2-2398127276 .color-AA4{color:#EDF0FD;} + .d2-2398127276 .color-AA5{color:#F7F8FE;} + .d2-2398127276 .color-AB4{color:#EDF0FD;} + .d2-2398127276 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]> @@ -159,9 +159,9 @@ -NETWORKD2 Parser+readerio.RuneReader+readerPosd2ast.Position-lookahead[]rune#peekn(n int)(s string, eof bool)+peek()(r rune, eof bool)+rewind()void+commit()voidCELL TOWERSATELLITESTRANSMITTER SEND SEND SEND - - - - +NETWORKD2 Parser+readerio.RuneReader+readerPosd2ast.Position-lookahead[]rune#peekn(n int)(s string, eof bool)+peek()(r rune, eof bool)+rewind()void+commit()voidCELL TOWERSATELLITESTRANSMITTER SEND SEND SEND + + + + \ No newline at end of file diff --git a/e2etests-cli/testdata/TestCLI_E2E/internal_linked_pdf.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/internal_linked_pdf.exp.pdf index d282d63263fe94e891bf9caef4e76984a190e026..b625223cbc60ab94eae3233e3902bd4b40cdb5d1 100644 GIT binary patch delta 190 zcmbR9mu1dhmJOxy(`)z`l_yv4sGlsMz`vPur*r6Jsb+)iK+%=jlQni2O!jJ40ZJE6 ze$dQ5`ST93&FTuDlcxLdF&b?4YQASOUDb+l>vSG#MlDuj1p|ek>DR3ob*GzIGiE58 z8JZdx8d+*`>HFrVxFnXODrmS^85tNE8yFix<+dNRW;A2cF)%PSQ!oGlg**i=FvG;q T$ifg!%*@Qf*kZb}9b+W`w+%S< delta 195 zcmbR9mu1dhmJOxy)7@DaRVL4nFPwgtm63fi-y-(O;tKqmRTh0tnw(i`upKCU&t$UG zLW9XOOO=7@>L-gX;@_;M;2b(#oR!gF^UTtf+S6677`IO6v1Zg_HC8ZC2%3J~icxpE znKfgEvZLtONjm#5eH( diff --git a/e2etests/stable_test.go b/e2etests/stable_test.go index 7391a6e2a..adda8b862 100644 --- a/e2etests/stable_test.go +++ b/e2etests/stable_test.go @@ -135,6 +135,11 @@ logs: { shape: page; style.multiple: true } network.data processor -> api server `, }, + { + name: "mono-edge", + script: `direction: right +x -> y: hi { style.font: mono }`, + }, { name: "mono-font", script: `satellites: SATELLITES { diff --git a/e2etests/testdata/patterns/real-lines/dagre/board.exp.json b/e2etests/testdata/patterns/real-lines/dagre/board.exp.json index 47989de39..82f61f9b5 100644 --- a/e2etests/testdata/patterns/real-lines/dagre/board.exp.json +++ b/e2etests/testdata/patterns/real-lines/dagre/board.exp.json @@ -10,7 +10,7 @@ "x": 0, "y": 41 }, - "width": 333, + "width": 334, "height": 640, "opacity": 1, "strokeDash": 0, @@ -52,7 +52,7 @@ "x": 20, "y": 106 }, - "width": 293, + "width": 294, "height": 545, "opacity": 1, "strokeDash": 0, @@ -91,7 +91,7 @@ "id": "NETWORK.CELL TOWER.satellites", "type": "stored_data", "pos": { - "x": 86, + "x": 87, "y": 195 }, "width": 161, @@ -132,7 +132,7 @@ "id": "NETWORK.CELL TOWER.transmitter", "type": "rectangle", "pos": { - "x": 91, + "x": 92, "y": 496 }, "width": 151, @@ -173,7 +173,7 @@ "id": "costumes", "type": "sql_table", "pos": { - "x": 373, + "x": 374, "y": 100 }, "width": 311, @@ -330,7 +330,7 @@ "id": "monsters", "type": "sql_table", "pos": { - "x": 373, + "x": 374, "y": 401 }, "width": 311, @@ -506,7 +506,7 @@ "italic": true, "bold": false, "underline": false, - "labelWidth": 37, + "labelWidth": 38, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, @@ -516,15 +516,15 @@ "y": 262 }, { - "x": 107.8, + "x": 108, "y": 355.6 }, { - "x": 107.8, + "x": 108.05, "y": 402.6 }, { - "x": 151, + "x": 151.25, "y": 497 } ], @@ -555,25 +555,25 @@ "italic": true, "bold": false, "underline": false, - "labelWidth": 37, + "labelWidth": 38, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, "route": [ { - "x": 166, + "x": 167, "y": 262 }, { - "x": 166.4, + "x": 167, "y": 355.6 }, { - "x": 166.5, + "x": 167, "y": 402.6 }, { - "x": 166.5, + "x": 167, "y": 497 } ], @@ -604,25 +604,25 @@ "italic": true, "bold": false, "underline": false, - "labelWidth": 37, + "labelWidth": 38, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, "route": [ { - "x": 182, + "x": 183, "y": 262 }, { - "x": 225.2, + "x": 226, "y": 355.6 }, { - "x": 225.2, + "x": 225.95, "y": 402.6 }, { - "x": 182, + "x": 182.75, "y": 497 } ], @@ -659,19 +659,19 @@ "labelPercentage": 0, "route": [ { - "x": 528.5, + "x": 529.5, "y": 280 }, { - "x": 528.5, + "x": 529.5, "y": 328.4 }, { - "x": 528.5, + "x": 529.5, "y": 352.7 }, { - "x": 528.5, + "x": 529.5, "y": 401.5 } ], diff --git a/e2etests/testdata/patterns/real-lines/dagre/sketch.exp.svg b/e2etests/testdata/patterns/real-lines/dagre/sketch.exp.svg index bd78a6981..8dc6d1325 100644 --- a/e2etests/testdata/patterns/real-lines/dagre/sketch.exp.svg +++ b/e2etests/testdata/patterns/real-lines/dagre/sketch.exp.svg @@ -1,23 +1,23 @@ -xy hi + + + \ No newline at end of file diff --git a/e2etests/testdata/stable/mono-edge/elk/board.exp.json b/e2etests/testdata/stable/mono-edge/elk/board.exp.json new file mode 100644 index 000000000..00ea04b62 --- /dev/null +++ b/e2etests/testdata/stable/mono-edge/elk/board.exp.json @@ -0,0 +1,171 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "x", + "type": "rectangle", + "pos": { + "x": 12, + "y": 12 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "x", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "y", + "type": "rectangle", + "pos": { + "x": 223, + "y": 12 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "y", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(x -> y)[0]", + "src": "x", + "srcArrow": "none", + "srcLabel": "", + "dst": "y", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "hi", + "fontSize": 16, + "fontFamily": "mono", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 18, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 65, + "y": 45 + }, + { + "x": 223, + "y": 45 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/stable/mono-edge/elk/sketch.exp.svg b/e2etests/testdata/stable/mono-edge/elk/sketch.exp.svg new file mode 100644 index 000000000..7167ea489 --- /dev/null +++ b/e2etests/testdata/stable/mono-edge/elk/sketch.exp.svg @@ -0,0 +1,109 @@ +xy hi + + + \ No newline at end of file diff --git a/e2etests/testdata/stable/mono-font/dagre/board.exp.json b/e2etests/testdata/stable/mono-font/dagre/board.exp.json index 00d4c9ddc..81f339d09 100644 --- a/e2etests/testdata/stable/mono-font/dagre/board.exp.json +++ b/e2etests/testdata/stable/mono-font/dagre/board.exp.json @@ -108,7 +108,7 @@ "italic": true, "bold": false, "underline": false, - "labelWidth": 37, + "labelWidth": 38, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, @@ -118,11 +118,11 @@ "y": 66 }, { - "x": 30.799999999999997, + "x": 30, "y": 114.4 }, { - "x": 30.9, + "x": 30.1, "y": 138.7 }, { @@ -157,7 +157,7 @@ "italic": true, "bold": false, "underline": false, - "labelWidth": 37, + "labelWidth": 38, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, @@ -206,7 +206,7 @@ "italic": true, "bold": false, "underline": false, - "labelWidth": 37, + "labelWidth": 38, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, @@ -216,11 +216,11 @@ "y": 66 }, { - "x": 130.2, + "x": 131, "y": 114.4 }, { - "x": 130.1, + "x": 130.9, "y": 138.7 }, { diff --git a/e2etests/testdata/stable/mono-font/dagre/sketch.exp.svg b/e2etests/testdata/stable/mono-font/dagre/sketch.exp.svg index c3d6b89fa..1938ba1a5 100644 --- a/e2etests/testdata/stable/mono-font/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/mono-font/dagre/sketch.exp.svg @@ -1,16 +1,16 @@ -SATELLITESTRANSMITTER SENDSENDSEND + .d2-3632172451 .fill-N1{fill:#0A0F25;} + .d2-3632172451 .fill-N2{fill:#676C7E;} + .d2-3632172451 .fill-N3{fill:#9499AB;} + .d2-3632172451 .fill-N4{fill:#CFD2DD;} + .d2-3632172451 .fill-N5{fill:#DEE1EB;} + .d2-3632172451 .fill-N6{fill:#EEF1F8;} + .d2-3632172451 .fill-N7{fill:#FFFFFF;} + .d2-3632172451 .fill-B1{fill:#0D32B2;} + .d2-3632172451 .fill-B2{fill:#0D32B2;} + .d2-3632172451 .fill-B3{fill:#E3E9FD;} + .d2-3632172451 .fill-B4{fill:#E3E9FD;} + .d2-3632172451 .fill-B5{fill:#EDF0FD;} + .d2-3632172451 .fill-B6{fill:#F7F8FE;} + .d2-3632172451 .fill-AA2{fill:#4A6FF3;} + .d2-3632172451 .fill-AA4{fill:#EDF0FD;} + .d2-3632172451 .fill-AA5{fill:#F7F8FE;} + .d2-3632172451 .fill-AB4{fill:#EDF0FD;} + .d2-3632172451 .fill-AB5{fill:#F7F8FE;} + .d2-3632172451 .stroke-N1{stroke:#0A0F25;} + .d2-3632172451 .stroke-N2{stroke:#676C7E;} + .d2-3632172451 .stroke-N3{stroke:#9499AB;} + .d2-3632172451 .stroke-N4{stroke:#CFD2DD;} + .d2-3632172451 .stroke-N5{stroke:#DEE1EB;} + .d2-3632172451 .stroke-N6{stroke:#EEF1F8;} + .d2-3632172451 .stroke-N7{stroke:#FFFFFF;} + .d2-3632172451 .stroke-B1{stroke:#0D32B2;} + .d2-3632172451 .stroke-B2{stroke:#0D32B2;} + .d2-3632172451 .stroke-B3{stroke:#E3E9FD;} + .d2-3632172451 .stroke-B4{stroke:#E3E9FD;} + .d2-3632172451 .stroke-B5{stroke:#EDF0FD;} + .d2-3632172451 .stroke-B6{stroke:#F7F8FE;} + .d2-3632172451 .stroke-AA2{stroke:#4A6FF3;} + .d2-3632172451 .stroke-AA4{stroke:#EDF0FD;} + .d2-3632172451 .stroke-AA5{stroke:#F7F8FE;} + .d2-3632172451 .stroke-AB4{stroke:#EDF0FD;} + .d2-3632172451 .stroke-AB5{stroke:#F7F8FE;} + .d2-3632172451 .background-color-N1{background-color:#0A0F25;} + .d2-3632172451 .background-color-N2{background-color:#676C7E;} + .d2-3632172451 .background-color-N3{background-color:#9499AB;} + .d2-3632172451 .background-color-N4{background-color:#CFD2DD;} + .d2-3632172451 .background-color-N5{background-color:#DEE1EB;} + .d2-3632172451 .background-color-N6{background-color:#EEF1F8;} + .d2-3632172451 .background-color-N7{background-color:#FFFFFF;} + .d2-3632172451 .background-color-B1{background-color:#0D32B2;} + .d2-3632172451 .background-color-B2{background-color:#0D32B2;} + .d2-3632172451 .background-color-B3{background-color:#E3E9FD;} + .d2-3632172451 .background-color-B4{background-color:#E3E9FD;} + .d2-3632172451 .background-color-B5{background-color:#EDF0FD;} + .d2-3632172451 .background-color-B6{background-color:#F7F8FE;} + .d2-3632172451 .background-color-AA2{background-color:#4A6FF3;} + .d2-3632172451 .background-color-AA4{background-color:#EDF0FD;} + .d2-3632172451 .background-color-AA5{background-color:#F7F8FE;} + .d2-3632172451 .background-color-AB4{background-color:#EDF0FD;} + .d2-3632172451 .background-color-AB5{background-color:#F7F8FE;} + .d2-3632172451 .color-N1{color:#0A0F25;} + .d2-3632172451 .color-N2{color:#676C7E;} + .d2-3632172451 .color-N3{color:#9499AB;} + .d2-3632172451 .color-N4{color:#CFD2DD;} + .d2-3632172451 .color-N5{color:#DEE1EB;} + .d2-3632172451 .color-N6{color:#EEF1F8;} + .d2-3632172451 .color-N7{color:#FFFFFF;} + .d2-3632172451 .color-B1{color:#0D32B2;} + .d2-3632172451 .color-B2{color:#0D32B2;} + .d2-3632172451 .color-B3{color:#E3E9FD;} + .d2-3632172451 .color-B4{color:#E3E9FD;} + .d2-3632172451 .color-B5{color:#EDF0FD;} + .d2-3632172451 .color-B6{color:#F7F8FE;} + .d2-3632172451 .color-AA2{color:#4A6FF3;} + .d2-3632172451 .color-AA4{color:#EDF0FD;} + .d2-3632172451 .color-AA5{color:#F7F8FE;} + .d2-3632172451 .color-AB4{color:#EDF0FD;} + .d2-3632172451 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>SATELLITESTRANSMITTER SENDSENDSEND - - - + + + \ No newline at end of file diff --git a/e2etests/testdata/stable/mono-font/elk/board.exp.json b/e2etests/testdata/stable/mono-font/elk/board.exp.json index de34f6528..8847791df 100644 --- a/e2etests/testdata/stable/mono-font/elk/board.exp.json +++ b/e2etests/testdata/stable/mono-font/elk/board.exp.json @@ -108,17 +108,17 @@ "italic": true, "bold": false, "underline": false, - "labelWidth": 37, + "labelWidth": 38, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, "route": [ { - "x": 44, + "x": 43, "y": 78 }, { - "x": 44.5, + "x": 43.5, "y": 259 } ], @@ -148,7 +148,7 @@ "italic": true, "bold": false, "underline": false, - "labelWidth": 37, + "labelWidth": 38, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, @@ -188,17 +188,17 @@ "italic": true, "bold": false, "underline": false, - "labelWidth": 37, + "labelWidth": 38, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, "route": [ { - "x": 140, + "x": 141, "y": 78 }, { - "x": 140.5, + "x": 141.5, "y": 259 } ], diff --git a/e2etests/testdata/stable/mono-font/elk/sketch.exp.svg b/e2etests/testdata/stable/mono-font/elk/sketch.exp.svg index 0e726f1c6..36f5519c3 100644 --- a/e2etests/testdata/stable/mono-font/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/mono-font/elk/sketch.exp.svg @@ -1,16 +1,16 @@ -SATELLITESTRANSMITTER SENDSENDSEND + .d2-1397794193 .fill-N1{fill:#0A0F25;} + .d2-1397794193 .fill-N2{fill:#676C7E;} + .d2-1397794193 .fill-N3{fill:#9499AB;} + .d2-1397794193 .fill-N4{fill:#CFD2DD;} + .d2-1397794193 .fill-N5{fill:#DEE1EB;} + .d2-1397794193 .fill-N6{fill:#EEF1F8;} + .d2-1397794193 .fill-N7{fill:#FFFFFF;} + .d2-1397794193 .fill-B1{fill:#0D32B2;} + .d2-1397794193 .fill-B2{fill:#0D32B2;} + .d2-1397794193 .fill-B3{fill:#E3E9FD;} + .d2-1397794193 .fill-B4{fill:#E3E9FD;} + .d2-1397794193 .fill-B5{fill:#EDF0FD;} + .d2-1397794193 .fill-B6{fill:#F7F8FE;} + .d2-1397794193 .fill-AA2{fill:#4A6FF3;} + .d2-1397794193 .fill-AA4{fill:#EDF0FD;} + .d2-1397794193 .fill-AA5{fill:#F7F8FE;} + .d2-1397794193 .fill-AB4{fill:#EDF0FD;} + .d2-1397794193 .fill-AB5{fill:#F7F8FE;} + .d2-1397794193 .stroke-N1{stroke:#0A0F25;} + .d2-1397794193 .stroke-N2{stroke:#676C7E;} + .d2-1397794193 .stroke-N3{stroke:#9499AB;} + .d2-1397794193 .stroke-N4{stroke:#CFD2DD;} + .d2-1397794193 .stroke-N5{stroke:#DEE1EB;} + .d2-1397794193 .stroke-N6{stroke:#EEF1F8;} + .d2-1397794193 .stroke-N7{stroke:#FFFFFF;} + .d2-1397794193 .stroke-B1{stroke:#0D32B2;} + .d2-1397794193 .stroke-B2{stroke:#0D32B2;} + .d2-1397794193 .stroke-B3{stroke:#E3E9FD;} + .d2-1397794193 .stroke-B4{stroke:#E3E9FD;} + .d2-1397794193 .stroke-B5{stroke:#EDF0FD;} + .d2-1397794193 .stroke-B6{stroke:#F7F8FE;} + .d2-1397794193 .stroke-AA2{stroke:#4A6FF3;} + .d2-1397794193 .stroke-AA4{stroke:#EDF0FD;} + .d2-1397794193 .stroke-AA5{stroke:#F7F8FE;} + .d2-1397794193 .stroke-AB4{stroke:#EDF0FD;} + .d2-1397794193 .stroke-AB5{stroke:#F7F8FE;} + .d2-1397794193 .background-color-N1{background-color:#0A0F25;} + .d2-1397794193 .background-color-N2{background-color:#676C7E;} + .d2-1397794193 .background-color-N3{background-color:#9499AB;} + .d2-1397794193 .background-color-N4{background-color:#CFD2DD;} + .d2-1397794193 .background-color-N5{background-color:#DEE1EB;} + .d2-1397794193 .background-color-N6{background-color:#EEF1F8;} + .d2-1397794193 .background-color-N7{background-color:#FFFFFF;} + .d2-1397794193 .background-color-B1{background-color:#0D32B2;} + .d2-1397794193 .background-color-B2{background-color:#0D32B2;} + .d2-1397794193 .background-color-B3{background-color:#E3E9FD;} + .d2-1397794193 .background-color-B4{background-color:#E3E9FD;} + .d2-1397794193 .background-color-B5{background-color:#EDF0FD;} + .d2-1397794193 .background-color-B6{background-color:#F7F8FE;} + .d2-1397794193 .background-color-AA2{background-color:#4A6FF3;} + .d2-1397794193 .background-color-AA4{background-color:#EDF0FD;} + .d2-1397794193 .background-color-AA5{background-color:#F7F8FE;} + .d2-1397794193 .background-color-AB4{background-color:#EDF0FD;} + .d2-1397794193 .background-color-AB5{background-color:#F7F8FE;} + .d2-1397794193 .color-N1{color:#0A0F25;} + .d2-1397794193 .color-N2{color:#676C7E;} + .d2-1397794193 .color-N3{color:#9499AB;} + .d2-1397794193 .color-N4{color:#CFD2DD;} + .d2-1397794193 .color-N5{color:#DEE1EB;} + .d2-1397794193 .color-N6{color:#EEF1F8;} + .d2-1397794193 .color-N7{color:#FFFFFF;} + .d2-1397794193 .color-B1{color:#0D32B2;} + .d2-1397794193 .color-B2{color:#0D32B2;} + .d2-1397794193 .color-B3{color:#E3E9FD;} + .d2-1397794193 .color-B4{color:#E3E9FD;} + .d2-1397794193 .color-B5{color:#EDF0FD;} + .d2-1397794193 .color-B6{color:#F7F8FE;} + .d2-1397794193 .color-AA2{color:#4A6FF3;} + .d2-1397794193 .color-AA4{color:#EDF0FD;} + .d2-1397794193 .color-AA5{color:#F7F8FE;} + .d2-1397794193 .color-AB4{color:#EDF0FD;} + .d2-1397794193 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>SATELLITESTRANSMITTER SENDSENDSEND - - - + + + \ No newline at end of file