The TextBaseline enum in Flutter has two options:
- alphabetic
- ideographic
How do these values actually change the baseline?
The TextBaseline enum in Flutter has two options:
How do these values actually change the baseline?
Copyright © 2021 Jogjafile Inc.
TextBaseline.alphabetic
The alphabetic baseline is the line that the letters in alphabets like English sit on. Here is an example:
You can see that the English letters sit nicely on the line, but it cuts through the Chinese characters.
TextBaseline.ideographic
When you use the ideographic option, though, the baseline is at the bottom of the text area. Note that the Chinese characters don't actually sit right on the line. Rather, the line is at the very bottom of the text line.
Supplemental code
You can plug this into a
CustomPaintwidget (as described here) to reproduce the above examples.