updates
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Владимир Фёдоров 2023-10-01 19:52:14 +07:00
parent f976829ba3
commit e9512d2529
3 changed files with 17 additions and 6 deletions

Binary file not shown.

View File

@ -82,15 +82,16 @@ const savePng = async () => {
<Page> <Page>
<div id="typeSelector"> <div id="typeSelector">
<Button :size="ButtonSize.Small" <Button :size="ButtonSize.Small"
:active="typeSelector == 'rus' && vRotation == 65 && vMargin == 15 && hMargin == 40 && hMargin2 == 20 && imageWidth == 210 && imageHeight == 297" :active="typeSelector == 'rus' && vRotation == 65 && vMargin == 3 && hMargin == 8 && hMargin2 == 4 && imageWidth == 148 && imageHeight == 210 && marginEnable == true"
:click="() => { :click="() => {
typeSelector = 'rus'; typeSelector = 'rus';
vRotation = 65; vRotation = 65;
vMargin = 15; vMargin = 3;
hMargin = 40; hMargin = 8;
hMargin2 = 20; hMargin2 = 4;
imageWidth = 210; imageWidth = 148;
imageHeight = 297; imageHeight = 210;
marginEnable = true;
}">Тетрадь в линию</Button> }">Тетрадь в линию</Button>
<Button :size="ButtonSize.Small" <Button :size="ButtonSize.Small"
:active="typeSelector == 'rus' && vRotation == 90 && vMargin == 30 && hMargin == 30 && hMargin2 == 30 && imageWidth == 210 && imageHeight == 297" :active="typeSelector == 'rus' && vRotation == 90 && vMargin == 30 && hMargin == 30 && hMargin2 == 30 && imageWidth == 210 && imageHeight == 297"

View File

@ -93,6 +93,10 @@ const render = () => {
ctx.value.lineTo(x, imageHeightPx); ctx.value.lineTo(x, imageHeightPx);
ctx.value.stroke(); ctx.value.stroke();
} }
// ctx.value.font = hMargins[1] * 3 * ONE_MM + "px propisi"; // todo хз почему тут x3
// ctx.value.fillStyle = "#cccccc";
// ctx.value.fillText("Привет мир", 100, (hMargins[0] + hMargins[1]) * ONE_MM);
} }
}; };
@ -103,6 +107,12 @@ onMounted(() => {
ctx.value = canvas.getContext("2d"); ctx.value = canvas.getContext("2d");
} }
var f = new FontFace('propisi', 'url(/fonts/ttf/propisi.ttf)');
f.load().then(function (font) {
console.log('font propisi ready');
document.fonts.add(font);
});
render(); render();
}); });