mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 00:07:36 +02:00
Scale subtitle border width
This commit is contained in:
@@ -63,7 +63,8 @@ module.exports = class SubtitleCommand extends Command {
|
|||||||
for (let i = 0; i < lines.length; i++) {
|
for (let i = 0; i < lines.length; i++) {
|
||||||
const textHeight = initial + (i * fontSize) + (i * 10);
|
const textHeight = initial + (i * fontSize) + (i * 10);
|
||||||
ctx.strokeStyle = 'black';
|
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.strokeText(lines[i], base.width / 2, textHeight);
|
||||||
ctx.fillStyle = 'yellow';
|
ctx.fillStyle = 'yellow';
|
||||||
ctx.fillText(lines[i], base.width / 2, textHeight);
|
ctx.fillText(lines[i], base.width / 2, textHeight);
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "116.16.1",
|
"version": "116.16.2",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user