lib/rails_erd/diagram/graphviz.rb in rails-erd-1.1.0 vs lib/rails_erd/diagram/graphviz.rb in rails-erd-1.2.0
- old
+ new
@@ -45,34 +45,36 @@
class Graphviz < Diagram
NODE_LABEL_TEMPLATES = { :html => "node.html.erb", :record => "node.record.erb" } # @private :nodoc:
NODE_WIDTH = 130 # @private :nodoc:
+ FONTS = Config.font_names_based_on_os
+
# Default graph attributes.
GRAPH_ATTRIBUTES = {
:rankdir => :LR,
:ranksep => 0.5,
:nodesep => 0.4,
:pad => "0.4,0.4",
:margin => "0,0",
:concentrate => true,
:labelloc => :t,
:fontsize => 13,
- :fontname => "Arial Bold"
+ :fontname => FONTS[:bold]
}
# Default node attributes.
NODE_ATTRIBUTES = {
:shape => "Mrecord",
:fontsize => 10,
- :fontname => "Arial",
+ :fontname => FONTS[:normal],
:margin => "0.07,0.05",
:penwidth => 1.0
}
# Default edge attributes.
EDGE_ATTRIBUTES = {
- :fontname => "Arial",
+ :fontname => FONTS[:normal],
:fontsize => 8,
:dir => :both,
:arrowsize => 0.9,
:penwidth => 1.0,
:labelangle => 32,