A little bit of research on font smoothing in X



I've been poking around, trying to figure out *why* font smoothing and X
don't seem to get along, when I came across this, from the xfsfs home
page(http://www.dcs.ed.ac.uk/home/jec/programs/xfsft/)

----
Does it do font smoothing?
This is a question that people keep asking me. The short answer is no.

Font smoothing -- also known, for some strange reason, as anti-aliasing --
is a technique used by some rasterisers to make fonts look better by using
grayscale. Opinions differ on whether it actually makes fonts more legible,
or more blurry, but it allows for sub-pixel positioning of glyphs (which can
dramatically enhance the appearance of fully-justified text).

Although FreeType does support font smoothing, the modified libfont.a does
not. Adding font smoothing to X would require a major change to the system:
in X, glyphs are (monochrome) bitmaps, and there is no support for using
pixmaps as glyphs. Changing this would require the design and implementation
of an extension to both the X protocol and the font server protocol, and
changing applications to use the extensions.
---

I *may* have a solution.  If Times New Roman is requested from the font
server at point size 12, font smoothing is impossible--a monochrome graphic
has been delivered.  However, if point size 24 is requested, and then
quickly downsampled bilinearly or with a 3x3blur+nearest neighbor and
combined with the point size 12 font metrics, an antialiasable font will
have been created.

The system isn't perfect, however.  The X-Server would have to be smart
enough to know to downsample a 24 point font when 12 point metrics have been
provided, and then to implement the minimal level of alpha levels.  I can
say this--Xfree86 gets this, EVERYONE will follow.





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