Skip to content

Commit

Permalink
Downsize some fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
Pezmc committed May 24, 2024
1 parent 8efeed3 commit 3110004
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions temporary-sign/temporary-sign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,28 @@ const normalizeBetweenTwoRanges = (val, minVal, maxVal, newMin, newMax) => {


function scaleFont(words) {
if (words.length < 10) {
if (words.length < 8) {
return 256
}

if (words.length < 10) {
return 200
}

if (words.length < 15) {
return 160
}

if (words.length < 20) {
return 170
return 140
}

if (words.length < 30) {
return 150
return 130
}

if (words.length < 40) {
return 125
return 120
}

return normalizeBetweenTwoRanges(words.length, 0, 80, 256, 100)
Expand Down

0 comments on commit 3110004

Please sign in to comment.