- Font problems seem to be partially fixed on windows. Note that the font is not found, so rendering is ugly, but at least the text does not flow over the boxes anymore.
This commit is contained in:
parent
688416a351
commit
23931281d0
@ -158,12 +158,15 @@ class AttackThread(threading.Thread):
|
|||||||
return
|
return
|
||||||
graphLine("%s [%s]" % (edge,atxt))
|
graphLine("%s [%s]" % (edge,atxt))
|
||||||
|
|
||||||
# Precompute font name
|
if sys.platform.startswith("darwin"):
|
||||||
# Set a font with sans
|
self.fontname = "Helvetica"
|
||||||
# We only retrieve the name, so the size '9' here is
|
elif sys.platform.startswith("win"):
|
||||||
# irrelevant.
|
self.fontname = "Courier"
|
||||||
font = wx.Font(9,wx.SWISS,wx.NORMAL,wx.NORMAL)
|
else:
|
||||||
self.fontname = font.GetFaceName()
|
font = wx.Font(9,wx.SWISS,wx.NORMAL,wx.NORMAL)
|
||||||
|
self.fontname = font.GetFaceName()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# write all graph lines but add layout modifiers
|
# write all graph lines but add layout modifiers
|
||||||
for l in txt.splitlines():
|
for l in txt.splitlines():
|
||||||
@ -179,8 +182,9 @@ class AttackThread(threading.Thread):
|
|||||||
#graphLine("mindist=0.1")
|
#graphLine("mindist=0.1")
|
||||||
|
|
||||||
# Set fontname
|
# Set fontname
|
||||||
fontstring = "fontname=%s" % (self.fontname)
|
if self.fontname:
|
||||||
setAttr(fontstring,EDGE)
|
fontstring = "fontname=%s" % (self.fontname)
|
||||||
|
setAttr(fontstring)
|
||||||
|
|
||||||
# Stupid Mac <> Graphviz bug fix
|
# Stupid Mac <> Graphviz bug fix
|
||||||
if (sys.platform.startswith("mac")) or (sys.platform.startswith("darwin")):
|
if (sys.platform.startswith("mac")) or (sys.platform.startswith("darwin")):
|
||||||
|
Loading…
Reference in New Issue
Block a user