class GsubWorkerFactory
{
    private static final Logger LOG = LogManager.getLogger(GsubWorkerFactory.class);

    public GsubWorker getGsubWorker(CmapLookup cmapLookup, GsubData gsubData)
    {<FILL_FUNCTION_BODY>}
}

        //TODO this needs to be redesigned / improved because if a font supports several languages,
        // it will choose one of them and maybe not the one expected.
        LOG.debug("Language: {}", gsubData.getLanguage());
        switch (gsubData.getLanguage())
        {
        case BENGALI:
            return new GsubWorkerForBengali(cmapLookup, gsubData);
        case DEVANAGARI:
            return new GsubWorkerForDevanagari(cmapLookup, gsubData);
        case GUJARATI:
            return new GsubWorkerForGujarati(cmapLookup, gsubData);
        case LATIN:
            return new GsubWorkerForLatin(cmapLookup, gsubData);
        default:
            return new DefaultGsubWorker();
        }
    
<no_super_class>