Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 특성 환경에서 폰트를 제대로 표시하지 못하는 문제 #149

Merged
merged 2 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions public/css/editor.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.8/dist/web/variable/pretendardvariable-jp-dynamic-subset.css");
@import url("https://fonts.googleapis.com/css?family=Heebo:400,500,600&display=swap");
@import url("https://fonts.googleapis.com/css?family=Montserrat:400,500,600,700&display=swap");
@import url("metropolis.css");

body {
Expand All @@ -12,7 +12,9 @@ body {
margin: 0;
padding: 0;
text-align: center;
font-family: "Pretendard JP Variable", "나눔바른고딕", arial;
font-family: "Montserrat", "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans",
"Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-feature-settings: "ss05";
letter-spacing: -0.3px;
overflow-x: hidden;
overflow-y: hidden;
Expand Down Expand Up @@ -139,7 +141,9 @@ body {
}

.metropolis {
font-family: "Metropolis", "Pretendard JP Variable", "나눔바른고딕", arial;
font-family: "Metropolis", "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans",
"Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-feature-settings: "ss05";
}

#topCenterBar {
Expand Down Expand Up @@ -642,7 +646,9 @@ body {
}

kbd {
font-family: "Metropolis", "Pretendard JP Variable", "나눔바른고딕", arial;
font-family: "Metropolis", "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans",
"Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-feature-settings: "ss05";
font-style: italic;
border: 1.5px solid #555;
padding: 2px 10px 2px 6px;
Expand Down Expand Up @@ -715,7 +721,9 @@ kbd {
}

.optionValue {
font-family: "Metropolis", "Pretendard JP Variable", "나눔바른고딕", arial;
font-family: "Montserrat", "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans",
"Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-feature-settings: "ss05";
font-weight: 400;
color: #404040;
font-size: 2vh;
Expand Down
6 changes: 4 additions & 2 deletions public/css/error.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable.css");
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.8/dist/web/variable/pretendardvariable-jp.css");

body {
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
background-color: #eee;
font-family: "Metropolis", "Pretendard Variable", "나눔바른고딕", arial;
font-family: "Montserrat", "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans",
"Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-feature-settings: "ss05";
letter-spacing: -0.5px;
display: flex;
flex-direction: column;
Expand Down
25 changes: 19 additions & 6 deletions public/css/game.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.8/dist/web/variable/pretendardvariable-jp.css");
@import url("https://fonts.googleapis.com/css?family=Montserrat:400,500,600,700&display=swap");
@import url("metropolis.css");

@-moz-document url-prefix() {
Expand All @@ -16,14 +17,18 @@ body {
margin: 0;
padding: 0;
text-align: center;
font-family: "Pretendard JP Variable", "나눔바른고딕", arial;
font-family: "Montserrat", "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans",
"Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-feature-settings: "ss05";
letter-spacing: -0.3px;
overflow-x: hidden;
overflow-y: hidden;
}

.metropolis {
font-family: "Metropolis", "Pretendard JP Variable", "나눔바른고딕", arial;
font-family: "Metropolis", "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans",
"Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-feature-settings: "ss05";
}

.lighter {
Expand Down Expand Up @@ -894,7 +899,9 @@ p {

.optionValue {
margin-top: 0.5vh;
font-family: "Pretendard JP Variable", "나눔바른고딕", arial;
font-family: "Montserrat", "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans",
"Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-feature-settings: "ss05";
font-weight: 400;
color: #404040;
font-size: 2vh;
Expand All @@ -907,7 +914,9 @@ p {
width: 10vw;
height: 5vh;
font-size: 2vh;
font-family: "Pretendard JP Variable", "나눔바른고딕", arial;
font-family: "Montserrat", "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans",
"Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-feature-settings: "ss05";
letter-spacing: -0.5px;
color: #fff;
background-color: #666;
Expand Down Expand Up @@ -952,7 +961,9 @@ p {
text-align: center;
padding: 1.2vh 3vw 1.2vh 3vw;
font-size: 2vh;
font-family: "Pretendard JP Variable", "나눔바른고딕", arial;
font-family: "Montserrat", "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans",
"Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-feature-settings: "ss05";
letter-spacing: -0.5px;
color: #fff;
text-decoration: none;
Expand Down Expand Up @@ -1658,7 +1669,9 @@ input[type="number"] {

.timingText {
margin-top: 1vh;
font-family: "Pretendard JP Variable", "나눔바른고딕", arial;
font-family: "Montserrat", "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans",
"Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-feature-settings: "ss05";
font-size: 2vh;
font-weight: 400;
}
Expand Down
5 changes: 4 additions & 1 deletion public/css/index.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.8/dist/web/variable/pretendardvariable-jp-dynamic-subset.css");
@import url("https://fonts.googleapis.com/css?family=Montserrat:400,500,600,700&display=swap");

body {
margin: 0;
padding: 0;
text-align: center;
font-family: "Pretendard JP Variable", "나눔바른고딕", arial;
font-family: "Montserrat", "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans",
"Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-feature-settings: "ss05";
letter-spacing: -0.3px;
overflow: hidden;
user-select: none;
Expand Down
4 changes: 3 additions & 1 deletion public/css/info.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ body {
align-items: flex-start;
justify-content: flex-start;
letter-spacing: -0.3px;
font-family: "Montserrat", "Pretendard JP Variable", system-ui, -apple-system, arial;
font-family: "Montserrat", "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans",
"Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-feature-settings: "ss05";
background-color: white;
margin: 3vh 3vw;
padding: 0;
Expand Down
9 changes: 7 additions & 2 deletions public/css/join.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.8/dist/web/variable/pretendardvariable-jp-dynamic-subset.css");
@import url("https://fonts.googleapis.com/css?family=Montserrat:400,500,600,700&display=swap");

body {
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
background-color: #eee;
font-family: "Pretendard JP Variable", "나눔바른고딕", arial;
font-family: "Montserrat", "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans",
"Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-feature-settings: "ss05";
letter-spacing: -0.3px;
display: flex;
flex-direction: column;
Expand All @@ -15,7 +18,9 @@ body {
}

input {
font-family: "Pretendard JP Variable", "나눔바른고딕", arial;
font-family: "Montserrat", "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans",
"Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-feature-settings: "ss05";
}

form {
Expand Down
9 changes: 6 additions & 3 deletions public/css/play.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.8/dist/web/variable/pretendardvariable-jp-dynamic-subset.css");
@import url("https://fonts.googleapis.com/css?family=Heebo:400,500,600&display=swap");
@import url("https://fonts.googleapis.com/css?family=Montserrat:400,500,600,800&display=swap");

body {
Expand All @@ -11,7 +10,9 @@ body {
margin: 0;
padding: 0;
text-align: center;
font-family: "Montserrat", "Pretendard JP Variable", "나눔바른고딕", arial;
font-family: "Montserrat", "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans",
"Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-feature-settings: "ss05";
letter-spacing: -0.3px;
overflow-x: hidden;
overflow-y: hidden;
Expand Down Expand Up @@ -759,7 +760,9 @@ body {
}

.optionValue {
font-family: "Montserrat", "Pretendard JP Variable", "나눔바른고딕", arial;
font-family: "Montserrat", "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans",
"Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-feature-settings: "ss05";
font-weight: 400;
color: #404040;
font-size: 2vh;
Expand Down
22 changes: 11 additions & 11 deletions public/js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ const drawNote = (p, x, y, s, n, d, t, f) => {
if (s == true) {
cntCtx.lineWidth = Math.round(cntCanvas.width / 300);
cntCtx.beginPath();
cntCtx.font = `500 ${window.innerHeight / 40}px Metropolis, Pretendard JP Variable`;
cntCtx.font = `500 ${window.innerHeight / 40}px Montserrat, Pretendard JP Variable, Pretendard JP, Pretendard`;
cntCtx.fillStyle = "#000";
cntCtx.strokeStyle = "#fff";
cntCtx.textAlign = "center";
Expand Down Expand Up @@ -532,7 +532,7 @@ const drawBullet = (x, y, a, s, l, d) => {
let w = cntCanvas.width / 80;
if (s == true) {
cntCtx.beginPath();
cntCtx.font = `500 ${window.innerHeight / 40}px Metropolis, Pretendard JP Variable`;
cntCtx.font = `500 ${window.innerHeight / 40}px Montserrat, Pretendard JP Variable, Pretendard JP, Pretendard`;
cntCtx.fillStyle = "#000";
cntCtx.strokeStyle = "#fff";
cntCtx.textAlign = d == "L" ? "left" : "right";
Expand Down Expand Up @@ -682,7 +682,7 @@ const trackMouseSelection = (i, v1, v2, x, y) => {
}
break;
default:
cntCtx.font = `500 ${window.innerHeight / 40}px Metropolis, Pretendard JP Variable`;
cntCtx.font = `500 ${window.innerHeight / 40}px Montserrat, Pretendard JP Variable, Pretendard JP, Pretendard`;
cntCtx.fillStyle = "#F55";
cntCtx.textAlign = "left";
cntCtx.textBaseline = "top";
Expand Down Expand Up @@ -838,7 +838,7 @@ const tmlRender = () => {
tmlCtx.fillStyle = "#111";
tmlCtx.textAlign = "left";
tmlCtx.textBaseline = "middle";
tmlCtx.font = `${tmlCanvas.height / 14}px Metropolis, Pretendard JP Variable`;
tmlCtx.font = `${tmlCanvas.height / 14}px Montserrat, Pretendard JP Variable, Pretendard JP, Pretendard`;
tmlCtx.fillText("Note", startX * 1.2 + height / 6, startY + timelineYLoc + height / 1.8);
let i = 1;
for (i; i <= bulletsOverlapNum; i++) {
Expand All @@ -863,7 +863,7 @@ const tmlRender = () => {
tmlCtx.fillStyle = "#FFF";
tmlCtx.fillRect(0, endY, endX, tmlCanvas.height - endY);
tmlCtx.fillRect(0, 0, endX, startY);
tmlCtx.font = `${tmlCanvas.height / 16}px Metropolis, Pretendard JP Variable`;
tmlCtx.font = `${tmlCanvas.height / 16}px Montserrat, Pretendard JP Variable, Pretendard JP, Pretendard`;
tmlCtx.textAlign = "center";
tmlCtx.textBaseline = "bottom";
tmlCtx.fillStyle = "#777";
Expand Down Expand Up @@ -966,7 +966,7 @@ const tmlRender = () => {
}

//Sync alert text
tmlCtx.font = `500 ${tmlCanvas.height / 15}px Metropolis, Pretendard JP Variable`;
tmlCtx.font = `500 ${tmlCanvas.height / 15}px Montserrat, Pretendard JP Variable, Pretendard JP, Pretendard`;
tmlCtx.fillStyle = "#555";
tmlCtx.textAlign = "right";
tmlCtx.textBaseline = "top";
Expand Down Expand Up @@ -1007,7 +1007,7 @@ const tmlRender = () => {
timelineContainer.style.cursor = "url('/images/parts/cursor/blueSelect.cur'), pointer";
}
} catch (e) {
tmlCtx.font = `500 ${tmlCanvas.height / 15}px Metropolis, Pretendard JP Variable`;
tmlCtx.font = `500 ${tmlCanvas.height / 15}px Montserrat, Pretendard JP Variable, Pretendard JP, Pretendard`;
tmlCtx.fillStyle = "#F55";
tmlCtx.textAlign = "left";
tmlCtx.textBaseline = "top";
Expand Down Expand Up @@ -1176,9 +1176,9 @@ const cntRender = () => {
cntCtx.beginPath();
if (denySkin) cntCtx.fillStyle = "#111";
else cntCtx.fillStyle = "#fff";
cntCtx.font = `${renderTriggers[i].weight} ${renderTriggers[i].size} Metropolis, Pretendard JP Variable`;
cntCtx.font = `${renderTriggers[i].weight} ${renderTriggers[i].size} Montserrat, Pretendard JP Variable, Pretendard JP, Pretendard`;
if (renderTriggers[i].size.indexOf("vh") != -1)
cntCtx.font = `${renderTriggers[i].weight} ${(cntCanvas.height / 100) * Number(renderTriggers[i].size.split("vh")[0])}px Metropolis, Pretendard JP Variable`;
cntCtx.font = `${renderTriggers[i].weight} ${(cntCanvas.height / 100) * Number(renderTriggers[i].size.split("vh")[0])}px Montserrat, Pretendard JP Variable, Pretendard JP, Pretendard`;
cntCtx.textAlign = renderTriggers[i].align;
cntCtx.textBaseline = renderTriggers[i].valign;
cntCtx.fillText(renderTriggers[i].text, tw * (renderTriggers[i].x + 100), th * (renderTriggers[i].y + 100));
Expand Down Expand Up @@ -1317,7 +1317,7 @@ const cntRender = () => {
cntCtx.moveTo(cntCanvas.width / 2 - 15, cntCanvas.height / 2 - 15);
cntCtx.lineTo(cntCanvas.width / 2 + 15, cntCanvas.height / 2 - 15);
cntCtx.stroke();
cntCtx.font = `500 ${cntCanvas.height / 25}px Metropolis, Pretendard JP Variable`;
cntCtx.font = `500 ${cntCanvas.height / 25}px Montserrat, Pretendard JP Variable, Pretendard JP, Pretendard`;
cntCtx.textAlign = "center";
cntCtx.textBaseline = "top";
cntCtx.fillText("Click to add Trigger", cntCanvas.width / 2, cntCanvas.height / 2 + 10);
Expand All @@ -1331,7 +1331,7 @@ const cntRender = () => {
}
} catch (e) {
if (e) {
cntCtx.font = `500 ${window.innerHeight / 40}px Metropolis, Pretendard JP Variable`;
cntCtx.font = `500 ${window.innerHeight / 40}px Montserrat, Pretendard JP Variable, Pretendard JP, Pretendard`;
cntCtx.fillStyle = "#F55";
cntCtx.textAlign = "left";
cntCtx.textBaseline = "top";
Expand Down
20 changes: 10 additions & 10 deletions public/js/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const animContainer = document.getElementById("animContainer");
// const animContainer = document.getElementById("animContainer");
const safariBlocker = document.getElementById("safariBlocker");
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);

Expand All @@ -10,15 +10,15 @@ document.addEventListener("DOMContentLoaded", () => {
document.location.href = document.location.href.replace("http:", "https:");
return;
}
let widthWidth = window.innerWidth;
let heightWidth = (window.innerHeight / 9) * 16;
if (widthWidth > heightWidth) {
animContainer.style.width = `${widthWidth}px`;
animContainer.style.height = `${(widthWidth / 16) * 9}px`;
} else {
animContainer.style.width = `${heightWidth}px`;
animContainer.style.height = `${(heightWidth / 16) * 9}px`;
}
// let widthWidth = window.innerWidth;
// let heightWidth = (window.innerHeight / 9) * 16;
// if (widthWidth > heightWidth) {
// animContainer.style.width = `${widthWidth}px`;
// animContainer.style.height = `${(widthWidth / 16) * 9}px`;
// } else {
// animContainer.style.width = `${heightWidth}px`;
// animContainer.style.height = `${(heightWidth / 16) * 9}px`;
// }
fetch(`${api}/auth/status`, {
method: "GET",
credentials: "include",
Expand Down
Loading
Loading