FontManager.lua 379 B

12345678910111213141516
  1. class "FontManager"
  2. function FontManager:FontManager()
  3. if self.__ptr == nil then
  4. self.__ptr = Polycore.FontManager()
  5. end
  6. end
  7. function FontManager:registerFont(fontName, fontPath)
  8. return Polycore.FontManager_registerFont(self.__ptr, fontName, fontPath)
  9. end
  10. function FontManager:getFontByName(fontName)
  11. return Polycore.FontManager_getFontByName(self.__ptr, fontName)
  12. end