Skip to content

Commit

Permalink
Replace "modern" font with "sans-serif" (#901)
Browse files Browse the repository at this point in the history
This should be equivalent for currently released Enable, but will keep
things unchanged after [enable
#977](enthought/enable#977) is merged.
  • Loading branch information
corranwebster authored May 16, 2023
1 parent 30be22c commit e6fcf54
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions chaco/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class PlotAxis(AbstractOverlay):
title = Str() # May want to add PlotLabel option

#: The font of the title.
title_font = KivaFont("modern 12")
title_font = KivaFont("sans-serif 12")

#: The spacing between the axis line and the title
title_spacing = Union(Constant("auto"), Float)
Expand All @@ -105,7 +105,7 @@ class PlotAxis(AbstractOverlay):
tick_color = ColorTrait("black")

#: The font of the tick labels.
tick_label_font = KivaFont("modern 10")
tick_label_font = KivaFont("sans-serif 10")

#: The color of the tick labels.
tick_label_color = ColorTrait("black")
Expand Down
4 changes: 2 additions & 2 deletions chaco/examples/demo/basic/cmap_scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def _create_plot_component():
plot.padding = 50
plot.x_grid.visible = False
plot.y_grid.visible = False
plot.x_axis.font = "modern 16"
plot.y_axis.font = "modern 16"
plot.x_axis.font = "sans-serif 16"
plot.y_axis.font = "sans-serif 16"

# Right now, some of the tools are a little invasive, and we need the
# actual ColomappedScatterPlot object to give to them
Expand Down
4 changes: 2 additions & 2 deletions chaco/examples/demo/basic/cmap_segment_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ def _create_plot_component():
plot.padding = 50
plot.x_grid.visible = False
plot.y_grid.visible = False
plot.x_axis.font = "modern 16"
plot.y_axis.font = "modern 16"
plot.x_axis.font = "sans-serif 16"
plot.y_axis.font = "sans-serif 16"

# Right now, some of the tools are a little invasive, and we need the
# actual ColomappedSegmentPlot object to give to them
Expand Down
4 changes: 2 additions & 2 deletions chaco/examples/demo/basic/discrete_cmap_scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ def _create_plot_component():
plot.padding = 50
plot.x_grid.visible = False
plot.y_grid.visible = False
plot.x_axis.font = "modern 16"
plot.y_axis.font = "modern 16"
plot.x_axis.font = "sans-serif 16"
plot.y_axis.font = "sans-serif 16"

# Right now, some of the tools are a little invasive, and we need the
# actual ColomappedScatterPlot object to give to them
Expand Down
4 changes: 2 additions & 2 deletions chaco/examples/demo/basic/zoomable_colorbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def _create_plot_component():
plot.padding = 50
plot.x_grid.visible = False
plot.y_grid.visible = False
plot.x_axis.font = "modern 16"
plot.y_axis.font = "modern 16"
plot.x_axis.font = "sans-serif 16"
plot.y_axis.font = "sans-serif 16"

# Add pan and zoom to the plot
plot.tools.append(PanTool(plot, constrain_key="shift"))
Expand Down
6 changes: 3 additions & 3 deletions chaco/examples/demo/data_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def _plot_default(self):
marker_color="blue",
marker_line_color="transparent",
marker="diamond",
font="modern 14",
font="sans-serif 14",
arrow_visible=False,
)
plot.overlays.append(label2)
Expand Down Expand Up @@ -132,7 +132,7 @@ def _plot_default(self):
label_style="bubble",
label_text="Something interesting",
label_format="at x=%(x).2f, y=%(y).2f",
font="modern 18",
font="sans-serif 18",
bgcolor=(1, 1, 0.75, 1),
)
plot.overlays.append(label4)
Expand All @@ -155,7 +155,7 @@ def _plot_default(self):
label_text="Label with\narrow_min_length=20",
border_visible=False,
arrow_min_length=20,
font="modern 14",
font="sans-serif 14",
bgcolor=(0.75, 0.75, 0.75, 1),
)
plot.overlays.append(label5)
Expand Down
2 changes: 1 addition & 1 deletion chaco/label.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Label(HasTraits):
border_visible = Bool(True)

#: The font of the label text.
font = KivaFont("modern 10")
font = KivaFont("sans-serif 10")

#: Number of pixels of margin around the label, for both X and Y dimensions.
margin = Int(2)
Expand Down
2 changes: 1 addition & 1 deletion chaco/overlays/legend.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Legend(AbstractOverlay):
"""A legend for a plot."""

#: The font to use for the legend text.
font = KivaFont("modern 12")
font = KivaFont("sans-serif 12")

#: The amount of space between the content of the legend and the border.
border_padding = Int(10)
Expand Down
2 changes: 1 addition & 1 deletion chaco/overlays/text_box_overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TextBoxOverlay(AbstractOverlay):
text = Str

#: The font to use for the text.
font = KivaFont("modern 12")
font = KivaFont("sans-serif 12")

#: The background color for the box (overrides AbstractOverlay).
bgcolor = ColorTrait("transparent")
Expand Down
2 changes: 1 addition & 1 deletion chaco/overlays/text_grid_overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ def _text_grid_changed(self, old, new):
self.add(new)

def _text_grid_default(self):
text_grid = TextGrid(font="modern 12", cell_border_width=0)
text_grid = TextGrid(font="sans-serif 12", cell_border_width=0)
self.add(text_grid)
return text_grid
2 changes: 1 addition & 1 deletion chaco/overlays/tooltip.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ToolTip(AbstractOverlay):
"""An overlay that is a toolip."""

#: The font to render the tooltip.
font = KivaFont("modern 10")
font = KivaFont("sans-serif 10")

#: The color of the text in the tooltip
text_color = black_color_trait
Expand Down
2 changes: 1 addition & 1 deletion chaco/plots/text_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TextPlot(BaseXYPlot):
text = Instance(ArrayDataSource)

#: The font of the tick labels.
text_font = KivaFont("modern 10")
text_font = KivaFont("sans-serif 10")

#: The color of the tick labels.
text_color = black_color_trait
Expand Down
2 changes: 1 addition & 1 deletion chaco/plots/text_plot_1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TextPlot1D(Base1DPlot):
value = Instance(ArrayDataSource)

#: The font of the tick labels.
text_font = KivaFont("modern 10")
text_font = KivaFont("sans-serif 10")

#: The color of the tick labels.
text_color = black_color_trait
Expand Down
2 changes: 1 addition & 1 deletion chaco/tools/regression_lasso.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class RegressionOverlay(LassoOverlay):
kw=dict(
bgcolor="white",
border_color="black",
font="modern 14",
font="sans-serif 14",
border_width=1,
),
)
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user_manual/basic_elements/overlays.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ given an X-Y plot renderer, ``plot``, we can define a new x-axis as: ::
AXIS_DEFAULTS = {
'axis_line_weight': 2,
'tick_weight': 2,
'tick_label_font': 'modern 16',
'title_font': 'modern 20',
'tick_label_font': 'sans-serif 16',
'title_font': 'sans-serif 20',
}

x_axis = PlotAxis(
Expand Down
4 changes: 2 additions & 2 deletions examples/user_guide/plot_types/create_plot_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
AXIS_DEFAULTS = {
"axis_line_weight": AXIS_WIDTH,
"tick_weight": AXIS_WIDTH,
"tick_label_font": "modern 16",
"title_font": "modern 20",
"tick_label_font": "sans-serif 16",
"title_font": "sans-serif 20",
}


Expand Down

0 comments on commit e6fcf54

Please sign in to comment.