This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: rxvt cursor corruption under WinXP/ClearType


So, while I know nothing about ClearType internals, I asked around and
got some info.  Hope this is helpful and finds its way to someone who
can do something with it. If it leads to more questions (and I suspect
it might) I can forward to appropriate folks.

---
"ClearType has up to a one pixel bleed on each side of the character.
This is done to help dissipate the color. More than likely this app is
doing something like erasing a character by drawing an opaque space,
which leaves garbage on the screen. Note that this can happen with any
fixed-pitch font that has overhang (a feature that is fine with TrueType
but problematic with fixed-pitch fonts).

The bounding box of the character can not be updated because that would
break compatibility with earlier fonts. Arguably this is not correct,
but breaking compatibility is incorrect as well.

So there is no easy fix here - the only option I see is to modify the
application."
---
"I'm not aware of any documentation on this topic nor am I aware of any
fix to this in any of our text libraries."
---
"The answer to that specific questions (how do MS apps handle this?) is
that we are drawing as much as possible, full word, full line of text
together. Placing together the characters in a string buffer before
merging with foreground and background color.

If application implement their text and edit box display in a way that
works fine with script fonts where characters have big overlapp then
they will work fine with ClearType."
--- 
"I was thinking about this last night, and I agree that the only
'correct' way is to deal with this at the word level.

That said, with fixed pitch fonts and a simple one color background, one
might be able to make some simplifying assumptions, although this is
somewhat risky.

With a constant background color, one could redraw the character to be
erased with foreground color set equal to background color in opaque
mode. Another solution might be to use a specific font that is
guaranteed to have a minimum of one pixel sidebearing on each side at
all required sizes."
---
"The console code in Windows is very specific on what font it accepts.
The font needs to be fixed width with no negative sidebearing.

I'm almost sure that our console code, as we type characters is always
redrawing the full line and not only the character that we type.

Turning off ClearType through the logfont when you have to draw one
character at a time in opaque mode would be a good decision. (a better
decision would be drawing text in a way that is compatible with negative
sidebearings.)"
---

stephan();



-----Original Message-----
From: Philip Flip Kromer [mailto:flip@mrflip.com] 
Sent: Friday, April 12, 2002 5:58 PM
To: cygwin@cygwin.com
Subject: Re: rxvt cursor corruption under WinXP/ClearType


I have the same problem with rxvt. I did not know about reverting to 
courier as a workaround -- thanks!

Emacs-NT also has this problem (but only occasionally). They claim that
it 
is because Windows with cleartype lies about how to compute a bounding
box 
for a font but MS will not share the information. File under "yet
another 
example of why the DOJ consent degree sucks."

Jason Rumney from the emacs devel seems to have some good information on

the problem. See, for example,
http://mail.gnu.org/pipermail/help-emacs-windows/2002-April/001355.html
   Jason Rumney  jasonr@gnu.org writes:
   No, it doesn't.  Sometimes it draws outside the bounding-box for
   the glyph, which results in a garbaged display when scrolling.  That
   is why sub-pixel anti-aliasing was disabled for 21.2.  If you can
find
   any documentation from Microsoft about how to determine the REAL
   bounding box for a glyph AFTER sub-pixel anti-aliasing is applied,
   then please tell me.

or
http://groups.google.com/groups?hl=en&safe=images&selm=m3zo2ugsve.fsf%40
nyaumo.btinternet.com
   Jason Rumney (jasonr@btinternet.co) writes:
   Thanks for the report. Since Microsoft do not seem to be making
public
   what changes they had to make to their own products to fix this
(early
   betas of Windows XP had reports of the same sorts of display problem
   with all applications, so I assume they have "fixed" it by changing
   an MFC library or something), there is not a lot we can do.

flip

Rui Carmo wrote:
> Hello there,
> 
> I've been searching the mailing-list archives for posts concerning the
> vertical cursor "trails" bug that rxvt exhibits under Windows XP with
ClearType, but have found nothing.
> 
> Steps to reproduce the bug:
> - Under Windows XP, activate ClearType (Display
> Properties|Appearance|Effects|Use the following method... ClearType)
> - Start rxvt with the following command line:
>   rxvt.exe -tn xterm -sr -fn "Lucida Console-14" -sl 30000 -e bash 
> --login -i
> - Type some chars and notice the vertical bars the cursor leaves
(erase or redraw are off by one pixel)
> 
> This only happens with monospaced fonts other than Courier New or
> System (Lucida Console, Andale Mono, and practically all other 
> monospaced fonts I tried).
> 
> I am willing to help debug/test this, and have spent a couple of hours
> trying to recompile
 > rxvt on my box (setting up CVS, etc., and following the steps in
> /usr/doc/Cygwin/rxvt-2.7.2.README), but would like to get in touch
> with other folk that have been working on rxvt to swap tips.
> 
> Since I am not subscribed to the list, please e-mail me directly.




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]