Created
May 2, 2019 17:32
-
-
Save mvcypriano/eb3d0016c1472085f2d86ee7fc7f19ad to your computer and use it in GitHub Desktop.
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
def fontSize(name) | |
charCount = name.length | |
if charCount < 22 | |
return 40 | |
elsif charCount > 36 | |
return 25 | |
else | |
puts charCount | |
return (45 - 0.5*charCount).round | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment