Still have problems with utf-8 characters on Ubuntu #resolved #informational #linux


I am trying to adopt ChordPro for my songbook but I'm running into problems with UTF-8 characters, and I'm Polish, so I do need the diactric characters. 

I have Ubuntu 18.04 and chordpro 0.977 installed and runs well, Got it to compile English songs in no time. 

However, I did not get Polish diactric characters in my Polish songs (they are just missing, while the other characters are there). 

I've read the FAQ ( and fixed my font config a few times, in the end putting the actual file paths in the config file, but still cannot get it to work...

The relevant section of config.json:
      "fontdir" : [ "/usr/share/fonts/truetype/msttcorefonts/"],
Chordpro output with --verbose option:

bartek@looper:~/Dropbox/Family/piosenki$ chordpro --chord-grid-size=60 --encoding=UTF-8 --verbose --config=config.json szpital.crd
Writing output to szpital.pdf
Config[0]: <builtin>
Config[1]: ./guitar.json
Config[2]: config.json
== Font family map
courier       ----  /usr/share/fonts/truetype/msttcorefonts/Courier_New.ttf
courier       -b--  /usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold.ttf
courier       i---  /usr/share/fonts/truetype/msttcorefonts/Courier_New_Italic.ttf
courier       ib--  /usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold_Italic.ttf
dingbats      ----  ZapfDingbats
helvetica     ----  Helvetica
helvetica     -b--  Helvetica-Bold
helvetica     i---  Helvetica-Oblique
helvetica     ib--  Helvetica-BoldOblique
times         ----  /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf
times         -b--  /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold.ttf
times         i---  /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Italic.ttf
times         ib--  /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold_Italic.ttf
zapfdingbats  ----+ ZapfDingbats
== Font associations
annotation       [Helvetica-Oblique]
chord            [Helvetica-Oblique]
chordfingers     [ZapfDingbats]
comment          [Helvetica]
comment_box      [Helvetica]
comment_italic   [Helvetica-Oblique]
diagram          [Helvetica]
diagram_base     [Helvetica]
empty            [times]
footer           [times]
grid             [Helvetica]
grid_margin      [Helvetica]
subtitle         [times]
tab              [Courier]
text             [times]
title            [times]
toc              [Times-Roman]
I've also attached screenshots from the libreoffice version of the song, showing that the "ś" character is present in the font and from pdf-viewer showing that it is put into the pdf file (you can see in the title bar that it shows correctly), but not shown in the pdf text itself.

What am I doing wrong?

Johan Vromans

Can you run chordpro with additional --debug and attach the generated PDF file?

Johan Vromans

I think in the font associations, you used "name" : "times" instead of "description" : "times".

"name" refers to builtin fonts only.

See also .


Indeed changing "name" to description did help.