From cab4ff69e30b64abeaddf9e9950fa0c056ebad9d Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Thu, 11 Jun 2020 16:42:50 -0400 Subject: [PATCH] Scale subtitle border width --- commands/edit-image/subtitle.js | 3 ++- package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/edit-image/subtitle.js b/commands/edit-image/subtitle.js index 20bac8c1..e9e2c29d 100644 --- a/commands/edit-image/subtitle.js +++ b/commands/edit-image/subtitle.js @@ -63,7 +63,8 @@ module.exports = class SubtitleCommand extends Command { for (let i = 0; i < lines.length; i++) { const textHeight = initial + (i * fontSize) + (i * 10); ctx.strokeStyle = 'black'; - ctx.lineWidth = 3; + const rounded = Math.round(base.height / 100) + ctx.lineWidth = rounded < 1 ? 1 : rounded; ctx.strokeText(lines[i], base.width / 2, textHeight); ctx.fillStyle = 'yellow'; ctx.fillText(lines[i], base.width / 2, textHeight); diff --git a/package.json b/package.json index 2b031eff..f9768c08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "116.16.1", + "version": "116.16.2", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {