[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: screendump of screen

From: Michael Schroeder
Subject: Re: screendump of screen
Date: Sun, 19 Jun 2005 19:39:09 +0200
User-agent: Mutt/

On Sun, Jun 19, 2005 at 02:41:32AM +1000, foo bar wrote:
> Besided fore->w_mlines[i].image, I've also dumped
> fore->w_mlines[i].font and .color, but could not make sense of it.
> Does screen know what the current window/screen look like ?

Sure. But it doesn't know what your fonts look like, of course.

1) color

  check out the rend_getfg() and rend_getbg() macro in image.h.
  AFAIR they return the "internal" representation of the color, where
  "0" means the "default" color. Use coli2e() to convert non-zero
  values to a real ANSI color, use any color you like for the
  "default color" case.

2) font

  the font information is basically just the ISO-2022 character
  set numbers plus some extensions. 0x00 is always the "default"

  size 94:
    0x30 (0) Alternate charset
    0x42 (B) ASCII
    0x49 (I) japanese katakana

  double with fonts use codes < 32 (i.e. control characters).
    0x01 (^A) GB 2312-80
    0x02 (^B) JIS X 0208 (1990)
    0x03 (^C) KSC 5601-1992
    0x0d (^D) JIS X 0212 (1990)

  utf-8 mode is completely different. It (mis-)uses the font slot as
  place to store the most significant byte. I.e.:

    utf8char = image | (font << 8)

  Combining characters are recoded to the range 0xd800-0xdfff.
  The real string is stored in the "combchars" array.


Michael Schroeder           address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]