diff --git a/app/Services/ESign/PdfSignatureService.php b/app/Services/ESign/PdfSignatureService.php index ccd00d5f..c2dd8ef3 100644 --- a/app/Services/ESign/PdfSignatureService.php +++ b/app/Services/ESign/PdfSignatureService.php @@ -13,7 +13,8 @@ class PdfSignatureService private ?string $koreanFontName = null; /** - * NanumGothic 한글 폰트를 등록하고 폰트 이름을 반환한다. + * Pretendard 한글 폰트를 등록하고 폰트 이름을 반환한다. + * PDF 문서와 동일한 폰트로 필드 텍스트를 렌더링하여 일관성을 유지한다. */ private function getKoreanFont(): string { @@ -21,7 +22,9 @@ private function getKoreanFont(): string return $this->koreanFontName; } - $fontPath = '/usr/share/fonts/truetype/nanum/NanumGothic.ttf'; + // 1순위: 프로젝트 내장 Pretendard (로컬/서버 공통) + $fontPath = storage_path('fonts/Pretendard-Regular.ttf'); + if (file_exists($fontPath)) { $this->koreanFontName = \TCPDF_FONTS::addTTFfont($fontPath, 'TrueTypeUnicode', '', 96); } diff --git a/storage/fonts/Pretendard-Regular.ttf b/storage/fonts/Pretendard-Regular.ttf new file mode 100644 index 00000000..01147e99 Binary files /dev/null and b/storage/fonts/Pretendard-Regular.ttf differ