SOURCES: fontconfig-cmap-parsing.patch (NEW) - speed up cache gene...

charles charles at pld-linux.org
Tue May 30 17:56:53 CEST 2006


Author: charles                      Date: Tue May 30 15:56:53 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- speed up cache generation (from FC)

---- Files affected:
SOURCES:
   fontconfig-cmap-parsing.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/fontconfig-cmap-parsing.patch
diff -u /dev/null SOURCES/fontconfig-cmap-parsing.patch:1.1
--- /dev/null	Tue May 30 17:56:53 2006
+++ SOURCES/fontconfig-cmap-parsing.patch	Tue May 30 17:56:48 2006
@@ -0,0 +1,63 @@
+--- fontconfig-2.3.95/src/fcfreetype.c.cmap-parsing	2006-04-25 11:31:41.000000000 -0400
++++ fontconfig-2.3.95/src/fcfreetype.c	2006-05-18 08:14:09.000000000 -0400
+@@ -2511,31 +2511,12 @@
+ 	}
+ 	else
+ 	{
+-	    FT_UInt gindex;
+-	  
+-	    /*
+-	     * Find the first encoded character in the font
+-	     */
+-	    if (FT_Get_Char_Index (face, 0))
++            page = ~0;
++            leaf = NULL;
++            ucs4 = FT_Get_First_Char (face, &glyph);
++            while (glyph != 0)
+ 	    {
+-		ucs4 = 0;
+-		gindex = 1;
+-	    }
+-	    else
+-	    {
+-		ucs4 = FT_Get_Next_Char (face, 0, &gindex);
+-		if (!ucs4)
+-		    gindex = 0;
+-	    }
+-
+-	    while (gindex)
+-	    {
+-		page = ucs4 >> 8;
+-		leaf = 0;
+-		while ((ucs4 >> 8) == page)
+-		{
+-		    glyph = FT_Get_Char_Index (face, ucs4);
+-		    if (glyph && FcFreeTypeCheckGlyph (face, ucs4, 
++                if (FcFreeTypeCheckGlyph (face, ucs4,
+ 						       glyph, blanks, &advance))
+ 		    {
+ 			if (advance)
+@@ -2558,8 +2539,9 @@
+ 			    }
+ 			}
+ 
+-			if (!leaf)
++                    if ((ucs4 >> 8) != page)
+ 			{
++                        page = (ucs4 >> 8);
+ 			    leaf = FcCharSetFindLeafCreate (fcs, ucs4);
+ 			    if (!leaf)
+ 				goto bail1;
+@@ -2571,11 +2553,7 @@
+ 			    font_max = ucs4;
+ #endif
+ 		    }
+-		    ucs4++;
+-		}
+-		ucs4 = FT_Get_Next_Char (face, ucs4 - 1, &gindex);
+-		if (!ucs4)
+-		    gindex = 0;
++                ucs4 = FT_Get_Next_Char (face, ucs4, &glyph);
+ 	    }
+ #ifdef CHECK
+ 	    for (ucs4 = 0; ucs4 < 0x10000; ucs4++)
================================================================


More information about the pld-cvs-commit mailing list