gtk - Get the maximum number of text lines that fit into a Pango layout? -


I am using a pango within a Kyero reference inside the GUT window. How can I calculate how many text lines and columns fit within the area?

Lines are easy; You can provide a sample line of text in PangoLayout and call on it, then make the necessary math to figure out how many vertical your GtkWindow will be.

Columns are not so easy (and whichever one you are not using a monospace font, then how many numbers will you calculate does not mean that) if your font is monopaged, Then use the method for lines of the same type.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -