removed text origin change in calcFrame on cpp and optimized calcFrame a bit