Fix text inverted y-axis and size calculation.