Open edge2992 opened 1 year ago
On some systems, the measure and metrics commands are awfully slow. Adding another call makes things even slower.
Luckily, this metrics call duplicates a call in flush. If you’re careful you can pass the results of that call to DrawText as an argument.
https://browser.engineering/layout.html
You can profile Python programs by replacing your python3 command with python3 -m cProfile. Look for the lines corresponding to the measure and metrics calls to see how much time is spent measuring text.
https://python.hotexamples.com/examples/tkinter.font/Font/measure/python-font-measure-method-examples.html
On some systems, the measure and metrics commands are awfully slow. Adding another call makes things even slower.
Luckily, this metrics call duplicates a call in flush. If you’re careful you can pass the results of that call to DrawText as an argument.
https://browser.engineering/layout.html