From owner-freebsd-x11@FreeBSD.ORG Wed Feb 4 01:14:15 2009 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55764106566B for ; Wed, 4 Feb 2009 01:14:15 +0000 (UTC) (envelope-from gofdx-freebsd-x11@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id C1CF88FC08 for ; Wed, 4 Feb 2009 01:14:14 +0000 (UTC) (envelope-from gofdx-freebsd-x11@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LUWLE-0003Aw-LC for freebsd-x11@freebsd.org; Wed, 04 Feb 2009 01:14:12 +0000 Received: from 81.210.237.210 ([81.210.237.210]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Feb 2009 01:14:12 +0000 Received: from saper by 81.210.237.210 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Feb 2009 01:14:12 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-x11@freebsd.org From: Marcin Cieslak Date: Wed, 04 Feb 2009 02:13:51 +0100 Lines: 240 Message-ID: <4988EBCF.3010301@system.pl> References: <1233456742.1534.14.camel@ferret.2hip.net> <498897CB.7080505@system.pl> <3a142e750902031536o617e13c4m248ed716783ff37@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020009020904030107070907" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 81.210.237.210 User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8.1.19) Gecko/20090131 SeaMonkey/1.1.14 In-Reply-To: <3a142e750902031536o617e13c4m248ed716783ff37@mail.gmail.com> Sender: news Subject: Re: [HEADS UP/CFT] Xserver 1.6 + randr + intel X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2009 01:14:16 -0000 This is a multi-part message in MIME format. --------------020009020904030107070907 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Paul B. Mahol wrote: > On 2/3/09, Marcin Cieslak wrote: >> 1. First thing, I have lost access to my legacy X11 fonts. > > Missing freetype module should be fixed in xorg-server git. > It was actually --enable-builtin-fonts (the default) that caused the problem. The attached patch fixes the problem. I also added "--disable-builtin-fonts" to the Makefile since I didn't want to re-generate the configure file, but it may not be necessary. Adding this patch to the x11-servers/xorg-server/files made my xterm run again. Thanks for the pointer, the patch is actually http://42.pl/u/1v1N slightly modified. --Marcin --------------020009020904030107070907 Content-Type: text/plain; name="patch-builtin-fonts" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-builtin-fonts" --- include/dixfont.h.orig 2009-01-31 05:21:50.000000000 +0100 +++ include/dixfont.h 2009-02-04 01:36:50.928061947 +0100 @@ -142,4 +142,6 @@ extern void SetGlyphCachingMode(int /*newmode*/); +extern _X_EXPORT void BuiltinRegisterFpeFunctions(void); + #endif /* DIXFONT_H */ --- dix/dixfonts.c.orig 2009-01-31 05:21:50.000000000 +0100 +++ dix/dixfonts.c 2009-02-04 01:34:22.024360263 +0100 @@ -1907,12 +1907,9 @@ { patternCache = MakeFontPatternCache(); -#ifdef BUILTIN_FONTS BuiltinRegisterFpeFunctions(); -#else FontFileRegisterFpeFunctions(); fs_register_fpe_functions(); -#endif } int --- hw/xfree86/common/xf86Config.c.orig 2009-01-31 05:21:50.000000000 +0100 +++ hw/xfree86/common/xf86Config.c 2009-02-04 01:34:22.029363650 +0100 @@ -110,8 +110,6 @@ #define PROJECTROOT "/usr/X11R6" #endif -static char *fontPath = NULL; - static ModuleDefault ModuleDefaults[] = { {.name = "extmod", .toLoad = TRUE, .load_opt=NULL}, {.name = "dbe", .toLoad = TRUE, .load_opt=NULL}, @@ -586,90 +584,55 @@ static void configFiles(XF86ConfFilesPtr fileconf) { - MessageType pathFrom = X_DEFAULT; - int countDirs; - char *temp_path; - char *log_buf; - - /* FontPath */ - /* Try XF86Config FontPath first */ - if (!xf86fpFlag) { - if (fileconf) { - if (fileconf->file_fontpath) { - char *f = xf86ValidateFontPath(fileconf->file_fontpath); - pathFrom = X_CONFIG; - if (*f) { - if (xf86Info.useDefaultFontPath) { - char *g; - xf86Msg(X_DEFAULT, "Including the default font path %s.\n", defaultFontPath); - g = xnfalloc(strlen(defaultFontPath) + strlen(f) + 3); - strcpy(g, f); - strcat(g, ","); - defaultFontPath = strcat(g, defaultFontPath); - xfree(f); - } else { - defaultFontPath = f; - } - } else { - xf86Msg(X_WARNING, - "FontPath is completely invalid. Using compiled-in default.\n"); - fontPath = NULL; - pathFrom = X_DEFAULT; - } - } - } else { - xf86Msg(X_DEFAULT, - "No FontPath specified. Using compiled-in default.\n"); - pathFrom = X_DEFAULT; - } - } else { - /* Use fontpath specified with '-fp' */ - if (fontPath) - { - fontPath = NULL; - } - pathFrom = X_CMDLINE; - } - if (!fileconf) { - /* xf86ValidateFontPath will write into it's arg, but defaultFontPath - could be static, so we make a copy. */ - char *f = xnfalloc(strlen(defaultFontPath) + 1); - f[0] = '\0'; - strcpy (f, defaultFontPath); - defaultFontPath = xf86ValidateFontPath(f); - xfree(f); - } else { - if (fileconf) { - if (!fileconf->file_fontpath) { - /* xf86ValidateFontPath will write into it's arg, but defaultFontPath - could be static, so we make a copy. */ - char *f = xnfalloc(strlen(defaultFontPath) + 1); - f[0] = '\0'; - strcpy (f, defaultFontPath); - defaultFontPath = xf86ValidateFontPath(f); - xfree(f); + MessageType pathFrom; + Bool must_copy; + int size, countDirs; + char *temp_path, *log_buf, *start, *end; + + /* FontPath */ + must_copy = TRUE; + + temp_path = defaultFontPath ? defaultFontPath : ""; + if (xf86fpFlag) + pathFrom = X_CMDLINE; + else if (fileconf && fileconf->file_fontpath) { + pathFrom = X_CONFIG; + if (xf86Info.useDefaultFontPath) { + defaultFontPath = Xprintf("%s%s%s", + fileconf->file_fontpath, + *temp_path ? "," : "", temp_path); + must_copy = FALSE; + } + else + defaultFontPath = fileconf->file_fontpath; } - } - } - - /* If defaultFontPath is still empty, exit here */ + else + pathFrom = X_DEFAULT; + temp_path = defaultFontPath ? defaultFontPath : ""; - if (! *defaultFontPath) - FatalError("No valid FontPath could be found."); + /* ensure defaultFontPath contains "built-ins" */ + start = strstr(temp_path, "built-ins"); + end = start + strlen("built-ins"); + if (start == NULL || + !((start == temp_path || start[-1] == ',') && (!*end || *end == ','))) { + defaultFontPath = Xprintf("%s%sbuilt-ins", + temp_path, *temp_path ? "," : ""); + must_copy = FALSE; + } + /* xf86ValidateFontPath modifies its argument, but returns a copy of it. */ + temp_path = must_copy ? XNFstrdup(defaultFontPath) : defaultFontPath; + defaultFontPath = xf86ValidateFontPath(temp_path); + free(temp_path); + + /* make fontpath more readable in the logfiles */ + countDirs = 1; + temp_path = defaultFontPath; + while ((temp_path = index(temp_path, ',')) != NULL) { + countDirs++; + temp_path++; + } - /* make fontpath more readable in the logfiles */ - countDirs = 1; - temp_path = defaultFontPath; - while((temp_path = index(temp_path, ',')) != NULL) { - countDirs++; - temp_path++; - } - log_buf = xnfalloc(strlen(defaultFontPath) + (2 * countDirs) + 1); - if(!log_buf) /* fallback to old method */ - xf86Msg(pathFrom, "FontPath set to \"%s\"\n", defaultFontPath); - else { - char *start, *end; - int size; + log_buf = xnfalloc(strlen(defaultFontPath) + (2 * countDirs) + 1); temp_path = log_buf; start = defaultFontPath; while((end = index(start, ',')) != NULL) { @@ -685,7 +648,6 @@ strcpy(temp_path, start); xf86Msg(pathFrom, "FontPath set to:\n%s\n", log_buf); xfree(log_buf); - } if (fileconf && fileconf->file_inputdevs) { --- configure.ac.orig 2009-01-31 06:11:48.000000000 +0100 +++ configure.ac 2009-02-04 01:34:22.021359628 +0100 @@ -503,9 +503,6 @@ [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: yes)]), - [BUILTIN_FONTS=$enableval], - [BUILTIN_FONTS=yes]) AC_ARG_ENABLE(null-root-cursor, AS_HELP_STRING([--enable-null-root-cursor], [Use an empty root cursor (default: use core cursor)]), [NULL_ROOT_CURSOR=$enableval], [NULL_ROOT_CURSOR=no]) @@ -958,11 +955,6 @@ AC_DEFINE(DPMSExtension, 1, [Support DPMS extension]) fi -if test "x$BUILTIN_FONTS" = xyes; then - AC_DEFINE(BUILTIN_FONTS, 1, [Use only built-in fonts]) - FONTPATH="built-ins" -fi - if test "x$XCALIBRATE" = xyes && test "$KDRIVE" = yes; then AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension]) REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto" --------------020009020904030107070907--