From c7c01fdaa199ea1eb2bda46e9255fc1da1bfcac7 Mon Sep 17 00:00:00 2001 From: Travis Harrison Date: Mon, 16 Sep 2024 07:38:45 -0500 Subject: [PATCH] add cgraph setters for fontname --- cgraph/attribute.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/cgraph/attribute.go b/cgraph/attribute.go index b18f16f..005b5b8 100644 --- a/cgraph/attribute.go +++ b/cgraph/attribute.go @@ -740,6 +740,30 @@ func (e *Edge) SetFontColor(v string) *Edge { return e } +// SetFontName +// Font used for text. +// https://graphviz.gitlab.io/_pages/doc/info/attrs.html#a:fontname +func (g *Graph) SetFontName(v string) *Graph { + g.SafeSet(string(fontNameAttr), v, "Times-Roman") + return g +} + +// SetFontName +// Font used for text. +// https://graphviz.gitlab.io/_pages/doc/info/attrs.html#a:fontname +func (n *Node) SetFontName(v string) *Node { + n.SafeSet(string(fontNameAttr), v, "Times-Roman") + return n +} + +// SetFontName +// Font used for text. +// https://graphviz.gitlab.io/_pages/doc/info/attrs.html#a:fontname +func (e *Edge) SetFontName(v string) *Edge { + e.SafeSet(string(fontNameAttr), v, "Times-Roman") + return e +} + // SetFontSize // Font size, in points, used for text. // https://graphviz.gitlab.io/_pages/doc/info/attrs.html#a:fontsize