Hello, I`m currently porting an application from HP-UX / X11R5 / Motif 1.2 to Linux / X11R6 / OpenMotif 2.2. I am having a problem indexing a symbol font on the new system (Linux). Background Information The symbol font was created using xmbdfed (font editor). Instead of text characters, this font contains symbols (shapes, etc.). This font has over 2000 symbols in it. After necessary modifications are made, the font is converted from bdf to pcf format using the bdftopcf command. Load the font font_sym->x_font = XLoadQueryFont ( f_data->display, Create graphics context font_gc[map_index] = XCreateGC( map->display, (Drawable) Set font & foreground color in GC XSetFont(Map->display, font_gc[map_index], fontid); XSetForeground (Map->display, font_gc[map_index], color.pixel); Draw symbol XDrawString16( map->display, (Drawable) map->drawable.drawbl, Before the XDrawString16 call, we determine the index of the symbol that we want to draw and that value is stored in the "font_entry" variable above. The index values range from 1 up to around 2400. The "font_entry" variable has a datatype of short to match the size of the XChar2b datatype (both are two bytes). The index that I have been referring to is displayed above each character "cell" when modifying the font in xmbdfed. We are able to correctly index the font on the old system (HP-UX), but on the new system (Linux) the indexing does not work properly. The font is loaded fine, but the wrong symbol is drawn when we Thanks, Tony |
|||
