Second part of CB-7499, support RTL text direction