#NEWLINE# def _lookup_win( self , key , basename , styles , fail = False ) : #NEWLINE# #INDENT# for suffix in ( '' , ' (TrueType)' ) : #NEWLINE# #INDENT# for style in styles : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# valname = ( '%s%s%s' % ( basename , ( style and ( ' ' + style ) ) , basename ) ) #NEWLINE# ( val , _ ) = _winreg . QueryValueEx ( key , valname ) #NEWLINE# return val #NEWLINE# #UNINDENT# except EnvironmentError : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if fail : #NEWLINE# #INDENT# raise FontNotFound ( ( 'Font %s (%s) not found in registry' % ( basename , styles [ 0 ] ) ) ) #NEWLINE# #UNINDENT# return None