Fixes #17
When using a textStyle with a fontWeight different than bold or normal, the TextPainter doesn't measure the text correctly.
This PR makes sure the textPainter uses the same fontWeight and font family. When using a different font family, the measurement can also be incorrect, so we can merge the textStyle with the DefaultTextStyle in Flutter.
Fixes #17 When using a textStyle with a fontWeight different than bold or normal, the TextPainter doesn't measure the text correctly.
This PR makes sure the textPainter uses the same fontWeight and font family. When using a different font family, the measurement can also be incorrect, so we can merge the textStyle with the
DefaultTextStyle
in Flutter.