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 (default: disabled)]),
|
||||||
[INSTALL_LIBXF86CONFIG=$enableval],
|
[INSTALL_LIBXF86CONFIG=$enableval],
|
||||||
[INSTALL_LIBXF86CONFIG=no])
|
[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.
|
dnl Extensions.
|
||||||
AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes])
|
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"
|
REQUIRED_MODULES="$REQUIRED_MODULES printproto"
|
||||||
fi
|
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])
|
AC_DEFINE(RENDER, 1, [Support RENDER extension])
|
||||||
RENDER_LIB='$(top_builddir)/render/librender.la'
|
RENDER_LIB='$(top_builddir)/render/librender.la'
|
||||||
RENDER_INC='-I$(top_srcdir)/render'
|
RENDER_INC='-I$(top_srcdir)/render'
|
||||||
|
|
|
@ -1889,7 +1889,7 @@ InitFonts ()
|
||||||
{
|
{
|
||||||
patternCache = MakeFontPatternCache();
|
patternCache = MakeFontPatternCache();
|
||||||
|
|
||||||
#ifndef KDRIVESERVER
|
#ifndef BUILTIN_FONTS
|
||||||
if (screenInfo.numScreens > screenInfo.numVideoScreens) {
|
if (screenInfo.numScreens > screenInfo.numVideoScreens) {
|
||||||
PrinterFontRegisterFpeFunctions();
|
PrinterFontRegisterFpeFunctions();
|
||||||
FontFileCheckRegisterFpeFunctions();
|
FontFileCheckRegisterFpeFunctions();
|
||||||
|
@ -1897,10 +1897,11 @@ InitFonts ()
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef KDRIVESERVER
|
#ifdef BUILTIN_FONTS
|
||||||
BuiltinRegisterFpeFunctions();
|
BuiltinRegisterFpeFunctions();
|
||||||
#endif
|
#else
|
||||||
FontFileRegisterFpeFunctions();
|
FontFileRegisterFpeFunctions();
|
||||||
|
#endif
|
||||||
#ifndef NOFONTSERVERACCESS
|
#ifndef NOFONTSERVERACCESS
|
||||||
fs_register_fpe_functions();
|
fs_register_fpe_functions();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -403,9 +403,14 @@ main(int argc, char *argv[], char *envp[])
|
||||||
FatalError("failed to initialize core devices");
|
FatalError("failed to initialize core devices");
|
||||||
|
|
||||||
InitFonts();
|
InitFonts();
|
||||||
|
#ifdef BUILTIN_FONTS
|
||||||
|
defaultFontPath = "built-ins";
|
||||||
|
#else
|
||||||
if (loadableFonts) {
|
if (loadableFonts) {
|
||||||
SetFontPath(0, 0, (unsigned char *)defaultFontPath, &error);
|
SetFontPath(0, 0, (unsigned char *)defaultFontPath, &error);
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
if (SetDefaultFontPath(defaultFontPath) != Success)
|
if (SetDefaultFontPath(defaultFontPath) != Success)
|
||||||
ErrorF("failed to set default font path '%s'",
|
ErrorF("failed to set default font path '%s'",
|
||||||
defaultFontPath);
|
defaultFontPath);
|
||||||
|
|
|
@ -439,4 +439,7 @@
|
||||||
/* Support D-BUS */
|
/* Support D-BUS */
|
||||||
#undef HAVE_DBUS
|
#undef HAVE_DBUS
|
||||||
|
|
||||||
|
/* Use only built-in fonts */
|
||||||
|
#undef BUILTIN_FONTS
|
||||||
|
|
||||||
#endif /* _DIX_CONFIG_H_ */
|
#endif /* _DIX_CONFIG_H_ */
|
||||||
|
|
Loading…
Reference in New Issue