Font.js 863 B

1234567891011121314151617181920212223242526272829303132333435
  1. function Font() {
  2. Object.defineProperties(this, {
  3. 'loaded': { enumerable: true, configurable: true, get: Font.prototype.__get_loaded, set: Font.prototype.__set_loaded}
  4. })
  5. }
  6. Font.prototype.__get_loaded = function() {
  7. return Polycode.Font__get_loaded(this.__ptr)
  8. }
  9. Font.prototype.__set_loaded = function(val) {
  10. Polycode.Font__set_loaded(this.__ptr, val)
  11. }
  12. Font.prototype.getFace = function() {
  13. var retVal = new FT_Face()
  14. retVal.__ptr = Polycode.Font_getFace(this.__ptr)
  15. return retVal
  16. }
  17. Font.prototype.isValid = function() {
  18. return Polycode.Font_isValid(this.__ptr)
  19. }
  20. Font.prototype.setFontName = function(fontName) {
  21. Polycode.Font_setFontName(this.__ptr, fontName)
  22. }
  23. Font.prototype.getFontName = function() {
  24. return Polycode.Font_getFontName(this.__ptr)
  25. }
  26. Font.prototype.getFontPath = function() {
  27. return Polycode.Font_getFontPath(this.__ptr)
  28. }