fakehumans send boats, improved map

This commit is contained in:
evanpelle
2024-09-08 20:21:39 -07:00
parent 8331047a9b
commit a7ad8790aa
19 changed files with 437 additions and 55 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ export function largestRectangleInHistogram(widths: number[]): Rectangle {
export function calculateFontSize(rectangle: Rectangle, name: string): number {
// This is a simplified calculation. You might want to adjust it based on your specific font and rendering system.
const widthConstrained = rectangle.width / name.length;
const widthConstrained = rectangle.width / name.length * 2;
const heightConstrained = rectangle.height / 3;
return Math.min(widthConstrained, heightConstrained);
}