Closed JohannesGaessler closed 2 years ago
You must type the full path to font for this to work.
I can confirm that setting the font to the full path of an installed font works. I think catching the exception and re-throwing with a more informative error message may be useful.
I also tried what someone on /g/ suggested and installed the MS core fonts but this did not seem to work on my machine (Manjaro, maybe I would have needed to reboot for it to work?).
I strongly doubt you can get it to work on linux without full path.
I'm on Debian Linux and don't have to use full path, I just have DejaVuSans.ttf
in the conf.
Maybe you have to put NotoSans-Medium.ttf
instead of Noto Sans
.
I think I figured the problem out.
I queried where my package manager installed the fonts and the font that is the default for webui is installed under /usr/share/fonts/TTF/Arial.TTF
.
Since Linux file systems are case sensitive I tried setting the font to "Arial.TTF".
I could then use the prompt matrix grid without issue.
A Windows user on /g/ reported having issues with capitalization:
Changed it from Arial.TTF to arial.ttf and it works now, thanks. But how the fuck does this matter in the first place? Isn't Windows case-insensitive?
One solution I see to get rid of fonts issue regardless of the OS is to provide one with the webui. There is a python package for that: https://pypi.org/project/fonts/ We can use for example the free Roboto font. Usage is simple:
from fonts.ttf import Roboto
font = ImageFont.truetype(Roboto)
If @AUTOMATIC1111 is ok with that solution, I think I can do a PR for that 😉
I kind of don't want to include a font.
Edit: never mind, go for it.
When trying to create a prompt matrix on Linux:
Intuitively I would have assumed that the problem is that the font set as the default is not available on Linux but after setting the font to "Noto Sans" I still get this exception (I don't know if the string I typed in is the correct way to specify the font).