added getTextBaseline function