@@ -49,19 +49,19 @@ def render_diagrams(diagrams_dir: Path, output_dir: Path, theme: str = "neutral"
4949 config_payload = {
5050 "themeVariables" : {
5151 "fontFamily" : "IBM Plex Sans, Segoe UI, Arial" ,
52- "fontSize" : "20px " ,
52+ "fontSize" : "16px " ,
5353 "lineColor" : "#334155" ,
5454 "primaryTextColor" : "#111827" ,
5555 "primaryBorderColor" : "#334155" ,
5656 "primaryColor" : "#f8fafc" ,
5757 },
58- "flowchart" : {"nodeSpacing" : 70 , "rankSpacing" : 100 , "curve" : "basis" },
58+ "flowchart" : {"nodeSpacing" : 55 , "rankSpacing" : 75 , "curve" : "basis" },
5959 "sequence" : {
60- "diagramMarginX" : 60 ,
61- "diagramMarginY" : 30 ,
62- "actorMargin" : 90 ,
63- "width" : 220 ,
64- "height" : 90 ,
60+ "diagramMarginX" : 40 ,
61+ "diagramMarginY" : 24 ,
62+ "actorMargin" : 70 ,
63+ "width" : 180 ,
64+ "height" : 76 ,
6565 },
6666 }
6767 Path (config_path ).write_text (json .dumps (config_payload ), encoding = "utf-8" )
@@ -73,8 +73,8 @@ def render_diagrams(diagrams_dir: Path, output_dir: Path, theme: str = "neutral"
7373 entry = {"diagram" : mmd_path .name , "svg" : svg_path .name , "png" : png_path .name , "renderer" : "" , "ok" : True , "errors" : []}
7474 if mmdc :
7575 # White background + larger default typography/layout for cleaner onboarding visuals.
76- svg_cmd = [mmdc , "-i" , str (mmd_path ), "-o" , str (svg_path ), "-t" , theme , "-b" , "white" , "-s" , "2 " , "-C" , config_path ]
77- png_cmd = [mmdc , "-i" , str (mmd_path ), "-o" , str (png_path ), "-t" , theme , "-b" , "white" , "-w" , "3200 " , "-H" , "2200 " , "-s" , "2 " , "-C" , config_path ]
76+ svg_cmd = [mmdc , "-i" , str (mmd_path ), "-o" , str (svg_path ), "-t" , theme , "-b" , "white" , "-s" , "1.4 " , "-C" , config_path ]
77+ png_cmd = [mmdc , "-i" , str (mmd_path ), "-o" , str (png_path ), "-t" , theme , "-b" , "white" , "-w" , "2200 " , "-H" , "1500 " , "-s" , "1.4 " , "-C" , config_path ]
7878 code_svg , _out_svg , err_svg = common .run_cmd (svg_cmd , timeout = 90 )
7979 code_png , _out_png , err_png = common .run_cmd (png_cmd , timeout = 90 )
8080 entry ["renderer" ] = "mmdc"
0 commit comments