changed fontRatio to buffer