The bounds()-function in the Text.swift only returns the size of the normal weighted font. So for bold fonts for example the bounds are wrong. Line no. 95 should be changed to:
font = MFont.systemFont(ofSize: CGFloat(f.size), weight: getWeight(f.weight))
As well you have to copy the getWeight-function, but I would suggest to return MFont.Weight.regular as default.