Need to access RenderTable created from a resource file

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

1 post / 0 new
Need to access RenderTable created from a resource file

Submitted by lostboy on Wed, 10/03/2007 - 16:59.

I am upgrading an existing application to use antialiased fonts and everthing is working as expected. The antialiased font show up and they look great.

One small part of the code looks like this.

static int XtScaleTextItem(MenuItem mi) {

XmFontList fontlist;
XmFontContext fontContext;
XmStringCharSet charSet;
Arg arg[10];
int i;

i=0;
XSetArg(arg[i], XmNfontList, &fontList); i++;
XGetValues(mi->command_widget, arg, i);

XmFontListInitFontContext( &fontContext, fontlist );
XmFontListGetNextFont( fontContext, &charSet, &mi->xfont);

mi->size.x = XTextWidth(
mi->xfont,
mi->value.string.text,
strlen(mi->value.string.text)
);

I have the following defined in a resource file
mytable*renderTable: myfnt
*myfnt*renditionForeground: black
*myfnt*fontType: FONT_IS_XFT
*myfnt*fontName: Sans
*myfnt*fontSize: 8

The font list code does not seem to be able to retrieve the rendertable "myfnt" that was defined in the resource file. I cannot find a method that returns a render table based upon the name of the render table and the widget. Is it not possible to modify the values from the resource file inside of the C code.

Thanks for any insight anyone might be able to provide.