feat: [esign] PDF 서명 합성 폰트를 Pretendard로 통일
- NanumGothic → Pretendard-Regular.ttf 변경 - 전자계약 PDF 원본과 동일한 폰트로 필드 텍스트 렌더링 - storage/fonts/에 Pretendard-Regular.ttf 내장 (로컬/서버 공통)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
BIN
storage/fonts/Pretendard-Regular.ttf
Normal file
BIN
storage/fonts/Pretendard-Regular.ttf
Normal file
Binary file not shown.
Reference in New Issue
Block a user