getAdvance.lua 710 B

123456789101112131415161718192021222324252627282930313233
  1. return {
  2. summary = 'Get the advance of a glyph.',
  3. description = [[
  4. Returns the advance metric for a glyph, in pixels. The advance is the horizontal distance to
  5. advance the cursor after rendering the glyph.
  6. ]],
  7. arguments = {
  8. character = {
  9. type = 'string',
  10. description = 'A character.'
  11. },
  12. codepoint = {
  13. type = 'number',
  14. description = 'A codepoint.'
  15. }
  16. },
  17. returns = {
  18. advance = {
  19. type = 'number',
  20. description = 'The advance of the glyph, in pixels.'
  21. }
  22. },
  23. variants = {
  24. {
  25. arguments = { 'character' },
  26. returns = { 'advance' }
  27. },
  28. {
  29. arguments = { 'codepoint' },
  30. returns = { 'advance' }
  31. }
  32. }
  33. }