On Sun, Dec 13, 2009 at 2:57 AM, Antoine Jacoutot <[email protected]> wrote:
> On Sun, 13 Dec 2009, patrick keshishian wrote:
>
>> This is a simple update to the the port to remove a fonts.alias entry
>> that is causing -current xenocara to not load the font. I posted about
>> this on ports@ a few days ago[0], but did not receive any response to
>> my question as to whether or not the new behavior was correct.
>> Regardless, it hardly makes sense to have an alias that is exactly the
>> same as what it is supposed to be an alias of.
>
> I have nothing against that diff but I do wonder why it worked before
> and it doesn't anymore. Were we just lucky or did something change? I'd
> rather find the exact cause of this instead of using band-aid, and what
> about the other fonts ports?
I think this is the answer:
Index: fontfile/fontdir.c
===================================================================
RCS file: /cvs/anoncvs/cvs/obsd/xenocara/lib/libXfont/src/fontfile/fontdir.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- fontfile/fontdir.c 4 Apr 2007 02:51:26 -0000 1.4
+++ fontfile/fontdir.c 31 Oct 2009 17:57:12 -0000 1.5
...
@@ -811,6 +809,10 @@ FontFileAddFontAlias (FontDirectoryPtr d
{
FontEntryRec entry;
+ if (strcmp(aliasName,fontName) == 0) {
+ /* Don't allow an alias to point to itself and create a loop */
+ return FALSE;
+ }