|
@@ -178,7 +178,7 @@ const createPoster = async () => {
|
|
|
let tagY = textY + tagSpacing + 10
|
|
|
positionNameList.forEach((tag) => {
|
|
|
let truncatedTag = tag
|
|
|
- ctx.font = '18px Arial' // 绘制前设置字体,否则tagWidth受前面的font fontStyle影响
|
|
|
+ context.font = '18px Arial' // 绘制前设置字体,否则tagWidth受前面的font fontStyle影响
|
|
|
|
|
|
while (context.measureText(truncatedTag + '...').width > maxTextWidth - 2 * tagPaddingLeftRight && truncatedTag.length > 0) {
|
|
|
truncatedTag = truncatedTag.slice(0, -1)
|