Skip to content

Commit

Permalink
More realistic fonts.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Jun 20, 2024
1 parent d561e4a commit d182809
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/disp/disp_mu.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ let MuDisplay = class extends RootDisplay {
ctx.fillRect(16 + (pX + Math.floor(pX / 5)) * mprWidth, 12 + pY * mprWidth, mpaWidth, mpaWidth);
};
ctx.textAlign = "center";
ctx.font = '12px "Arial Web"';
ctx.font = '400 12px "Public Sans"';
ctx.textRendering = "geometricPrecision";
// Display parts under strengths
{
let initOff = 71.5;
Expand Down Expand Up @@ -435,7 +436,7 @@ let MuDisplay = class extends RootDisplay {
ctx.fillText("LSB", 564, 162.5);
ctx.fillStyle = !rendMode ? activePixel : inactivePixel;
ctx.fillText("BANK", 467.5, 162.5);
ctx.fillText("PGM#", 660, 162.5);
ctx.fillText("PGM", 660, 162.5);
ctx.fillStyle = !showLsb && rendMode ? activePixel : inactivePixel;
ctx.fillText("MSB", 131, 162.5);
ctx.fillStyle = showLsb && rendMode ? activePixel : inactivePixel;
Expand Down
2 changes: 1 addition & 1 deletion src/disp/disp_n5.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ let Ns5rDisplay = class extends RootDisplay {
ctx.fillStyle = this.#backlight.replace("64", "");
ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);
ctx.textAlign = "center";
ctx.font = '11px "Arial Web"';
ctx.font = '11px "Jost"';
ctx.fillStyle = "#000e";
ctx.fillText("MIDI. CH", 58, 10);
ctx.fillText("VOL", 153.5 + (+trueMode * 12), 10);
Expand Down
5 changes: 3 additions & 2 deletions src/disp/disp_sc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,15 @@ let ScDisplay = class extends RootDisplay {
let scConf = upThis.device.modelEx.sc;
upThis.#nmdb.fill(0);
// Fill with orange
if (upThis.#countBg < 4 && timeNow - upThis.#lastBg >= 4000) {
if (upThis.#countBg < 10 && timeNow - upThis.#lastBg >= 1000) {
ctx.fillStyle = bgOrange.slice(0, 7);
ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);
upThis.#lastBg = timeNow;
// Show text
ctx.fillStyle = "#000";
ctx.textAlign = "left";
ctx.font = '16px "Arial Web"';
ctx.font = '600 16px "Nunito Sans"';
ctx.textRendering = "geometricPrecision";
ctx.fillText("PART", 21, 20);
ctx.fillText("INSTRUMENT", 154, 20);
ctx.fillText("LEVEL", 21, 91);
Expand Down
15 changes: 15 additions & 0 deletions test/css/fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,18 @@
font-weight: 700;
src: url("../font/PTSansNarrow_b.woff2") format("woff2");
}
@font-face {
font-family: "Public Sans";
font-display: swap;
src: url("../font/PublicSans.woff2") format("woff2");
}
@font-face {
font-family: "Nunito Sans";
font-display: swap;
src: local("Numito Sans"), url("../font/NunitoSans.woff2") format("woff2");
}
@font-face {
font-family: "Jost";
font-display: swap;
src: local("Jost"), url("../font/Jost.woff2") format("woff2");
}

0 comments on commit d182809

Please sign in to comment.