mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-09-05 01:10:12 +02:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
39 lines
871 B
Python
39 lines
871 B
Python
import imp_unittest, unittest
|
|
import wtc
|
|
import wx
|
|
import os
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
class fontutil_Tests(wtc.WidgetTestCase):
|
|
|
|
def test_fontutil(self):
|
|
f1 = wx.FFont(12, wx.FONTFAMILY_SWISS)
|
|
i1 = f1.GetNativeFontInfo()
|
|
st = i1.ToString()
|
|
|
|
i2 = wx.NativeFontInfo()
|
|
i2.FromString(st)
|
|
f2 = wx.Font(i2)
|
|
self.assertTrue(f1 == f2)
|
|
|
|
def test_fontutilProperties(self):
|
|
nfi = wx.NativeFontInfo()
|
|
nfi.InitFromFont(wx.NORMAL_FONT)
|
|
nfi.Encoding
|
|
nfi.FaceName
|
|
nfi.Family
|
|
nfi.PointSize
|
|
#nfi.PixelSize
|
|
nfi.Style
|
|
nfi.Underlined
|
|
nfi.Weight
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|