faces/pie: Ensure text doesn't overflow the face
This ensures the text for total sensors doesn't overflow the face, using a few tricks. Most prominently, this based hiding/showing decisions on multiples of line height. This makes showing/hiding a little less arbitrary and more based on relevant values. It also enables wrapping to two lines for the primary value display, which will (usually) push the unit symbol to its own line when the face gets very small. Finally, if we determine there is no way to fit the text, we hide it completely rather than letting things overflow.
(cherry picked from commit c48aa7ed)
Co-authored-by: Arjen Hiemstra ahiemstra@heimr.nl