Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't force graphviz diagrams to render in Courier #76776

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_graphviz/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ where
let mut graph_attrs = Vec::new();
let mut content_attrs = Vec::new();
if options.contains(&RenderOption::Monospace) {
let font = r#"fontname="Courier, monospace""#;
let font = r#"fontname="monospace""#;
graph_attrs.push(font);
content_attrs.push(font);
};
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_mir/src/util/graphviz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ where
writeln!(w, "{} {}Mir_{} {{", kind, cluster, def_name)?;

// Global graph properties
let font = r#"fontname="Courier, monospace""#;
let font = r#"fontname="monospace""#;
let mut graph_attrs = vec![font];
let mut content_attrs = vec![font];

Expand Down
6 changes: 3 additions & 3 deletions src/test/mir-opt/graphviz.main.mir_map.0.dot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
digraph Mir_0_3 {
graph [fontname="Courier, monospace"];
node [fontname="Courier, monospace"];
edge [fontname="Courier, monospace"];
graph [fontname="monospace"];
node [fontname="monospace"];
edge [fontname="monospace"];
label=<fn main() -&gt; ()<br align="left"/>>;
bb0__0_3 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">0</td></tr><tr><td align="left" balign="left">_0 = const ()<br/></td></tr><tr><td align="left">goto</td></tr></table>>];
bb1__0_3 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">1</td></tr><tr><td align="left">resume</td></tr></table>>];
Expand Down