fix(projects): use top baseline instead of hanging
This commit is contained in:
@@ -58,7 +58,7 @@ const drawTextWithShadow2Lines = (
|
||||
onRender((ctx) => {
|
||||
assets.images.projects.topScreen.background.draw(ctx, 0, 0);
|
||||
|
||||
ctx.textBaseline = "hanging";
|
||||
ctx.textBaseline = "top";
|
||||
ctx.font = "16px Pokemon DP Pro";
|
||||
|
||||
const project = store.projects[store.currentProject];
|
||||
@@ -99,14 +99,14 @@ onRender((ctx) => {
|
||||
ctx.restore();
|
||||
|
||||
// text
|
||||
drawTextWithShadow(ctx, "white", project.title.toUpperCase(), 23, 25);
|
||||
drawTextWithShadow(ctx, "black", project.scope, 12, 41);
|
||||
drawTextWithShadow(ctx, "white", project.title.toUpperCase(), 23, 23);
|
||||
drawTextWithShadow(ctx, "black", project.scope, 12, 39);
|
||||
|
||||
drawTextWithShadow2Lines(
|
||||
ctx,
|
||||
project.description,
|
||||
8,
|
||||
161,
|
||||
159,
|
||||
90,
|
||||
"white",
|
||||
"black",
|
||||
@@ -120,7 +120,7 @@ onRender((ctx) => {
|
||||
"black",
|
||||
project.summary,
|
||||
Math.floor(185 - textWidth / 2),
|
||||
19,
|
||||
17,
|
||||
);
|
||||
|
||||
let textY = 35;
|
||||
@@ -134,7 +134,7 @@ onRender((ctx) => {
|
||||
ctx.fillRect(105, textY - 1, 1, lines.length * 16);
|
||||
|
||||
for (let j = 0; j < lines.length; j += 1) {
|
||||
drawTextWithShadow(ctx, "white", lines[j]!, 118, textY);
|
||||
drawTextWithShadow(ctx, "white", lines[j]!, 118, textY - 2);
|
||||
textY += 16;
|
||||
}
|
||||
}
|
||||
@@ -143,7 +143,7 @@ onRender((ctx) => {
|
||||
ctx,
|
||||
project.technologies.join(", "),
|
||||
111,
|
||||
161,
|
||||
159,
|
||||
145,
|
||||
"black",
|
||||
"black",
|
||||
|
||||
Reference in New Issue
Block a user