Initialize matrix during name parsing

Before:
$ fc-match sans:matrix=2 -v | grep matrix
	matrix: [2 6.95183e-310; 0 0](s)

After:
$ fc-match sans:matrix=2 -v | grep matrix
	matrix: [2 0; 0 1](s)
This commit is contained in:
Behdad Esfahbod 2012-12-31 19:55:37 -06:00
parent 6bfef3ca4e
commit 31ce352bb3
1 changed files with 1 additions and 0 deletions

View File

@ -595,6 +595,7 @@ FcNameConvert (FcType type, FcChar8 *string)
v.u.d = strtod ((char *) string, 0);
break;
case FcTypeMatrix:
m.xx = m.yy = 1.; m.xy = m.yx = 0.;
sscanf ((char *) string, "%lg %lg %lg %lg", &m.xx, &m.xy, &m.yx, &m.yy);
v.u.m = FcMatrixCopy (&m);
break;