Open itsmeherefolks opened 6 months ago
A middle-ground solution would be to have this configurable - on Gentoo I do not have truetype or TFF in /usr/share/fonts, and packages have their own directories (dejavu, liberation-fonts, noto, …). Or go with the proper Linux font system and use fontconfig, but this is more complex fix
Just noticed the same issue recently.
Personally I think, rather than populating system fonts, may be adding a separate path in the ComfyUI installation instead might be better.
or maybe using command like fc-list
to list font files in the system instead of read the font directory manually.
I've proposed a fix in #124 which just reads any directory under /usr/share/fonts
. Maybe that's going to gather too many fonts, but at least it should be more robust.
Description
There appears to be an issue with the
CR_SelectFont
class in the ComfyUI Comfyroll CustomNodes. The class incorrectly specifies the font directory path for Manjaro Linux systems. This causes aFileNotFoundError
since the script is unable to locate the correct font directory.Issue Details
In the
CR_SelectFont
class, the font directory for Linux systems is set as"/usr/share/fonts/truetype"
. However, the standard path for system fonts in Manjaro Linux (an Arch-based distribution) is"/usr/share/fonts/TTF"
. This discrepancy leads to the script not finding the font files, thereby causing this error.Hot Fix For Manjaro
To resolve this issue, I updated the font directory path for Linux systems in the
CR_SelectFont
class. The updated code snippet is:Additional Information
A solution for this problem would ensure better compatibility with Manjaro Linux systems and potentially other Arch-based distributions.
Looking forward to the update, and thank you for your work on this project!