Merge remote-tracking branch 'origin/master'

This commit is contained in:
2026-02-16 15:10:37 +03:00
parent 82e51bbfcd
commit f5f37089ac
4 changed files with 4 additions and 4 deletions

View File

@@ -409,7 +409,7 @@ func newOrderPdf() (*gofpdf.Fpdf, error) {
pdf.SetMargins(10, 10, 10) pdf.SetMargins(10, 10, 10)
pdf.SetAutoPageBreak(false, 12) pdf.SetAutoPageBreak(false, 12)
if err := registerDejavuFonts(pdf, "dejavu", "dejavu-b"); err != nil { if err := registerDejavuFonts(pdf, "dejavu"); err != nil {
return nil, err return nil, err
} }

View File

@@ -87,7 +87,7 @@ func resolveAssetPath(fileName string, relativeDirs []string) (string, error) {
return "", fmt.Errorf("asset not found: %s (tried: %s)", fileName, strings.Join(tried, ", ")) return "", fmt.Errorf("asset not found: %s (tried: %s)", fileName, strings.Join(tried, ", "))
} }
func registerDejavuFonts(pdf *gofpdf.Fpdf, s string, s2 string) error { func registerDejavuFonts(pdf *gofpdf.Fpdf, s string) error {
regPath, err := resolvePdfAssetPath("DejaVuSans.ttf") regPath, err := resolvePdfAssetPath("DejaVuSans.ttf")
if err != nil { if err != nil {

View File

@@ -64,7 +64,7 @@ var (
/* ============================ FONT / FORMAT ============================ */ /* ============================ FONT / FORMAT ============================ */
func hEnsureFonts(pdf *gofpdf.Fpdf) error { func hEnsureFonts(pdf *gofpdf.Fpdf) error {
return registerDejavuFonts(pdf, hFontFamilyReg, hFontFamilyBold) return registerDejavuFonts(pdf, hFontFamilyReg)
} }
func hNormalizeWidths(base []float64, targetTotal float64) []float64 { func hNormalizeWidths(base []float64, targetTotal float64) []float64 {

View File

@@ -132,7 +132,7 @@ func formatCurrencyTR(n float64) string {
// Fontları yükle // Fontları yükle
func ensureFonts(pdf *gofpdf.Fpdf) error { func ensureFonts(pdf *gofpdf.Fpdf) error {
return registerDejavuFonts(pdf, fontFamilyReg, fontFamilyBold) return registerDejavuFonts(pdf, fontFamilyReg)
} }
// Güvenli satır kırma // Güvenli satır kırma