updated tests
This commit is contained in:
1 parent
47c03d83e9
commit
91a7c7d50c
7 files changed
+42
-4
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -17,6 +17,7 @@ void test_getglyph2();
|
||||
void test_facemetrics();
|
||||
void test_glyphrange_load();
|
||||
void test_load_fontfamily1();
|
||||
void test_rendertext_simple1();
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
Binary file not shown.
@@ -168,10 +168,9 @@ void test_load_fontfamily1()
|
||||
gr.typefacetype = typefacetype_normal;
|
||||
amsff.addrange(gr);
|
||||
|
||||
|
||||
|
||||
amsff.docalculations();
|
||||
|
||||
|
||||
|
||||
amsff.print();
|
||||
printf("Nglyphs: %ld\n",amsff.countglyphs());
|
||||
|
||||
@@ -194,5 +193,42 @@ void test_load_fontfamily1()
|
||||
return;
|
||||
}
|
||||
|
||||
void test_fontatlas2()
|
||||
{
|
||||
ams::font4::amsfontatlas fa;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_rendertext_simple1()
|
||||
{
|
||||
int I;
|
||||
amsstring s = "Hello World.\n This is a newline.";
|
||||
amsfontatlas fa;
|
||||
rendertext_simple_pars rpars;
|
||||
rendertext_simple_mesh mesh;
|
||||
|
||||
fa.load("../notes/amstestfont.amsfont");
|
||||
printf("debug: fa.Nglyphs: %d, range length %d\n",fa.Nglyphs,(int) fa.range.length);
|
||||
|
||||
// for(I=0;I<fa.range.length;I++)
|
||||
// {
|
||||
// fa.range[I].print();
|
||||
// }
|
||||
|
||||
|
||||
rendertext_simple(
|
||||
s,fa,rpars,&mesh
|
||||
);
|
||||
|
||||
for(I=0;I<mesh.vertices.length/3;I++)
|
||||
{
|
||||
printf("%d: (%1.3f, %1.3f, %1.3f)\n",I,mesh.vertices[3*I+0],mesh.vertices[3*I+1],mesh.vertices[3*I+2]);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
};
|
||||
+2
-1
@@ -11,7 +11,8 @@ int main(int argc, char* argv[])
|
||||
//ams::font4::test_facemetrics();
|
||||
//ams::font4::test_glyphrange_load();
|
||||
|
||||
test_load_fontfamily1();
|
||||
//test_load_fontfamily1();
|
||||
test_rendertext_simple1();
|
||||
|
||||
return ret;
|
||||
}
|
||||
Reference in new issue
Block a user