Skip to content

Commit 8decf28

Browse files
Merge pull request #1565 from cboard-org/revert-1555-fix/support-fonts-pdf
Revert "Fix Text for pdf exported boards "
2 parents b266a7c + 0644c43 commit 8decf28

File tree

2 files changed

+24
-75
lines changed

2 files changed

+24
-75
lines changed

src/components/Settings/Export/Export.helpers.js

+9-74
Original file line numberDiff line numberDiff line change
@@ -37,66 +37,22 @@ pdfMake.vfs = pdfFonts.pdfMake.vfs;
3737
// Add all supported fonts for languages
3838
pdfMake.fonts = {
3939
Khmer: {
40-
normal:
41-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/Khmer-Regular.ttf',
42-
bold:
43-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/Khmer-Regular.ttf'
40+
normal: 'Khmer-Regular.ttf',
41+
bold: 'Khmer-Regular.ttf'
4442
},
4543
Roboto: {
4644
normal: 'Roboto-Regular.ttf',
47-
bold: 'Roboto-Regular.ttf'
45+
bold: 'Roboto-Medium.ttf',
46+
italics: 'Roboto-Italic.ttf',
47+
bolditalics: 'Roboto-MediumItalic.ttf'
4848
},
4949
Tajawal: {
50-
normal:
51-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/Tajawal-Regular.ttf',
52-
bold:
53-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/Tajawal-Regular.ttf'
50+
normal: 'Tajawal-Regular.ttf',
51+
bold: 'Tajawal-Bold.ttf'
5452
},
5553
THSarabunNew: {
56-
normal:
57-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/Sarabun-Regular.ttf',
58-
bold:
59-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/Sarabun-Regular.ttf'
60-
},
61-
Hind: {
62-
normal:
63-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/Hind-Medium.ttf',
64-
bold:
65-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/Hind-Medium.ttf'
66-
},
67-
NotoSansHebrew: {
68-
normal:
69-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/NotoSansHebrew.ttf',
70-
bold:
71-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/NotoSansHebrew.ttf'
72-
},
73-
NotoSansJP: {
74-
normal:
75-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/NotoSansJP-Regular.ttf',
76-
bold:
77-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/NotoSansJP-Regular.ttf'
78-
},
79-
NotoSansKR: {
80-
normal:
81-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/NotoSansKR.otf',
82-
bold: 'https://cboardgroupqadiag.blob.core.windows.net/fonts/NotoSansKR.otf'
83-
},
84-
NotoSansNP: {
85-
normal:
86-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/NotoSansNP.ttf',
87-
bold: 'https://cboardgroupqadiag.blob.core.windows.net/fonts/NotoSansNP.ttf'
88-
},
89-
NotoSansSC: {
90-
normal:
91-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/NotoSansSC-Regular.otf',
92-
bold:
93-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/NotoSansSC-Regular.otf'
94-
},
95-
NotoSerifBengali: {
96-
normal:
97-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/NotoSerifBengali.ttf',
98-
bold:
99-
'https://cboardgroupqadiag.blob.core.windows.net/fonts/NotoSerifBengali.ttf'
54+
normal: 'THSarabunNew.ttf',
55+
bold: 'THSarabunNew.ttf'
10056
}
10157
};
10258

@@ -934,27 +890,6 @@ export async function pdfExportAdapter(boards = [], intl, picsee = false) {
934890
case 'th':
935891
font = 'THSarabunNew';
936892
break;
937-
case 'hi':
938-
font = 'Hind';
939-
break;
940-
case 'he':
941-
font = 'NotoSansHebrew';
942-
break;
943-
case 'ja':
944-
font = 'NotoSansJP';
945-
break;
946-
case 'ko':
947-
font = 'NotoSansKR';
948-
break;
949-
case 'ne':
950-
font = 'NotoSansNP';
951-
break;
952-
case 'zh':
953-
font = 'NotoSansSC';
954-
break;
955-
case 'bn':
956-
font = 'NotoSerifBengali';
957-
break;
958893
default:
959894
font = 'Roboto';
960895
}

src/vfs_fonts.js

+15-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)