This polyfill is based on two projects from @Pomax and @motiz88 but this one is designed to be compatible with the standard.
Take(DONE)textAlign
property into account in calculations- Support for
fontBoundingBoxAscent
andfontBoundingBoxDescent
properties