diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index 811270371..d907c1999 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -467,7 +467,7 @@ func (obj *Object) Text() *d2target.MText { fontSize := d2fonts.FONT_SIZE_M if obj.Class != nil || obj.SQLTable != nil { - fontSize = d2fonts.FONT_SIZE_XL + fontSize = d2fonts.FONT_SIZE_L } if obj.OuterSequenceDiagram() == nil { diff --git a/d2renderers/d2sketch/testdata/class/sketch.exp.svg b/d2renderers/d2sketch/testdata/class/sketch.exp.svg index d49d10d78..69bb477fa 100644 --- a/d2renderers/d2sketch/testdata/class/sketch.exp.svg +++ b/d2renderers/d2sketch/testdata/class/sketch.exp.svg @@ -51,19 +51,19 @@ width="626" height="572" viewBox="-102 -102 626 572"> \ No newline at end of file diff --git a/e2etests/testdata/measured/empty-sql_table/dagre/board.exp.json b/e2etests/testdata/measured/empty-sql_table/dagre/board.exp.json index 4bd68c182..296451a21 100644 --- a/e2etests/testdata/measured/empty-sql_table/dagre/board.exp.json +++ b/e2etests/testdata/measured/empty-sql_table/dagre/board.exp.json @@ -30,7 +30,7 @@ "methods": null, "columns": null, "label": "", - "fontSize": 24, + "fontSize": 20, "fontFamily": "DEFAULT", "language": "", "color": "#0A0F25", diff --git a/e2etests/testdata/measured/empty-sql_table/dagre/sketch.exp.svg b/e2etests/testdata/measured/empty-sql_table/dagre/sketch.exp.svg index b37f64c2c..53a789b51 100644 --- a/e2etests/testdata/measured/empty-sql_table/dagre/sketch.exp.svg +++ b/e2etests/testdata/measured/empty-sql_table/dagre/sketch.exp.svg @@ -39,7 +39,7 @@ width="254" height="216" viewBox="-102 -102 254 216"> \ No newline at end of file diff --git a/e2etests/testdata/regression/empty_class_height/dagre/board.exp.json b/e2etests/testdata/regression/empty_class_height/dagre/board.exp.json index afdf1799a..8ba549b2c 100644 --- a/e2etests/testdata/regression/empty_class_height/dagre/board.exp.json +++ b/e2etests/testdata/regression/empty_class_height/dagre/board.exp.json @@ -9,7 +9,7 @@ "x": 0, "y": 0 }, - "width": 354, + "width": 319, "height": 184, "opacity": 1, "strokeDash": 0, @@ -41,15 +41,15 @@ "methods": null, "columns": null, "label": "class with rows", - "fontSize": 24, + "fontSize": 20, "fontFamily": "DEFAULT", "language": "", "color": "#0A0F25", "italic": false, "bold": false, "underline": false, - "labelWidth": 249, - "labelHeight": 36, + "labelWidth": 214, + "labelHeight": 31, "zIndex": 0, "level": 1, "primaryAccentColor": "#0D32B2", @@ -60,11 +60,11 @@ "id": "class2", "type": "class", "pos": { - "x": 414, - "y": 41 + "x": 379, + "y": 46 }, - "width": 404, - "height": 102, + "width": 362, + "height": 92, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -84,15 +84,15 @@ "methods": null, "columns": null, "label": "class without rows", - "fontSize": 24, + "fontSize": 20, "fontFamily": "DEFAULT", "language": "", "color": "#0A0F25", "italic": false, "bold": false, "underline": false, - "labelWidth": 299, - "labelHeight": 36, + "labelWidth": 257, + "labelHeight": 31, "zIndex": 0, "level": 1, "primaryAccentColor": "#0D32B2", diff --git a/e2etests/testdata/regression/empty_class_height/dagre/sketch.exp.svg b/e2etests/testdata/regression/empty_class_height/dagre/sketch.exp.svg index d1a01b426..e27a99065 100644 --- a/e2etests/testdata/regression/empty_class_height/dagre/sketch.exp.svg +++ b/e2etests/testdata/regression/empty_class_height/dagre/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="1022" height="388" viewBox="-102 -102 1022 388">containerscloudtall cylinderclass- -num -int- -timeout -int- -pid -+ -getStatus() -Enum+ -getJobs() -Job[]+ -setTimeout(seconds int) -voidusersid -int -name -string -email -string -password -string -last_login -datetime -container

markdown text expanded to 800x400

+containerscloudtall cylinderclass- +num +int- +timeout +int- +pid ++ +getStatus() +Enum+ +getJobs() +Job[]+ +setTimeout(seconds int) +voidusersid +int +name +string +email +string +password +string +last_login +datetime +container

markdown text expanded to 800x400

:= 5 := a + 7 fmt.Printf("%d", b):= 5 := a + 7 -fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval +fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval containerscloudtall cylinderclass- -num -int- -timeout -int- -pid -+ -getStatus() -Enum+ -getJobs() -Job[]+ -setTimeout(seconds int) -voidusersid -int -name -string -email -string -password -string -last_login -datetime -container

markdown text expanded to 800x400

+containerscloudtall cylinderclass- +num +int- +timeout +int- +pid ++ +getStatus() +Enum+ +getJobs() +Job[]+ +setTimeout(seconds int) +voidusersid +int +name +string +email +string +password +string +last_login +datetime +container

markdown text expanded to 800x400

:= 5 := a + 7 fmt.Printf("%d", b):= 5 := a + 7 -fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval +fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval