Created attachment 459011 [details] Comparison between browsers The values of the bounding box returned by CanvasRenderingContext2D.measureText() are rounded resulting in imprecise calculations in typographic centered applications (except for .actualBoundingBoxRight). The issue might be related with: https://bugs.webkit.org/show_bug.cgi?id=225695
Created attachment 459012 [details] Test element
<rdar://problem/93303504>
I think we have 'boundingBoxAscent' etc. in html/TextMetrics.h as 'float' but Chrome has it as 'double'. So changing it into 'double' might be solution.
We have FIXME as well: https://github.com/WebKit/WebKit/blob/7b833e8e18ce1474a00504b49ff46757b96e1a83/Source/WebCore/html/TextMetrics.idl#L29 IDL + C++ side both need fixes.