josip@ra.src.umd.edu (Josip Loncaric) (07/11/90)
I have an interesting problem with my X-terminal. The server is an HP835 running X window system Version 11 for HP-UX 3.1 A.01 (revision 1.5), and the version of X-terminal software is B.02.00. The problem is this: on the 835's console (under X) the TeX previewer texx works just fine, while on the X-terminal the characters seem reversed left-to-right. Apparently font formats are different for the 835 and the X-terminal, but: (1) why? (2) how can I fix this? If you have had a similar problem and have suggestions, please let me know. Dr. Josip Loncaric Systems Research Center University of Maryland <josip@ra.src.umd.edu> -- Josip Loncaric / SRC / U. of Maryland, College Park, MD 20745
bigelow@hppad.HP.COM (Paul Bigelow) (07/16/90)
> on the X-terminal the characters seem reversed left-to-right. Apparently > font formats are different for the 835 and the X-terminal, but: > (1) why? > (2) how can I fix this? There are at least two ways an X application can display fonts. It can make use of the font files the X server has available or it can display bitmaps, essentially creating its own fonts. I'm not very familiar with texx, but I suspect it does the latter, based on the left-right reversal you are seeing. Font Files ---------- In the case of font files, each server uses fonts in the Server Normal Font (SNF) format. These can be unique to the server, and are analogous to compiled C programs. Binaries from one machine seldom run on a machine with a different architecture. Fonts in Bitmap Distribution Format (BDF) are analogous to C source code. They can be compiled into the HP 700/X snf format with the xtbdftosnf utility, supplied with the 700/X software. If you have workstation fonts in the snf or scf (compressed) format for that workstation, they can be translated into 700/X snf format with the xtsnftosnf utility (again, supplied with the 700/X software). Bitmaps ------- I'm not an Xlib jock, but I have bumped into other applications with the same left-right reversal symptom. The problem occurs when displaying a bitmap created on a machine with different byte ordering. Programmers sometimes use a call such as XCreatePixmapFromBitmapData. The recommended way is to do it in several steps. 1. Use XCreateImage to create an XImage structure. 2. Set the bitmap_bit_order and byte_order fields in the XImage stucture to match the machine that the bitmaps were created on. 3. Use XPutImage to output the bitmap. Please let me know how you make out. Paul Bigelow Hewlett-Packard Panacom Automation Division bigelow@hppad.hp.com