newImage.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. return {
  2. summary = 'Get an Image of a rasterized glyph.',
  3. description = 'Returns an `Image` containing a rasterized glyph.',
  4. arguments = {
  5. character = {
  6. type = 'string',
  7. description = 'A character.'
  8. },
  9. codepoint = {
  10. type = 'number',
  11. description = 'A codepoint.'
  12. },
  13. spread = {
  14. type = 'number',
  15. default = '4.0',
  16. description = 'The width of the distance field, for signed distance field rasterization.'
  17. },
  18. padding = {
  19. type = 'number',
  20. default = 'spread / 2',
  21. description = 'The number of pixels of padding to add at the edges of the image.'
  22. }
  23. },
  24. returns = {
  25. image = {
  26. type = 'Image',
  27. description = 'The glyph image. It will be in the `rgba32f` format.'
  28. }
  29. },
  30. variants = {
  31. {
  32. arguments = { 'character', 'spread', 'padding' },
  33. returns = { 'image' }
  34. },
  35. {
  36. arguments = { 'codepoint', 'spread', 'padding' },
  37. returns = { 'image' }
  38. }
  39. },
  40. related = {
  41. 'Rasterizer:getCurves'
  42. }
  43. }