Skip to content

Instantly share code, notes, and snippets.

@hitme
Created March 11, 2018 07:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hitme/7af6a3e00d11b54392ffeb75e40a3178 to your computer and use it in GitHub Desktop.
Save hitme/7af6a3e00d11b54392ffeb75e40a3178 to your computer and use it in GitHub Desktop.
import pygame
pygame.init()
text = "庞中华"
font = pygame.font.Font("/path/to/庞中华行书.ttf", 25)
rtext = font.render(text, True, (0, 0, 0), (255, 255, 255))
pygame.image.save(rtext, "t.gif")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment