Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1:/tmp/cvs-serv7643

Modified Files:
        osd.py 
Log Message:
fallback to default font when the font is not found (bad but better than crash)

Index: osd.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/osd.py,v
retrieving revision 1.82
retrieving revision 1.83
diff -C2 -d -r1.82 -r1.83
*** osd.py      23 Aug 2003 12:51:41 -0000      1.82
--- osd.py      24 Aug 2003 10:17:11 -0000      1.83
***************
*** 11,14 ****
--- 11,17 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.83  2003/08/24 10:17:11  dischi
+ # fallback to default font when the font is not found (bad but better than crash)
+ #
  # Revision 1.82  2003/08/23 12:51:41  dischi
  # removed some old CVS log messages
***************
*** 241,244 ****
--- 244,249 ----
  
  
+ font_warning = []
+ 
  class OSDFont:
      def __init__(self, name, ptsize):
***************
*** 292,297 ****
                      raise
              else:
!                 print 'No alternate found in the alias list!'
!                 raise
          f = Font(filename, ptsize, font)
          return f.font
--- 297,310 ----
                      raise
              else:
!                 global font_warning
!                 if not fontname in font_warning:
!                     print 'WARNING: No alternate found in the alias list!'
!                     print 'Falling back to default font, this may look very ugly'
!                     font_warning.append(fontname)
!                 try:
!                     font = pygame.font.Font(config.OSD_DEFAULT_FONTNAME, ptsize)
!                 except (RuntimeError, IOError):
!                     print 'Couldnt load alternate font "%s"' % alt_fname
!                     raise
          f = Font(filename, ptsize, font)
          return f.font




-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to