diff --git a/app/Services/ESign/PdfSignatureService.php b/app/Services/ESign/PdfSignatureService.php index 5116b2fd..b170ea01 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)) { // 폰트 캐시를 storage에 저장 (vendor 디렉토리 쓰기 권한 문제 방지) $fontCacheDir = storage_path('app/private/fonts'); 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