Mailing List Archive

Support open source code!


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

Re: tlug: Mucked up my kterm fonts



--------------------------------------------------------
tlug note from "Stephen J. Turnbull" <turnbull@example.com>
--------------------------------------------------------
>>>>> "Jim" == Jim Breen <jwb@example.com> writes:

    Jim> This is a faint cry for help. I did something stupid, and I
    Jim> don't know how to get out of it.

Easy enough to do in X Windows.  Easy enough to undo, usually, if you
know how, unlike Microsoft products.

    Jim> I was having trouble getting the new font to work, so I was
    Jim> poking around with xfontsel. It displays the new font
    Jim> perfectly, but there was no way I could get it to work with
    Jim> kterm. Pity.

?? This is strange.  I assume for xfontsel to work, you put the font
in a directory on your X font path, did "mkfontdir", and "xset fp
rehash".  Then you should be able to (if necessary) edit your
~/.Xresources file and add "KTerm*VT100*...."  Ooops.  This is the
KTerm you hacked up yourself.  Did you do the right things with
putting the ability to select the JISX-0212 font in a resource and all
that?  If not, if you just hard-coded that stuff, then it's not going
to work....  You're going to have to rebuild KTerm-212 to use a
different font.

By the way, KTerm 6.2.0 advertises the ability to use JISX0212.1990-0
fonts....  I don't have such a font, so I haven't tried it yet.  I
guess I'll go fishing at ftp.monash....

    Jim> Next day, to my horror, I found the grotesque fonts were
    Jim> still there as my defaults.

Yipe!

    Jim> I've done all the correct things like getting xfontsel to
    Jim> select the (kosher) font, highlighting the _select_ box, and
    Jim> selecting the "default" with Ctrl-Right_Button, but it never
    Jim> works.

Try selecting "selection" in the Fonts menu?  The man page is not very
specific about this, nor is OReilly's Vol. 3 "X Window System User's
Guide."  If you don't have this book, the next best alternative is
reading the source code, with reading man pages a distant third.  Get
it!  But in this case it didn't help much.

As far as I can tell from the documentation, you can't directly change 
your defaults using xfontsel and the Fonts menu in X/KTerm.  Are you
sure that's what you did?  It seems to me that you must have edited
either your .Xresources or /usr/X11R6/lib/X11/app-defaults/KTerm.

    Jim> The matter has mystified our sysadmins here, who admit to
    Jim> being not up on Xfont matters. We haven't been able to find
    Jim> where all this scaling info is held.

The information is in the XLFD name (that monstrously long thing with
lots of hyphens and ending in a registered character set name).  A
scalable-by-design font has zeros in the fields labelled
"*-pxlsz-ptSz-resx-resy-*-avgWdth-*" in xfontsel.  In such a font the
resx and resy (design resolution) fields are dummies and should be set
to zero.  Setting any one of the others will generate a real font
internal to the server.  A font that is not scalable by design can be
rescaled by setting pxlsz and avgWdth to zero and specifying ptSz.
Again this generates a font internal to the server.

As far as I know, you have to edit the app-defaults file or the
.Xresources file (preferably the one that was changed), get rid of the 
offending scaled font, and put in a correct bitmap font.  You should
only need to copy the entry for "*VT100*fontList4" to
"*VT100*fontList" (be careful about backslash-newline combos at the
end of the line).  In any case doing this should fix things.

The other possibility is that I'm wrong about the font being internal
(this wouldn't surprise me given that kanji fonts are huge).  If a new
font has been written to a "cache file" *and* it matches an ambiguous
(or -- horrors! -- unambiguous) XLFD better than the "real" font, then
you're in TRUH-BULL and can only get out by deleting the server-
generated font.  You'll have to find it first....

Do "xlsfonts -fn '-*-*-*-*-*-*-16-*-*-*-*-*-jisx0208.1983-*'" and send
me the output; I should be able to make a better guess with that info.

    Jim> Yours in eternal anticipation....

Fixing this shouldn't take that long....
-----------------------------------------------------------------
a word from the sponsor will appear below
-----------------------------------------------------------------
The TLUG mailing list is proudly sponsored by TWICS - Japan's First
Public-Access Internet System.  Now offering 20,000 yen/year flat
rate Internet access with no time charges.  Full line of corporate
Internet and intranet products are available.   info@example.com
Tel: 03-3351-5977   Fax: 03-3353-6096


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links