File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 69
69
expand : true
70
70
file_info :
71
71
mode : 0755
72
- - src : ./highlight
73
- dst : /usr/share/{{ .PackageName }}/syntax_highlight
72
+ - src : ./highlight/syntax_files
73
+ dst : /usr/share/{{ .PackageName }}/syntax_files
74
74
expand : true
75
75
file_info :
76
76
mode : 0755
Original file line number Diff line number Diff line change @@ -86,7 +86,11 @@ func main() {
86
86
if * pathToSyntaxFiles != "" {
87
87
opts = append (opts , mdtopdf .SetSyntaxHighlightBaseDir (* pathToSyntaxFiles ))
88
88
} else {
89
- opts = append (opts , mdtopdf .SetSyntaxHighlightBaseDir ("../../highlight/syntax_files" ))
89
+ if _ , err := os .Stat ("../../highlight/syntax_files" ); err == nil {
90
+ opts = append (opts , mdtopdf .SetSyntaxHighlightBaseDir ("/usr/share/mdtopdf/syntax_files" ))
91
+ } else if _ , err := os .Stat ("/usr/share/mdtopdf/syntax_files" ); err == nil {
92
+ opts = append (opts , mdtopdf .SetSyntaxHighlightBaseDir ("../../highlight/syntax_files" ))
93
+ }
90
94
}
91
95
92
96
// get text for PDF
@@ -169,6 +173,8 @@ func main() {
169
173
pf .Extensions = parser .NoIntraEmphasis | parser .Tables | parser .FencedCode | parser .Autolink | parser .Strikethrough | parser .SpaceHeadings | parser .HeadingIDs | parser .BackslashLineBreak | parser .DefinitionLists
170
174
171
175
if * fontFile != "" && * fontName != "" {
176
+ fmt .Println (* fontFile )
177
+ // pf.Pdf.AddUTF8Font(*fontName, "", *fontFile)
172
178
pf .Pdf .AddFont (* fontName , "" , * fontFile )
173
179
pf .Pdf .SetFont (* fontName , "" , 12 )
174
180
pf .Normal = mdtopdf.Styler {
You can’t perform that action at this time.
0 commit comments