diff options
authorTiago Vignatti <>2010-06-10 16:18:05 +0300
committerTiago Vignatti <>2010-06-21 17:15:36 +0300
commita85f4fc6142349517aaa4cf6bc8049e2d85c1006 (patch)
parentd137c81b83e0a6f68989c37035d0c950bb43fcc5 (diff)
Use one single function to register fpe functions
X server doesn't need to understand fpe internals, so let it transparent turning all registration functions in a single one. For that, fill the already existent register_fpe_functions(). Some X servers don't want font server support, so this patch also sets font server support to be configured in build time. In my machine, I see 20kB of RSS being saved in libXfont mapped in Xorg process when I disabled font server support and other kind of fonts in the library (--disable-pcfformat --disable-bdfformat --disable-snfformat --disable-freetype --disable-fc). The default library built was taking: text data bss dec hex filename 261847 4484 1536 267867 4165b ./lib/ and with these flags, it jumps to: text data bss dec hex filename 157764 2428 1188 161380 27664 ./lib/ Signed-off-by: Tiago Vignatti <> Reviewed-by: Mikhail Gusarov <> Reviewed-by: Alex Deucher <> Reviewed-by: Daniel Stone <>
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/miscutil.c b/src/util/miscutil.c
index 3459275..1e76b4b 100644
--- a/src/util/miscutil.c
+++ b/src/util/miscutil.c
@@ -46,10 +46,17 @@ from The Open Group.
#pragma weak register_fpe_functions
+extern void BuiltinRegisterFpeFunctions(void);
/* make sure everything initializes themselves at least once */
weak long serverGeneration = 1;
weak void
register_fpe_functions (void)
+ BuiltinRegisterFpeFunctions();
+ FontFileRegisterFpeFunctions();
+#ifdef XFONT_FC
+ fs_register_fpe_functions();