• I want to know a strange thing

    From gamo@21:1/5 to All on Sun Dec 13 15:56:20 2020
    I want to know the aproximate proportios of a text cursor
    in a xterm. Have I to explain more?

    Thanks, as usual.



    --
    http://gamo.sdf-eu.org/
    "What happens in EuroVegas it remains in EuroVegas"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Taylor@21:1/5 to gamo on Sun Dec 13 11:55:37 2020
    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.



    --
    Grant. . . .
    unix || die

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gamo@21:1/5 to All on Mon Dec 14 00:50:32 2020
    El 13/12/20 a las 19:55, Grant Taylor escribió:
    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.



    Actually I try the magic number 2 to equalize lines size with cols size.
    Seems only 'adequate'.
    Thanks for your suggestion, but I'm using standard Ubuntu.

    --
    http://gamo.sdf-eu.org/
    "What happens in EuroVegas it remains in EuroVegas"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eric Pozharski@21:1/5 to gamo on Mon Dec 14 11:12:59 2020
    with <rr69c6$vk7$1@gioia.aioe.org> gamo wrote:
    El 13/12/20 a las 19:55, Grant Taylor escribió:
    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.
    Actually I try the magic number 2 to equalize lines size with cols
    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. Now, these are mentioned in
    *WindowOps. However, my reading is these two are *control sequences*,
    and they (control sequences) can be 'abused in a script'.

    Now, I have no idea what these sequences are, where to get them from,
    how to get anything back from a terminal, because Term::ReadKey is my
    limited experience dealing with terminals (it does everything I ever
    needed from terminal). You are on your own now.

    OTOH, it's not clear what exactly you are trying to achieve, but it
    feels like starting xterm with approriate geometry and/or font is what
    you need instead.

    --
    Torvalds' goal for Linux is very simple: World Domination
    Stallman's goal for GNU is even simpler: Freedom

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eli the Bearded@21:1/5 to whynot@pozharski.name on Mon Dec 14 21:59:25 2020
    In comp.lang.perl.misc, Eric Pozharski <whynot@pozharski.name> 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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gamo@21:1/5 to All on Mon Dec 14 23:40:22 2020
    El 14/12/20 a las 22:59, Eli the Bearded escribió:
    In comp.lang.perl.misc, Eric Pozharski <whynot@pozharski.name> 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.
    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`;

    Thanks.


    --
    http://gamo.sdf-eu.org/
    "What happens in EuroVegas it remains in EuroVegas"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eli the Bearded@21:1/5 to gamo@telecable.es on Tue Dec 15 00:10:44 2020
    In comp.lang.perl.misc, gamo <gamo@telecable.es> wrote:
    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.

    That is the standard ratio one should assume with programatically
    generated ASCII art. Two pixels tall and one pixel wide (or multiples
    there of) become one character cell in the ASCII version. This is
    how you should expect pre-scale input if you use my pgmtoascii tool:

    https://qaz.wtf/netpbm/pgmtoascii

    But if you are going to make an actual bit map out of the text, say
    with texttopnm:

    https://qaz.wtf/netpbm/texttopnm

    Then use the dimensions of the font for more exact results. I have three historical IBM console fonts here, one 8x16, one 9x14, and one 9x16.

    https://qaz.wtf/netpbm/fonts.tar.gz

    All *about* two tall to one wide, but only one exactly so.

    ObPerl: pgmtoascii and texttopnm are both Perl scripts. Both do assume
    you have a reasonable netpbm or pbmplus library of programs installed
    to work with them.

    Elijah
    ------
    noticed today pgmtoascii is very nearly 21 years old

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Keith Thompson@21:1/5 to gamo on Mon Dec 14 16:34:23 2020
    gamo <gamo@telecable.es> writes:
    [...]
    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`;

    What do wide monitors have to do with this? The size in pixels for a
    character depends on the font. A font in which characters are twice as
    tall as their width tends to be reasonably legible.

    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.

    --
    Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
    Working, but not speaking, for Philips Healthcare
    void Void(void) { Void(); } /* The recursive call of the void */

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eli the Bearded@21:1/5 to Keith.S.Thompson+u@gmail.com on Tue Dec 15 01:37:30 2020
    In comp.lang.perl.misc, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
    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.

    What makes you say that?

    Elijah
    ------
    maybe it is cultural

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Randal L. Schwartz@21:1/5 to All on Tue Dec 15 01:08:13 2020
    "EtB" == Eli the Bearded <*@eli.users.panix.com> writes:

    noticed today pgmtoascii is very nearly 21 years old

    Wow. Wow wow. I hadn't seen NETPBM referenced in years. I remember
    being tortured that I didn't have "stereo pipes" in /bin/sh, and then
    realized how I could do that with the right fd redirects. Scary.

    print "Just another Perl hacker,";

    --
    Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
    Perl/Unix/Dart consulting, Technical writing, Comedy, etc. etc.
    Still trying to think of something clever for the fourth line of this .sig

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)