def BuildFont ():
global base
wgldc = wglGetCurrentDC ()
hDC = win32ui.CreateDCFromHandle (wgldc)
base = glGenLists(96); # // Storage For 96 Characters
# CreateFont () takes a python dictionary to specify the requested font properties.
font_properties = { "name" : "Courier New",
"width" : 0 ,
"height" : -24,
"weight" : 800
}
font = win32ui.CreateFont (font_properties)
# // Selects The Font We Want
oldfont = hDC.SelectObject (font)
# // Builds 96 Characters Starting At Character 32
wglUseFontBitmaps (wgldc, 32, 96, base)
# // reset the font
hDC.SelectObject (oldfont)