I want to know the aproximate proportios of a text cursor
in a xterm. Have I to explain more?
On 12/13/20 7:56 AM, gamo wrote:
I want to know the aproximate proportios of a text cursor
in a xterm. Have I to explain more?
It will probably be font and size dependent.
Take a screen shot and measure the cursor in a graphics program.
El 13/12/20 a las 19:55, Grant Taylor escribió:
On 12/13/20 7:56 AM, gamo wrote:
Actually I try the magic number 2 to equalize lines size with colsI want to know the aproximate proportios of a text cursor in aIt will probably be font and size dependent.
xterm. Have I to explain more?
Take a screen shot and measure the cursor in a graphics program.
size. Seems only 'adequate'. Thanks for your suggestion, but I'm
using standard Ubuntu.
And here comes your XY-problem. I've found this inside xterm(1):
GetWinSizeChars (18)
Report the size of the text area in characters as
numbers.
GetWinSizePixels (14)
Report xterm window in pixels as numbers.
When (if ever) you get these pairs then you can divide items from second
pair by items of first pair thus achieving area of a character what, effectevily, is area of the cursor.
In comp.lang.perl.misc, Eric Pozharski <[email protected]> wrote:
Why clpm? comp.windows.x or comp.os.linux.x seem better.
And here comes your XY-problem. I've found this inside xterm(1):
GetWinSizeChars (18)
Report the size of the text area in characters as
numbers.
GetWinSizePixels (14)
Report xterm window in pixels as numbers.
When (if ever) you get these pairs then you can divide items from second
pair by items of first pair thus achieving area of a character what,
effectevily, is area of the cursor.
$ xwininfo -id $WINDOWID | grep -E 'Width|Height|geometry'
Width: 643
Height: 576
-geometry 104x44+82-23
$
This window is 104 characters wide by 44 characters tall. The height
and width info includes padding and scroll bars, probably includes
window decoration, which is mostly title bar for me. But it puts a
definite maximum size for the cursor as 6 pixels wide and 13 tall.
I suspect 6x12 is the real number.
I also know I'd get a different value with some other font choices.
If you can start up xterms of different sizes, you can easily test how
much width and height grow with each additional row and column. The
xterm will take care of exporting the WINDOWID variable for you.
Elijah
------
does not actively select a font for xterm, just gets the default
Thank you all very much. The central thing is as you confirm,
the horizontal-vertiocal ratio for a char is almost 2:1 lines to cols.
Thank you all very much. The central thing is as you confirm,
the horizontal-vertiocal ratio for a char is almost 2:1 lines to
cols. Despite there are now wide monitors that use xterm capabilities
way more than pure console terminals (expected num keypads).
my $cols = `tput cols`;
my $lines = `tput lines`;
In the xterm I'm typing this in, for example, each character cell is 10 pixels wide and 21 pixels tall, and it looks good to me. 20x20 cells,
for example, would look badly distorted.
"EtB" == Eli the Bearded <*@eli.users.panix.com> writes:
noticed today pgmtoascii is very nearly 21 years old
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 23:10:00 |
| Calls: | 12,105 |
| Calls today: | 5 |
| Files: | 15,006 |
| Messages: | 6,518,142 |