Add Java version of text-properties
Improve measurement accuracy