getKerning.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. return {
  2. summary = 'Get the kerning between two glyphs.',
  3. description = [[
  4. Returns the kerning between 2 glyphs, in pixels. Kerning is a slight horizontal adjustment
  5. between 2 glyphs to improve the visual appearance. It will often be negative.
  6. ]],
  7. arguments = {
  8. first = {
  9. type = 'string',
  10. description = 'The first character.'
  11. },
  12. firstCodepoint = {
  13. type = 'number',
  14. description = 'The first codepoint.'
  15. },
  16. second = {
  17. type = 'string',
  18. description = 'The second character.'
  19. },
  20. secondCodepoint = {
  21. name = 'secondCodepoint',
  22. type = 'number',
  23. description = 'The second codepoint.'
  24. }
  25. },
  26. returns = {
  27. keming = {
  28. type = 'number',
  29. description = 'The kerning between the two glyphs.'
  30. }
  31. },
  32. variants = {
  33. {
  34. arguments = { 'first', 'second' },
  35. returns = { 'keming' }
  36. },
  37. {
  38. arguments = { 'firstCodepoint', 'second' },
  39. returns = { 'keming' }
  40. },
  41. {
  42. arguments = { 'first', 'secondCodepoint' },
  43. returns = { 'keming' }
  44. },
  45. {
  46. arguments = { 'firstCodepoint', 'secondCodepoint' },
  47. returns = { 'keming' }
  48. }
  49. },
  50. related = {
  51. 'Font:getKerning'
  52. }
  53. }