Commit e6d42357a1d36dd41da3e3d0542b89e2e392511b

henry 2001-10-30T02:51:30

Fixed c_stor to ensure that a valid charmap is created

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/FTCharmap.cpp b/src/FTCharmap.cpp
index ae9075b..75f9224 100644
--- a/src/FTCharmap.cpp
+++ b/src/FTCharmap.cpp
@@ -5,6 +5,12 @@ FTCharmap::FTCharmap( FT_Face face)
 :	ftFace( face),
 	err(0)
 {
+	// Check that the default is valid
+	if( !face->charmap)
+	{
+		FT_Set_Charmap( ftFace, ftFace->charmaps[0]);
+	}
+	
 	ftEncoding = face->charmap->encoding;
 }