Skip to content
Merged
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
5 changes: 4 additions & 1 deletion kiva/fonttools/font.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import copy
from kiva.constants import (DEFAULT, DECORATIVE, ROMAN, SCRIPT, SWISS, MODERN,
TELETYPE, NORMAL, ITALIC, BOLD, BOLD_ITALIC)
from .font_manager import FontProperties, fontManager

# Various maps used by str_to_font
font_families = {
Expand Down Expand Up @@ -104,6 +103,8 @@ def findfont(self):
""" Returns the file name containing the font that most closely matches
our font properties.
"""
from .font_manager import fontManager

fp = self._make_font_props()
return str(fontManager.findfont(fp))

Expand All @@ -118,6 +119,8 @@ def _make_font_props(self):
""" Returns a font_manager.FontProperties object that encapsulates our
font properties
"""
from .font_manager import FontProperties

# XXX: change the weight to a numerical value
if self.style == BOLD or self.style == BOLD_ITALIC:
weight = "bold"
Expand Down