You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passing a font in through --tittleTtfFile is a bit painful. It can be less painful by having a default font.
Lilypond installations will have the following fonts available.
C059, Century SchoolBook URW, Century Schoolbook L, TeX Gyre Schola, DejaVu Serif, …, serif
Pillow needs a file name so we could use one of those fonts by default with ImageFont.truetype('C059-Roman.otf', 20) which works on Linux (Ubuntu 20.04). I don't know if it works on other platforms. If it does, a simple change is required:
if options.titleAtStart and options.titleTtfFile is None:
progress("No font specified with --title-ttf=FONT-FILE, using default font.")
options.titleTtfFile = 'C059-Roman.otf' # should be available via lilypond
# Test font loading here, before continuing
testFont = ImageFont.truetype(options.titleTtfFile)
if testFont is None:
fatal("Must specify --title-ttf=FONT-FILE with --title-at-start")
I can't test windows or mac so I don't know if that file is available on those platforms too or if Pillow can find it.
Another option could be to add 'C059-Roman.otf' to the ly2video repo (it's only 96KB), but then using it becomes tricky. I think it needs to be copied to the /tmp/ly2video.../ directory for Pillow to see it. Otherwise you need an absolute path to the file.
The text was updated successfully, but these errors were encountered:
Passing a font in through
--tittleTtfFile
is a bit painful. It can be less painful by having a default font.Lilypond installations will have the following fonts available.
C059, Century SchoolBook URW, Century Schoolbook L, TeX Gyre Schola, DejaVu Serif, …, serif
Pillow needs a file name so we could use one of those fonts by default with
ImageFont.truetype('C059-Roman.otf', 20)
which works on Linux (Ubuntu 20.04). I don't know if it works on other platforms. If it does, a simple change is required:I can't test windows or mac so I don't know if that file is available on those platforms too or if Pillow can find it.
Another option could be to add 'C059-Roman.otf' to the ly2video repo (it's only 96KB), but then using it becomes tricky. I think it needs to be copied to the /tmp/ly2video.../ directory for Pillow to see it. Otherwise you need an absolute path to the file.
The text was updated successfully, but these errors were encountered: