feat: [esign] PDF 서명 합성 폰트를 Pretendard로 통일

- NanumGothic → Pretendard-Regular.ttf 변경
- 전자계약 PDF 원본과 동일한 폰트로 필드 텍스트 렌더링
- storage/fonts/에 Pretendard-Regular.ttf 내장 (로컬/서버 공통)
This commit is contained in:
김보곤
2026-02-26 15:14:50 +09:00
parent 70ef10e201
commit 23e6b1d5d1
2 changed files with 5 additions and 2 deletions

View File

@@ -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');

Binary file not shown.