Letter spacing there certainly does look wrong. While "Ty" is the most
obvious problem, "Pr" and "Re" look too closely spaced, also. It
appears that spacing is going wrong for kerning pairs, and not for
other pairs of letters.

You're correct that Racket defers to Pango and Cairo to kern and draw
text. One possibility is that something is going wrong with using a
font at size N with a drawing scale of M (as opposed to using a font of
size N*M and a drawing scale of 1). Slideshow is likely using a value
of M other than 1, and other programs seem unlikely to be using a
drawing scale. In particular, as I recall, you have a high-resolution
display, which means that Slideshow will render to a bitmap with a
backing scale of 2, and likely an additional drawing scale to stretch
the 1024x768 slide dimensions to fit your screen.

To help diagnose the problem, could you perform experiments along those
lines at the level of a `bitmap%` and `bitmap-dc%`? The key is to call
`draw-text` with #t as the fourth argument, which enables kerning. You
could create a bitmap with different backing scales and also use
different drawing scales (as set by the `scale` method of `dc<%>`, for
example).

At Thu, 17 Dec 2015 16:21:07 +0100, David Christiansen wrote:
> I'm in the process of learning slideshow, and it's tons of fun! I vastly
> prefer Racket to LaTeX for algorithmically generating slides :-)
> 
> However, I'm encountering a pretty major issue with font rendering. I'm
> running Racket 6.3 under GNOME 3.16 on Linux.
> 
> I have noticed that, with a number of fonts, lowercase letters following
> a capital T are drawn very close to the T. My understanding is that
> Racket uses GTK, Pango, and Cairo to draw, so I tested it out in gedit
> with the same font, as well as XeTeX.
> 
> At https://imgur.com/a/BVi2r, you can see the results. The first
> screenshot is from slideshow, where the word "Types" looks very odd
> compared to the other two, which have roughly the same layouts. Some
> other letter spacings are also a bit compressed, but none as radically
> as "Ty".
> 
> Is this a misconfiguration on my part? A bug in Racket somewhere? Can
> anyone suggest a work-around?
> 
> Thanks in advance!
> 
> /David
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to