implement text-size caching
add workaround for tcpdf bug #944