From kde-devel Fri Apr 06 02:43:52 2001 From: Patrick Julien Date: Fri, 06 Apr 2001 02:43:52 +0000 To: kde-devel Subject: Re: X guru help needed X-MARC-Message: https://marc.info/?l=kde-devel&m=98652555916809 On Thursday 05 April 2001 22:16, Patrick Julien wrote: ouups, this should be f = new QFont(XGetAtomName(dpy, static_cast(value))); and not f = new QFont(XGetAtomName(dpy, static_cast(&value))); ^ > Use XGetFontProperty to extract the info you need from the XFontStruct > > example > unsigned long value; > QFont *f; > > if (XGetFontProperty(font_struct, XA_FAMILY_NAME, &value)) > f = new QFont(XGetAtomName(dpy, static_cast(&value))); > > I'm guessing you will need XAtoms XA_POINT_SIZE and XA_WEIGHT also > > On Thursday 05 April 2001 17:42, Roberto Alsina wrote: > > Maybe some X guru can help me: > > > > If I have a XFontStruct, can I create a QFont that is the same font? > > And if yes, how? > > > > ("\''/").__..-''"`-. . Roberto Alsina > > `9_ 9 ) `-. ( ).`-._.`) ralsina@conectiva.com.ar > > (_Y_.)' ._ ) `._`. " -.-' Director técnico > > _..`-'_..-_/ /-'_.' Conectiva SA > > (l)-'' ((i).' ((!.' Buenos Aires - Argentina > > KDE Developer (MFCH) > > Futuaris nisi irrisus ridebis. (Carlton, De rerum comoedia) > > > > >> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to > > >> unsubscribe << > >> > >> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to > >> unsubscribe << >> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<