GlyphData.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. function GlyphData() {
  2. Object.defineProperties(this, {
  3. 'glyphs': { enumerable: true, configurable: true, get: GlyphData.prototype.__get_glyphs, set: GlyphData.prototype.__set_glyphs},
  4. 'positions': { enumerable: true, configurable: true, get: GlyphData.prototype.__get_positions, set: GlyphData.prototype.__set_positions},
  5. 'num_glyphs': { enumerable: true, configurable: true, get: GlyphData.prototype.__get_num_glyphs, set: GlyphData.prototype.__set_num_glyphs},
  6. 'trailingAdvance': { enumerable: true, configurable: true, get: GlyphData.prototype.__get_trailingAdvance, set: GlyphData.prototype.__set_trailingAdvance}
  7. })
  8. }
  9. GlyphData.prototype.__get_glyphs = function() {
  10. var retVal = new FT_Glyph()
  11. retVal.__ptr = Polycode.GlyphData__get_glyphs(this.__ptr)
  12. return retVal
  13. }
  14. GlyphData.prototype.__set_glyphs = function(val) {
  15. Polycode.GlyphData__set_glyphs(this.__ptr, val.__ptr)
  16. }
  17. GlyphData.prototype.__get_positions = function() {
  18. var retVal = new FT_Vector()
  19. retVal.__ptr = Polycode.GlyphData__get_positions(this.__ptr)
  20. return retVal
  21. }
  22. GlyphData.prototype.__set_positions = function(val) {
  23. Polycode.GlyphData__set_positions(this.__ptr, val.__ptr)
  24. }
  25. GlyphData.prototype.__get_num_glyphs = function() {
  26. var retVal = new FT_UInt()
  27. retVal.__ptr = Polycode.GlyphData__get_num_glyphs(this.__ptr)
  28. return retVal
  29. }
  30. GlyphData.prototype.__set_num_glyphs = function(val) {
  31. Polycode.GlyphData__set_num_glyphs(this.__ptr, val.__ptr)
  32. }
  33. GlyphData.prototype.__get_trailingAdvance = function() {
  34. return Polycode.GlyphData__get_trailingAdvance(this.__ptr)
  35. }
  36. GlyphData.prototype.__set_trailingAdvance = function(val) {
  37. Polycode.GlyphData__set_trailingAdvance(this.__ptr, val)
  38. }
  39. GlyphData.prototype.clearData = function() {
  40. Polycode.GlyphData_clearData(this.__ptr)
  41. }