fontconfig: Branch 'master' - 4 commits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 conf.d/25-unhint-nonlatin.conf |  119 -----------------------------------------
 fc-cache/fc-cache.c            |    1 
 src/fcatomic.c                 |    2 
 src/fccharset.c                |    6 ++
 src/fcfreetype.c               |    5 +
 src/fcinit.c                   |    2 
 src/fcpat.c                    |    2 
 src/fcstr.c                    |    9 ++-
 8 files changed, 21 insertions(+), 125 deletions(-)

New commits:
commit 8d0139b0e68b081c9cdbeaa025fb278105ebf50c
Author: Keith Packard <keithp@xxxxxxxxxx>
Date:   Sun May 4 19:08:31 2008 -0700

    Freetype 2.3.5 (2007-jul-02) fixes indic font hinting. re-enable (bug 15822)
    
    Autohinting for Indic fonts has been disabled since freetype could not handle
    it properly. But since freetype-2.3.5, the hinting problems for indic fonts
    have been fixed. Thus this is a request to enable the autohinting in
    fontconfig again for all the indic fonts.

diff --git a/conf.d/25-unhint-nonlatin.conf b/conf.d/25-unhint-nonlatin.conf
index 3a00055..3799853 100644
--- a/conf.d/25-unhint-nonlatin.conf
+++ b/conf.d/25-unhint-nonlatin.conf
@@ -125,123 +125,4 @@
 		</edit>
 	</match>
 
- <!-- 
- We also need to turn off hinting for Indic fonts with a joined baseline.
- -->
-	<match target="font">
-		<test name="family" compare="eq">
-			<string>Mukti Narrow</string>
-		</test>
-		<edit name="hinting" mode="assign">
-			<bool>false</bool>
-		</edit>
-	</match>
-	<match target="font">
-		<test name="family" compare="eq">
-			<string>Lohit Hindi</string>
-		</test>
-		<edit name="hinting" mode="assign">
-			<bool>false</bool>
-		</edit>
-	</match>
-	<match target="font">
-		<test name="family" compare="eq">
-			<string>Lohit Bengali</string>
-		</test>
-		<edit name="hinting" mode="assign">
-			<bool>false</bool>
-		</edit>
-	</match>
-	<match target="font">
-		<test name="family" compare="eq">
-			<string>Lohit Punjabi</string>
-		</test>
-		<edit name="hinting" mode="assign">
-			<bool>false</bool>
-		</edit>
-	</match>
-
-<!--
-Gujarti fonts are distorted when hinting is enabled. Turn it off.
--->
-	<match target="font">
-		<test name="family" compare="eq">
-			<string>Lohit Gujarati</string>
-		</test>
-		<edit name="hinting" mode="assign">
-			<bool>false</bool>
-		</edit>
-	</match>
-
-<!--
-Disabling hinting for newly added Indic fonts (kn/or/ml/te)
--->
-        <match target="font">
-                <test name="family" compare="eq">
-                        <string>Lohit Kannada</string>
-                </test>
-                <edit name="hinting" mode="assign">
-                        <bool>false</bool>
-                </edit>
-        </match>
-
-        <match target="font">
-                <test name="family" compare="eq">
-                        <string>Lohit Oriya</string>
-                </test>
-                <edit name="hinting" mode="assign">
-                        <bool>false</bool>
-                </edit>
-        </match>
-
-        <match target="font">
-                <test name="family" compare="eq">
-                        <string>Lohit Malayalam</string>
-                </test>
-                <edit name="hinting" mode="assign">
-                        <bool>false</bool>
-                </edit>
-        </match>
-
-        <match target="font">
-                <test name="family" compare="eq">
-                        <string>Lohit Telugu</string>
-                </test>
-                <edit name="hinting" mode="assign">
-                        <bool>false</bool>
-                </edit>
-        </match>
-
-<!--
-And Sinhala
--->
-	<match target="font">
-		<test name="family" compare="eq">
-			<string>LKLUG</string>
-		</test>
-		<edit name="hinting" mode="assign">
-			<bool>false</bool>
-		</edit>
-	</match>
-
-<!--
-Old(?) Indic fonts
--->
-	<match target="font">
-		<test name="family" compare="eq">
-			<string>Likhan</string>
-		</test>
-		<edit name="hinting" mode="assign">
-			<bool>false</bool>
-		</edit>
-	</match>
-	<match target="font">
-		<test name="family" compare="eq">
-			<string>Raghindi</string>
-		</test>
-		<edit name="hinting" mode="assign">
-			<bool>false</bool>
-		</edit>
-	</match>
-
 </fontconfig>
commit 3a3f687b759ceb76fc1e6407980a4b2717a47219
Author: Keith Packard <keithp@xxxxxxxxxx>
Date:   Sun May 4 01:27:42 2008 -0700

    Add extended, caps, dunhill style mappings.
    
    extended -> expanded.
    caps, dunhill -> decorative

diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index 4ee8a63..a79308c 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -1016,6 +1016,7 @@ static const FcStringConst  widthConsts[] = {
     { (FC8) "extraexpanded",	FC_WIDTH_EXTRAEXPANDED },
     { (FC8) "ultraexpanded",	FC_WIDTH_ULTRAEXPANDED },
     { (FC8) "expanded",		FC_WIDTH_EXPANDED },	/* must be after *expanded */
+    { (FC8) "extended",		FC_WIDTH_EXPANDED },
 };
 
 #define NUM_WIDTH_CONSTS    (int) (sizeof (widthConsts) / sizeof (widthConsts[0]))
@@ -1036,11 +1037,11 @@ static const FcStringConst  slantConsts[] = {
 
 static const FcStringConst  decorativeConsts[] = {
     { (FC8) "shadow",		FcTrue },
-    { (FC8) "smallcaps",    	FcTrue },
+    { (FC8) "caps",		FcTrue },
     { (FC8) "antiqua",		FcTrue },
     { (FC8) "romansc",		FcTrue },
     { (FC8) "embosed",		FcTrue },
-    { (FC8) "romansmallcaps",	FcTrue },
+    { (FC8) "dunhill",		FcTrue },
 };
 
 #define NUM_DECORATIVE_CONSTS	(int) (sizeof (decorativeConsts) / sizeof (decorativeConsts[0]))
commit 13a14cbf56d56c14d53e5f55d7fcc4bdec900994
Author: Keith Packard <keithp@xxxxxxxxxx>
Date:   Sun May 4 01:26:40 2008 -0700

    Fix a few memory tracking mistakes.
    
    The built-in memory tracking code in fontconfig relies on a lot of manual
    function call tracking. A pain, but it helps debug leaks.

diff --git a/src/fcatomic.c b/src/fcatomic.c
index 9038a5f..8c04510 100644
--- a/src/fcatomic.c
+++ b/src/fcatomic.c
@@ -205,7 +205,7 @@ void
 FcAtomicDestroy (FcAtomic *atomic)
 {
     FcMemFree (FC_MEM_ATOMIC, sizeof (FcAtomic) +
-	       strlen ((char *) atomic->file) * 4 + 1 +
+	       strlen ((char *) atomic->file) * 4 + 4 +
 	       sizeof (NEW_NAME) + sizeof (LCK_NAME) + 
 	       sizeof (TMP_NAME));
 
diff --git a/src/fccharset.c b/src/fccharset.c
index 5da1312..f4042db 100644
--- a/src/fccharset.c
+++ b/src/fccharset.c
@@ -1239,6 +1239,9 @@ FcCharSetFreezerDestroy (FcCharSetFreezer *freezer)
 	for (ent = freezer->set_hash_table[i]; ent; ent = next)
 	{
 	    next = ent->next;
+	    FcMemFree (FC_MEM_CHARSET, (sizeof (FcCharSetEnt) +
+					ent->set.num * sizeof (FcCharLeaf *) +
+					ent->set.num * sizeof (FcChar16)));
 	    free (ent);
 	}
     }
@@ -1254,7 +1257,10 @@ FcCharSetFreezerDestroy (FcCharSetFreezer *freezer)
     }
 
     for (i = 0; i < freezer->leaf_block_count; i++)
+    {
 	free (freezer->leaf_blocks[i]);
+	FcMemFree (FC_MEM_CHARLEAF, FC_CHAR_LEAF_BLOCK * sizeof (FcCharLeafEnt));
+    }
 
     free (freezer->leaf_blocks);
     free (freezer);
diff --git a/src/fcinit.c b/src/fcinit.c
index 96aaa44..0998abc 100644
--- a/src/fcinit.c
+++ b/src/fcinit.c
@@ -141,6 +141,8 @@ FcFini (void)
 
     FcPatternFini ();
     FcCacheFini ();
+    if (FcDebug() & FC_DBG_MEMORY)
+	FcMemReport ();
 }
 
 /*
diff --git a/src/fcpat.c b/src/fcpat.c
index 9a62ec9..35127f2 100644
--- a/src/fcpat.c
+++ b/src/fcpat.c
@@ -1054,7 +1054,7 @@ FcStrStaticNameFini (void)
 	    next = b->next;
 	    name = (char *) (b + 1);
 	    size = sizeof (struct objectBucket) + strlen (name) + 1;
-	    FcMemFree (FC_MEM_STATICSTR, size);
+	    FcMemFree (FC_MEM_STATICSTR, size + sizeof (int));
 	    free (b);
 	}
 	FcObjectBuckets[i] = 0;
diff --git a/src/fcstr.c b/src/fcstr.c
index 1e7b466..f56f823 100644
--- a/src/fcstr.c
+++ b/src/fcstr.c
@@ -1025,11 +1025,14 @@ _FcStrSetAppend (FcStrSet *set, FcChar8 *s)
 	if (!strs)
 	    return FcFalse;
 	FcMemAlloc (FC_MEM_STRSET, (set->size + 2) * sizeof (FcChar8 *));
-	set->size = set->size + 1;
 	if (set->num)
 	    memcpy (strs, set->strs, set->num * sizeof (FcChar8 *));
 	if (set->strs)
+	{
+	    FcMemFree (FC_MEM_STRSET, (set->size + 1) * sizeof (FcChar8 *));
 	    free (set->strs);
+	}
+	set->size = set->size + 1;
 	set->strs = strs;
     }
     set->strs[set->num++] = s;
@@ -1118,9 +1121,11 @@ FcStrSetDestroy (FcStrSet *set)
     
 	for (i = 0; i < set->num; i++)
 	    FcStrFree (set->strs[i]);
-	FcMemFree (FC_MEM_STRSET, (set->size) * sizeof (FcChar8 *));
 	if (set->strs)
+	{
+	    FcMemFree (FC_MEM_STRSET, (set->size + 1) * sizeof (FcChar8 *));
 	    free (set->strs);
+	}
 	FcMemFree (FC_MEM_STRSET, sizeof (FcStrSet));
 	free (set);
     }
commit c6c9400d67ffefa95100d03e6650ea901b05116b
Author: Keith Packard <keithp@xxxxxxxxxx>
Date:   Sun May 4 01:25:04 2008 -0700

    Call FcFini to make memory debugging easier
    
    FcFini frees all libary data structures so valgrind should report 0
    allocations in use when the program exits.

diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c
index 54add90..cd664fa 100644
--- a/fc-cache/fc-cache.c
+++ b/fc-cache/fc-cache.c
@@ -457,6 +457,7 @@ main (int argc, char **argv)
      * library, and there aren't any signals flying around here.
      */
     FcConfigDestroy (config);
+    FcFini ();
     sleep (2);
     if (verbose)
 	printf ("%s: %s\n", argv[0], ret ? "failed" : "succeeded");
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux