[Bf-blender-cvs] [4c4aeaa] master: Fix: Wrong variable used to check for metrics files on BLF

Diego Hernan Borghetti noreply at git.blender.org
Sun Nov 24 00:20:38 CET 2013


Commit: 4c4aeaa5467e7f303aeb0da55731ee2294d6b376
Author: Diego Hernan Borghetti
Date:   Sat Nov 23 15:36:38 2013 -0300
http://developer.blender.org/rB4c4aeaa5467e7f303aeb0da55731ee2294d6b376

Fix: Wrong variable used to check for metrics files on BLF

Looks like this is has been there since the initial commit
of BLF.

The blf_dir_metrics_search was using the pointer to the
extension of the file and not the full path to check for
metrics files (.afm/.pfm).

Never notice before probably because is not common to use a font
with additional metrics files.

===================================================================

M	source/blender/blenfont/intern/blf_dir.c

===================================================================

diff --git a/source/blender/blenfont/intern/blf_dir.c b/source/blender/blenfont/intern/blf_dir.c
index 721e86f..da4d0b7 100644
--- a/source/blender/blenfont/intern/blf_dir.c
+++ b/source/blender/blenfont/intern/blf_dir.c
@@ -199,14 +199,14 @@ char *blf_dir_metrics_search(const char *filename)
 		s[2] = 'm';
 
 		/* first check .afm */
-		if (BLI_exists(s))
-			return s;
+		if (BLI_exists(mfile))
+			return mfile;
 
 		/* and now check .pfm */
 		s[0] = 'p';
 
-		if (BLI_exists(s))
-			return s;
+		if (BLI_exists(mfile))
+			return mfile;
 	}
 	MEM_freeN(mfile);
 	return NULL;




More information about the Bf-blender-cvs mailing list