fix: 修改描述区字体大小计算逻辑,确保在极小区域下仍能正常渲染文本
This commit is contained in:
parent
8e6b317348
commit
bdaa6b2b21
@ -1471,7 +1471,7 @@ function drawArea(ctx: CanvasRenderingContext2D, pen: MapPen): void {
|
||||
let descFontSize = Math.min(w / 6, h / 4, 200);
|
||||
let lines: string[] = [];
|
||||
|
||||
while (descFontSize > 8) {
|
||||
while (descFontSize > 1) {
|
||||
ctx.font = `${descFontSize}px ${fontFamily}`;
|
||||
const maxCharsPerLine = Math.floor(w / (descFontSize * 0.8));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user