This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rmagick' | |
module InitalsAvatar | |
def InitalsAvatar.create(initials, size) | |
# Canvas sizes | |
DEFAULT_OUTPUT_SIZE = 100 | |
MIN_CANVAS_SIZE = 100 | |
# Font size as a proportion of the canvas | |
FONT_RATIO = 0.45 |
NewerOlder