diff --git a/src/Mod/TechDraw/TDTest/DrawViewSymbolTest.py b/src/Mod/TechDraw/TDTest/DrawViewSymbolTest.py index c5590bd43ab7..41573fc8a702 100644 --- a/src/Mod/TechDraw/TDTest/DrawViewSymbolTest.py +++ b/src/Mod/TechDraw/TDTest/DrawViewSymbolTest.py @@ -33,6 +33,25 @@ def testMakeSymbol(self): self.assertTrue("Up-to-date" in sym.State) + def testNonAsciiSymbol(self): + """Tests if a Non-Ascii symbol can be added to page""" + print("Running Non Ascii Symbol Test") + sym = FreeCAD.ActiveDocument.addObject("TechDraw::DrawViewSymbol", "NonAsciiSymbol") + path = os.path.dirname(os.path.abspath(__file__)) + symbolFileSpec = path + "/TestNonAsciiSymbol.svg" + f = open(symbolFileSpec, "r") + svg = f.read() + f.close() + sym.Symbol = svg + self.page.addView(sym) + sym.X = 220.0 + sym.Y = 150.0 + + FreeCAD.ActiveDocument.recompute() + + self.assertTrue("Up-to-date" in sym.State) + + if __name__ == "__main__": unittest.main() diff --git a/src/Mod/TechDraw/TDTest/TestNonAsciiSymbol.svg b/src/Mod/TechDraw/TDTest/TestNonAsciiSymbol.svg new file mode 100644 index 000000000000..5c1105ceb07d --- /dev/null +++ b/src/Mod/TechDraw/TDTest/TestNonAsciiSymbol.svg @@ -0,0 +1,23 @@ + + + + + + + + + ⌀ 0,01 + + Ä + + Ö + + Ü + +