gnustep-dev
[Top][All Lists]
Advanced

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

Patch: DPSxshow et al. in Art


From: Adrian Robert
Subject: Patch: DPSxshow et al. in Art
Date: Wed, 23 Mar 2005 20:44:12 -0500

Hi,

Here is a second rendition of my patch to implement DPSxshow and
related operators directly in Art.  It updates the method in
ftfont.m that previously only handled DPSshow() to do the others, at
the cost of one additional if(nonzero) test on the main character
loop.  (There are more if()s in the xshow et al. cases.)

Why implement these here in Art?  Because rendering is always done
character by character, so adjusting glyph advances is trivial.
This differs from the xlib back-end, where DPSshow() is
implemented using single lower-level function calls such as
Xutf8DrawString so that a completely different approach is
needed for adjusting character advancement.

However, there is a problem with my patch that I didn't know how to
solve: when 'sbit cache' (bitmap-based) rendering is used, the
scaling/rotation transformation is not applied to the userspace
advances supplied.  This might be easy to do, but I'm just not
familiar enough with this code to do it.  This causes different
results from xlib for yshow in the attached test program.

Another difference from xlib, this one intended, is that y advances
are paid attention to.  This can be changed easily if it is wrong.

Finally, I tried disabling the xshow,etc. implementations in Art and just
letting the GSGState handle them.  Performance actually did not suffer
too much (despite another function call layer for every glyph), but
this resulted in some type of glyph mis-translation, displaying
scrambled characters.  If I subtracted 28 from the value of each
UTF-8 character I passed in, the problem was fixed for ASCII,
however for other characters this caused a crash.  If this issue
could be fixed, we might not need the Art implementation, though I
still think it makes sense to have it there..

<testFontRender.m>
<artxshow.patch>


Attachment: testFontRender.m
Description: Text document

Attachment: artxshow.patch
Description: Text Data


reply via email to

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