use layoutdirection from locale, fallback to embeded pdf fonts on low memory devices
cleanup