JavaScript library for text measurement (similar to fontmetrics)