The issue was there because the fonts got imported through Qt Resources. But in pymod there is no Qt. The solution is to import them though compiled-in blobs.