I have tried to train a new font for Tesseract using [JTessboxeditor][1], but it kept running this issue as displayed on the screenshot attached. I read ob some forum that I need to Cache the font – I did by issuing this command fc-cache -vf It returned the output as successful.
christdoes@Kehindes-MBP ~ % fc-cache -vf Font directories: /System/Library/Fonts /Library/Fonts /Users/christdoes/Library/Fonts /System/Library/AssetsV2/com_apple_MobileAsset_Font7 /Users/christdoes/.local/share/fonts /usr/local/share/fonts /usr/share/fonts /Users/christdoes/.fonts /System/Library/Fonts/Supplemental /System/Library/AssetsV2/com_apple_MobileAsset_Font7/1d0b3e824e9e66b6052b7d210fff87fa6c9d135f.asset /System/Library/AssetsV2/com_apple_MobileAsset_Font7/3a664750f87ebac0ccd5708d42f3844d06bb6f7b.asset /System/Library/AssetsV2/com_apple_MobileAsset_Font7/1d0b3e824e9e66b6052b7d210fff87fa6c9d135f.asset/AssetData /System/Library/AssetsV2/com_apple_MobileAsset_Font7/1d0b3e824e9e66b6052b7d210fff87fa6c9d135f.asset/META-INF /System/Library/AssetsV2/com_apple_MobileAsset_Font7/3a664750f87ebac0ccd5708d42f3844d06bb6f7b.asset/AssetData /System/Library/AssetsV2/com_apple_MobileAsset_Font7/3a664750f87ebac0ccd5708d42f3844d06bb6f7b.asset/META-INF /System/Library/Fonts: caching, new cache contents: 872 fonts, 1 dirs /System/Library/Fonts/Supplemental: caching, new cache contents: 482 fonts, 0 dirs /Library/Fonts: caching, new cache contents: 37 fonts, 0 dirs /Users/christdoes/Library/Fonts: caching, new cache contents: 17 fonts, 0 dirs /System/Library/AssetsV2/com_apple_MobileAsset_Font7: caching, new cache contents: 0 fonts, 2 dirs /System/Library/AssetsV2/com_apple_MobileAsset_Font7/1d0b3e824e9e66b6052b7d210fff87fa6c9d135f.asset: caching, new cache contents: 0 fonts, 2 dirs /System/Library/AssetsV2/com_apple_MobileAsset_Font7/1d0b3e824e9e66b6052b7d210fff87fa6c9d135f.asset/AssetData: caching, new cache contents: 10 fonts, 0 dirs /System/Library/AssetsV2/com_apple_MobileAsset_Font7/1d0b3e824e9e66b6052b7d210fff87fa6c9d135f.asset/META-INF: caching, new cache contents: 0 fonts, 0 dirs /System/Library/AssetsV2/com_apple_MobileAsset_Font7/3a664750f87ebac0ccd5708d42f3844d06bb6f7b.asset: caching, new cache contents: 0 fonts, 2 dirs /System/Library/AssetsV2/com_apple_MobileAsset_Font7/3a664750f87ebac0ccd5708d42f3844d06bb6f7b.asset/AssetData: caching, new cache contents: 8 fonts, 0 dirs /System/Library/AssetsV2/com_apple_MobileAsset_Font7/3a664750f87ebac0ccd5708d42f3844d06bb6f7b.asset/META-INF: caching, new cache contents: 0 fonts, 0 dirs /Users/christdoes/.local/share/fonts: skipping, no such directory /usr/local/share/fonts: skipping, no such directory /usr/share/fonts: skipping, no such directory /Users/christdoes/.fonts: skipping, no such directory /System/Library/Fonts/Supplemental: skipping, looped directory detected /System/Library/AssetsV2/com_apple_MobileAsset_Font7/1d0b3e824e9e66b6052b7d210fff87fa6c9d135f.asset: skipping, looped directory detected /System/Library/AssetsV2/com_apple_MobileAsset_Font7/3a664750f87ebac0ccd5708d42f3844d06bb6f7b.asset: skipping, looped directory detected /System/Library/AssetsV2/com_apple_MobileAsset_Font7/1d0b3e824e9e66b6052b7d210fff87fa6c9d135f.asset/AssetData: skipping, looped directory detected /System/Library/AssetsV2/com_apple_MobileAsset_Font7/1d0b3e824e9e66b6052b7d210fff87fa6c9d135f.asset/META-INF: skipping, looped directory detected /System/Library/AssetsV2/com_apple_MobileAsset_Font7/3a664750f87ebac0ccd5708d42f3844d06bb6f7b.asset/AssetData: skipping, looped directory detected /System/Library/AssetsV2/com_apple_MobileAsset_Font7/3a664750f87ebac0ccd5708d42f3844d06bb6f7b.asset/META-INF: skipping, looped directory detected /usr/local/var/cache/fontconfig: cleaning cache directory /Users/christdoes/.cache/fontconfig: not cleaning non-existent cache directory /Users/christdoes/.fontconfig: not cleaning non-existent cache directory fc-cache: succeeded
Then I listed all the fonts in the system, it returned among the list, the exact font I added. The fonts are Ubuntu and Inter. I used this command to list all the fonts text2image --fonts_dir /Library/Fonts --list_available_fonts
After doing all of these, the problem persists. I can select the font from the GUI but it always return the error.
![Screen Shot 2022-04-07 at 14 06 31](https://user-images.githubusercontent.com/1056293/162198956-dd5cb1f3-c6fe-46e7-97ac-a4dab01d3ca0.png)
![Screen Shot 2022-04-07 at 14 23 09](https://user-images.githubusercontent.com/1056293/162199013-9ff47113-f8d3-4788-848e-8aff1d11d9fe.png)