SDFSettings.js 896 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import freezeObject from '../Core/freezeObject.js';
  2. /**
  3. * Settings for the generation of signed distance field glyphs
  4. *
  5. * @private
  6. */
  7. var SDFSettings = {
  8. /**
  9. * The font size in pixels
  10. *
  11. * @type {Number}
  12. * @constant
  13. */
  14. FONT_SIZE: 48.0,
  15. /**
  16. * Whitespace padding around glyphs.
  17. *
  18. * @type {Number}
  19. * @constant
  20. */
  21. PADDING: 10.0,
  22. /**
  23. * How many pixels around the glyph shape to use for encoding distance
  24. *
  25. * @type {Number}
  26. * @constant
  27. */
  28. RADIUS: 8.0,
  29. /**
  30. * How much of the radius (relative) is used for the inside part the glyph.
  31. *
  32. * @type {Number}
  33. * @constant
  34. */
  35. CUTOFF: 0.25
  36. };
  37. export default freezeObject(SDFSettings);