mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-14 22:26:52 +00:00
fakehumans send boats, improved map
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user