Changed for the new hinter in Freetype 2.1.4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
diff --git a/test/FTFont-Test.cpp b/test/FTFont-Test.cpp
index 7d98107..f6b8ec6 100755
--- a/test/FTFont-Test.cpp
+++ b/test/FTFont-Test.cpp
@@ -70,7 +70,8 @@ class FTFontTest : public CppUnit::TestCase
void testOpenFont()
{
TestFont badFont( BAD_FONT_FILE);
- CPPUNIT_ASSERT( badFont.Error() == 1);
+ // This is a different error # on Mac to other platforms
+ CPPUNIT_ASSERT( badFont.Error() == 6);
TestFont goodFont( GOOD_FONT_FILE);
CPPUNIT_ASSERT( goodFont.Error() == 0);
@@ -105,6 +106,9 @@ class FTFontTest : public CppUnit::TestCase
{
CPPUNIT_ASSERT_DOUBLES_EQUAL( 0, testFont->Ascender(), 0.01);
CPPUNIT_ASSERT_DOUBLES_EQUAL( 0, testFont->Descender(), 0.01);
+
+ float advance = testFont->Advance( GOOD_UNICODE_TEST_STRING);
+ CPPUNIT_ASSERT( advance == 0);
CPPUNIT_ASSERT( testFont->FaceSize( FONT_POINT_SIZE));
CPPUNIT_ASSERT( testFont->Error() == 0);
@@ -112,14 +116,14 @@ class FTFontTest : public CppUnit::TestCase
CPPUNIT_ASSERT( testFont->FaceSize() == FONT_POINT_SIZE);
CPPUNIT_ASSERT_DOUBLES_EQUAL( 52, testFont->Ascender(), 0.01);
- CPPUNIT_ASSERT_DOUBLES_EQUAL( -14, testFont->Descender(), 0.01);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( -15, testFont->Descender(), 0.01);
CPPUNIT_ASSERT( testFont->FaceSize( FONT_POINT_SIZE * 2));
CPPUNIT_ASSERT( testFont->Error() == 0);
CPPUNIT_ASSERT( testFont->FaceSize() == FONT_POINT_SIZE * 2);
- CPPUNIT_ASSERT_DOUBLES_EQUAL( 103, testFont->Ascender(), 0.01);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 104, testFont->Ascender(), 0.01);
CPPUNIT_ASSERT_DOUBLES_EQUAL( -29, testFont->Descender(), 0.01);
}