Skip to content

Commit

Permalink
add cgraph setters for fontname (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
TravisYeah authored Oct 17, 2024
1 parent 4b44d4a commit 698a12c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions cgraph/attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 698a12c

Please sign in to comment.