bla
This commit is contained in:
1 parent
7e226f76cf
commit
08fc44bf91
6 files changed
+20
-7
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 126 KiB |
@@ -131,12 +131,19 @@ void test_load_fontfamily1()
|
|||||||
int charheight = 30;
|
int charheight = 30;
|
||||||
amsglyphrange gr;
|
amsglyphrange gr;
|
||||||
amsfontfamily amsff;
|
amsfontfamily amsff;
|
||||||
|
amsfontatlas fa;
|
||||||
|
|
||||||
const char *nfont = "../inputfonts/FreeMono.ttf";
|
// const char *nfont = "../inputfonts/FreeMono.ttf";
|
||||||
const char *bfont = "../inputfonts/FreeMonoBold.ttf";
|
// const char *bfont = "../inputfonts/FreeMonoBold.ttf";
|
||||||
const char *ifont = "../inputfonts/FreeMonoOblique.ttf";
|
// const char *ifont = "../inputfonts/FreeMonoOblique.ttf";
|
||||||
const char *bifont = "../inputfonts/FreeMonoBoldOblique.ttf";
|
// const char *bifont = "../inputfonts/FreeMonoBoldOblique.ttf";
|
||||||
|
|
||||||
|
const char *nfont = "../inputfonts/LiberationSans-Regular.ttf";
|
||||||
|
const char *bfont = "../inputfonts/LiberationSans-Bold.ttf";
|
||||||
|
const char *ifont = "../inputfonts/LiberationSans-Italic.ttf";
|
||||||
|
const char *bifont = "../inputfonts/LiberationSans-BoldItalic.ttf";
|
||||||
|
|
||||||
|
amsff.charheight = charheight;
|
||||||
res = ft_load_glyphrange(nfont,charheight,0,256,&gr);
|
res = ft_load_glyphrange(nfont,charheight,0,256,&gr);
|
||||||
gr.typefacetype = typefacetype_normal;
|
gr.typefacetype = typefacetype_normal;
|
||||||
amsff.addrange(gr);
|
amsff.addrange(gr);
|
||||||
@@ -164,10 +171,16 @@ void test_load_fontfamily1()
|
|||||||
amsff.docalculations();
|
amsff.docalculations();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
amsff.print();
|
amsff.print();
|
||||||
|
printf("Nglyphs: %ld\n",amsff.countglyphs());
|
||||||
|
|
||||||
|
amsff.build_fontatlas(&fa);
|
||||||
|
fa.print();
|
||||||
|
|
||||||
|
fa.savetexture("../notes/testfontatlastexture.png");
|
||||||
|
|
||||||
|
fa.save("../notes/amstestfont.amsfont");
|
||||||
|
fa.load("../notes/amstestfont.amsfont");
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in new issue
Block a user