Fixed a bug in font geometrics function