A font display problem

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

 



Hi!

I am facing the following problem for displaying
certain glyphs in certain fonts using the Tcl/Tk
text widget. Any solution from anybody will be of
invaluable help to me.

I have a set of 8-bit BDF fonts which are almost
full in the sense that almost all (about 250) of
the 256 encodings are occupied by glyphs. The
previous versions of X windows displayed all these
glyphs correctly, when called from Tcl/Tk text
widgets. But the RedHat 7.* versions (being
possibly loaded with new versions of XFree86)
are creating problems in displaying glyphs at
some encodings.

Let us consider the following simple wish script:

text .t -font "MY-BDF-FONT-NAME"
pack .t
.t insert end "[format "%c" 0]\n"
.t insert end "[format "%c" 1]\n"
.t insert end "[format "%c" 2]\n"
.t insert end "[format "%c" 3]\n"
.t insert end "[format "%c" 4]\n"
.t insert end "[format "%c" 5]\n"
.t insert end "[format "%c" 6]\n"
.t insert end "[format "%c" 7]\n"
.t insert end "[format "%c" 8]\n"
.t insert end "[format "%c" 11]\n"
.t insert end "[format "%c" 12]\n"
.t insert end "[format "%c" 13]\n"
.t insert end "[format "%c" 14]\n"
.t insert end "[format "%c" 15]\n"
.t insert end "[format "%c" 16]\n"

If this is executed, I should see the glyphs
defined in the font file with encodings
0, 1, 2, 3, etc. This is what precisely
used to happen in the older versions of
XFree86 (RedHat 6.* and earlier). Currently
what I am getting is a display like this:

\x00
\x01
\x02
\x03
\x04
\x05
\x06
\a
\b
\v
\f
\r
\x0e
\x0f
\x10

Of course, though \x00 etc look like
multi-character words, they are actually
representations of single characters.
That is to say that the string representing
the content of the text widget remains
perfectly okay -- only the display gets
goofed up.

In fact, the older versions of X used
to display the same sequences, if the
font file associated to the text widget
did not contain defined glyphs under these
encodings. If, on the other hand, these
glyphs were defined, they were displayed.

My question is: Is it at all possible to
restore the old behavior under the new
X distributions? If yes, what are the
easy ways?

I tried loading my BDF fonts statically at
X startup as well as using xfs. The outcome
is always the same. I even tried running
xfs with the option

deferglyphs = all

but that did not work. This is apparently
not a Tcl/Tk problem, since the same versions
of Tcl/Tk (that I am using now) work nicely
on older RedHat platforms. On the other hand,
most other X programs (like xfd and mozilla)
are perfectly displaying all the defined glyphs
even under RedHat 7.*.

I am thoroughly perplexed to decide who
the actual trouble-maker is! I am badly
looking for a remedy to this problem. It is
indeed a pain to restructure the font files
and rewrite big programs conforming to the
revised encoding. I admit that having glyphs
with encodings 0 - 31 and 128 - 160 is not a
good idea. But if certain font has to comprise
about 250 glyphs, what will be the neater
alternative?

I would appreciate any suggestions from
anybody. Thanks a lot in advance.

-- Abhijit


=====
Dr. Abhijit Das
Visiting faculty, Department of Mathematics
Indian Institute of Technology, Kanpur 208 016, India
Tel: +91-512-597753 (Off), +91-512-598334 (Res)
Email: ad_rab@yahoo.com, abhijit@iitk.ac.in
URL: http://in.geocities.com/ad_rab/

________________________________________________________________________
Want to sell your car? advertise on Yahoo Autos Classifieds. It's Free!!
       visit http://in.autos.yahoo.com





[Red Hat General]     [Red Hat Watch]     [Red Hat Development]     [Kernel Development]     [Yosemite Camping]

  Powered by Linux