add support for built-in fonts
Use --enable-builtin-fonts to only use built-in fonts, and avoid loading fonts.
This commit is contained in:
parent
0a2068d123
commit
ecfad74c48
|
@ -392,6 +392,9 @@ AC_ARG_ENABLE(install-libxf86config,
|
|||
[Install libxf86config (default: disabled)]),
|
||||
[INSTALL_LIBXF86CONFIG=$enableval],
|
||||
[INSTALL_LIBXF86CONFIG=no])
|
||||
AC_ARG_ENABLE(builtin-fonts, AS_HELP_STRING([--enable-builtin-fonts], [Use only built-in fonts (default: use external)]),
|
||||
[BUILTIN_FONTS=$enableval],
|
||||
[BUILTIN_FONTS=no])
|
||||
|
||||
dnl Extensions.
|
||||
AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes])
|
||||
|
@ -710,6 +713,11 @@ if test "x$XPRINT" = xyes; then
|
|||
REQUIRED_MODULES="$REQUIRED_MODULES printproto"
|
||||
fi
|
||||
|
||||
if test "x$BUILTIN_FONTS" = xyes; then
|
||||
AC_DEFINE(BUILTIN_FONTS, 1, [Use only built-in fonts])
|
||||
AC_DEFINE(NOFONTSERVERACCESS, 1, [Avoid using a font server])
|
||||
fi
|
||||
|
||||
AC_DEFINE(RENDER, 1, [Support RENDER extension])
|
||||
RENDER_LIB='$(top_builddir)/render/librender.la'
|
||||
RENDER_INC='-I$(top_srcdir)/render'
|
||||
|
|
|
@ -1889,7 +1889,7 @@ InitFonts ()
|
|||
{
|
||||
patternCache = MakeFontPatternCache();
|
||||
|
||||
#ifndef KDRIVESERVER
|
||||
#ifndef BUILTIN_FONTS
|
||||
if (screenInfo.numScreens > screenInfo.numVideoScreens) {
|
||||
PrinterFontRegisterFpeFunctions();
|
||||
FontFileCheckRegisterFpeFunctions();
|
||||
|
@ -1897,10 +1897,11 @@ InitFonts ()
|
|||
} else
|
||||
#endif
|
||||
{
|
||||
#ifdef KDRIVESERVER
|
||||
BuiltinRegisterFpeFunctions();
|
||||
#endif
|
||||
#ifdef BUILTIN_FONTS
|
||||
BuiltinRegisterFpeFunctions();
|
||||
#else
|
||||
FontFileRegisterFpeFunctions();
|
||||
#endif
|
||||
#ifndef NOFONTSERVERACCESS
|
||||
fs_register_fpe_functions();
|
||||
#endif
|
||||
|
|
|
@ -403,9 +403,14 @@ main(int argc, char *argv[], char *envp[])
|
|||
FatalError("failed to initialize core devices");
|
||||
|
||||
InitFonts();
|
||||
#ifdef BUILTIN_FONTS
|
||||
defaultFontPath = "built-ins";
|
||||
#else
|
||||
if (loadableFonts) {
|
||||
SetFontPath(0, 0, (unsigned char *)defaultFontPath, &error);
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
if (SetDefaultFontPath(defaultFontPath) != Success)
|
||||
ErrorF("failed to set default font path '%s'",
|
||||
defaultFontPath);
|
||||
|
|
|
@ -439,4 +439,7 @@
|
|||
/* Support D-BUS */
|
||||
#undef HAVE_DBUS
|
||||
|
||||
/* Use only built-in fonts */
|
||||
#undef BUILTIN_FONTS
|
||||
|
||||
#endif /* _DIX_CONFIG_H_ */
|
||||
|
|
Loading…
Reference in New Issue
Block a user