Describing all fonts available to the system¶
Describing all fonts available to the system¶
1# This example iterates all the fonts available to
2# the cad impact.system and describes each one
3
4
5fonts = impact.system.fonts
6
7
8def describe_font(font):
9 impact.gui.output_toolbox.add("")
10 impact.gui.output_toolbox.add("Name: " + str(font.full_name))
11
12 if font.font_type == ipFontType.ftLine:
13 impact.gui.output_toolbox.add("Type: Line font")
14 else:
15 impact.gui.output_toolbox.add("Type: True Type font")
16
17
18impact.gui.output_toolbox.clear()
19
20for font in fonts:
21 describe_font(font)
22