getCurves.lua 946 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. return {
  2. summary = 'Get the bezier curves defining a glyph.',
  3. description = 'Returns the bezier curve control points defining the shape of a glyph.',
  4. arguments = {
  5. character = {
  6. type = 'string',
  7. description = 'A character.'
  8. },
  9. codepoint = {
  10. type = 'number',
  11. description = 'A codepoint.'
  12. },
  13. three = {
  14. type = 'boolean',
  15. description = 'Whether the control points should be 3D or 2D.'
  16. }
  17. },
  18. returns = {
  19. curves = {
  20. type = 'table',
  21. description = [[
  22. A table of curves. Each curve is a table of numbers representing the control points (2 for
  23. a line, 3 for a quadratic curve, etc.).
  24. ]]
  25. }
  26. },
  27. variants = {
  28. {
  29. arguments = { 'character', 'three' },
  30. returns = { 'curves' }
  31. },
  32. {
  33. arguments = { 'codepoint', 'three' },
  34. returns = { 'curves' }
  35. }
  36. },
  37. related = {
  38. 'Curve',
  39. 'Rasterizer:newImage'
  40. }
  41. }