Solved! I was measuring with the wrong fontfamily.
Now more or less it works
so yes the measuring routine is working properly