예제 #1
0
파일: font.py 프로젝트: vavilon/pygame_cffi
 def set_italic(self, italic):
     """Font.set_italic(bool): return None
        enable fake rendering of italic text"""
     style = sdl.TTF_GetFontStyle(self._sdl_font)
     if italic:
         style = style | sdl.TTF_STYLE_ITALIC
     elif style & sdl.TTF_STYLE_ITALIC:
         style = style ^ sdl.TTF_STYLE_ITALIC
     sdl.TTF_SetFontStyle(self._sdl_font, style)
예제 #2
0
파일: font.py 프로젝트: vavilon/pygame_cffi
 def set_underline(self, underline):
     """Font.set_underline(bool): return None
        control if text is rendered with an underline"""
     style = sdl.TTF_GetFontStyle(self._sdl_font)
     if underline:
         style = style | sdl.TTF_STYLE_UNDERLINE
     elif style & sdl.TTF_STYLE_UNDERLINE:
         style = style ^ sdl.TTF_STYLE_UNDERLINE
     sdl.TTF_SetFontStyle(self._sdl_font, style)
예제 #3
0
파일: font.py 프로젝트: vavilon/pygame_cffi
 def set_bold(self, bold):
     """Font.set_bold(bool): return None
        enable fake rendering of bold text"""
     style = sdl.TTF_GetFontStyle(self._sdl_font)
     if bold:
         style = style | sdl.TTF_STYLE_BOLD
     elif style & sdl.TTF_STYLE_BOLD:
         style = style ^ sdl.TTF_STYLE_BOLD
     sdl.TTF_SetFontStyle(self._sdl_font, style)
예제 #4
0
파일: font.py 프로젝트: vavilon/pygame_cffi
 def get_italic(self):
     """Font.get_italic(): return bool
        check if text will be rendered italic"""
     style = sdl.TTF_GetFontStyle(self._sdl_font)
     return style & sdl.TTF_STYLE_ITALIC != 0
예제 #5
0
파일: font.py 프로젝트: vavilon/pygame_cffi
 def get_underline(self):
     """Font.get_underline(): return bool
        check if text will be rendered with an underline"""
     style = sdl.TTF_GetFontStyle(self._sdl_font)
     return style & sdl.TTF_STYLE_UNDERLINE != 0
예제 #6
0
파일: font.py 프로젝트: vavilon/pygame_cffi
 def get_bold(self):
     """Font.get_bold(): return bool
        check if text will be rendered bold"""
     style = sdl.TTF_GetFontStyle(self._sdl_font)
     return style & sdl.TTF_STYLE_BOLD != 0