diff --git a/app-maple-stamp-api/Dockerfile b/app-maple-stamp-api/Dockerfile index 079a744..4ca078e 100644 --- a/app-maple-stamp-api/Dockerfile +++ b/app-maple-stamp-api/Dockerfile @@ -5,11 +5,17 @@ RUN apt-get update && apt-get install -y locales RUN locale-gen ko_KR.UTF-8 ENV LC_ALL ko_KR.UTF-8 +RUN apt-get update && apt-get install -y locales +RUN locale-gen ko_KR.UTF-8 +ENV LC_ALL ko_KR.UTF-8 + # 컨테이너 내부의 /app 디렉토리에 jar 파일 복사 ARG JAR_FILE=build/libs/app-maple-stamp-api-0.0.1-SNAPSHOT.jar ARG CONTAINER_JAR_FILE=app-maple-stamp-api.jar COPY ${JAR_FILE} ${CONTAINER_JAR_FILE} +RUN apt-get update && apt-get -y upgrade && apt-get install -y fonts-nanum* && fc-cache -fv + EXPOSE 9000 # Spring Boot를 실행하기 위한 entry point 지정 diff --git a/app-maple-stamp-api/src/main/java/com/mapletrend/appmaplestampapi/service/StampService.java b/app-maple-stamp-api/src/main/java/com/mapletrend/appmaplestampapi/service/StampService.java index abdca1b..7e747e9 100644 --- a/app-maple-stamp-api/src/main/java/com/mapletrend/appmaplestampapi/service/StampService.java +++ b/app-maple-stamp-api/src/main/java/com/mapletrend/appmaplestampapi/service/StampService.java @@ -49,16 +49,16 @@ public byte[] createStampImage(JSONObject jsonObject) { graphics2D.fillRect(0, 0, 600, 200); int fontSize = 30; - graphics2D.setFont(new Font("Liberation Sans", Font.BOLD, fontSize)); + graphics2D.setFont(new Font("Nanum", Font.BOLD, fontSize)); graphics2D.setColor(Color.black); graphics2D.drawString(invenNickname, 30, 60); - graphics2D.setFont(new Font("Liberation Sans", Font.PLAIN, 20)); + graphics2D.setFont(new Font("Nanum", Font.PLAIN, 20)); graphics2D.drawString("레벨: " + formattedCharacterLevel, 30, 100); graphics2D.drawString("전투력: " + formattedBattlePower, 30, 130); graphics2D.drawString("유니온: " + formattedUnionLevel, 30, 160); - Font detailsFont = new Font("Liberation Sans", Font.PLAIN, 12); + Font detailsFont = new Font("Nanum", Font.PLAIN, 12); graphics2D.setFont(detailsFont); // Calculate position for the text FontMetrics metrics = graphics2D.getFontMetrics(detailsFont); @@ -81,7 +81,7 @@ public byte[] createStampImage(JSONObject jsonObject) { String watermarkText = invenNickname; // Set watermark properties - graphics2D.setFont(new Font("Liberation Sans", Font.PLAIN, watermarkFontSize)); + graphics2D.setFont(new Font("Nanum", Font.PLAIN, watermarkFontSize)); graphics2D.setColor(new Color(0, 0, 0, 128)); graphics2D.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.3f));