Add dixGetGlyphs to replace GetGlyphs from libXfont to simplify linking

No other Xfont consumer used it, and this saves us from having to link
callers against libXfont for one simple function when doing
-no-undefined symbols builds.

The function is given a new name to avoid clashing with existing libXfont
binaries, but a #define is provided to preserve the API so we don't have
to fix all the callers at the same time.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
This commit is contained in:
Alan Coopersmith 2012-06-28 15:15:53 -07:00
parent 212b980323
commit a00066d291
2 changed files with 16 additions and 6 deletions

View File

@ -115,6 +115,15 @@ LoadGlyphs(ClientPtr client, FontPtr pfont, unsigned nchars, int item_size,
return Successful;
}
void
dixGetGlyphs(FontPtr font, unsigned long count, unsigned char *chars,
FontEncoding fontEncoding,
unsigned long *glyphcount, /* RETURN */
CharInfoPtr *glyphs) /* RETURN */
{
(*font->get_glyphs) (font, count, chars, fontEncoding, glyphcount, glyphs);
}
/*
* adding RT_FONT prevents conflict with default cursor font
*/

View File

@ -117,12 +117,13 @@ extern _X_EXPORT void FreeFonts(void);
extern _X_EXPORT FontPtr find_old_font(XID /*id */ );
extern _X_EXPORT void GetGlyphs(FontPtr /*font */ ,
unsigned long /*count */ ,
unsigned char * /*chars */ ,
FontEncoding /*fontEncoding */ ,
unsigned long * /*glyphcount */ ,
CharInfoPtr * /*glyphs */ );
#define GetGlyphs dixGetGlyphs
extern _X_EXPORT void dixGetGlyphs(FontPtr /*font */ ,
unsigned long /*count */ ,
unsigned char * /*chars */ ,
FontEncoding /*fontEncoding */ ,
unsigned long * /*glyphcount */ ,
CharInfoPtr * /*glyphs */ );
extern _X_EXPORT void QueryGlyphExtents(FontPtr /*pFont */ ,
CharInfoPtr * /*charinfo */ ,