Rework makeText

Use name based on the path for registering
This commit is contained in:
Adam Urbańczyk
2020-10-11 14:40:48 +02:00
committed by GitHub
parent e135215ce1
commit cea5bf6c6c

View File

@ -2392,12 +2392,11 @@ class Compound(Shape, Mixin3D):
mgr = Font_FontMgr.GetInstance_s()
if fontPath and mgr.CheckFont(TCollection_AsciiString(fontPath).ToCString()):
system_font = Font_SystemFont(TCollection_AsciiString(font))
system_font.SetFontPath(font_kind, TCollection_AsciiString(fontPath))
mgr.RegisterFont(system_font, False) # not sure if "replace" should be True
font_t = Font_SystemFont(TCollection_AsciiString(fontPath))
font_t.SetFontPath(font_kind, TCollection_AsciiString(fontPath))
mgr.RegisterFont(font_t, True)
else:
font_t = mgr.FindFont(TCollection_AsciiString(font), font_kind)
builder = Font_BRepTextBuilder()