Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pynxc/waxy/font.py
diff options
context:
space:
mode:
Diffstat (limited to 'pynxc/waxy/font.py')
-rw-r--r--pynxc/waxy/font.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/pynxc/waxy/font.py b/pynxc/waxy/font.py
new file mode 100644
index 0000000..aefd228
--- /dev/null
+++ b/pynxc/waxy/font.py
@@ -0,0 +1,18 @@
+# font.py
+
+import wx
+
+class Font(wx.Font):
+ def __init__(self, name, size, italic=0, bold=0, underline=0):
+ wx.Font.__init__(self, size, wx.DEFAULT, italic and wx.ITALIC or wx.NORMAL,
+ bold and wx.BOLD or wx.NORMAL, underline, name)
+
+ def IsItalic(self):
+ return bool(self.GetStyle() & wx.ITALIC)
+
+ def IsBold(self):
+ return bool(self.GetWeight() & wx.BOLD)
+
+ def IsUnderlined(self):
+ return self.GetUnderlined()
+