forked from minhngoc25a/freetype2
Some corrections
This commit is contained in:
parent
a2e5fef55b
commit
46c66dcd32
|
@ -621,6 +621,46 @@ void Stitch(IMAGE* left, IMAGE* right, IMAGE* result){
|
|||
}
|
||||
}
|
||||
|
||||
/* This prints table-headers to a HTML file for the list-view page */
|
||||
void Print_Head( FILE* fp, char* family, char* style, int size ){
|
||||
fprintf(fp,
|
||||
"<html>\n\
|
||||
<head>\n\
|
||||
<title>\n\
|
||||
Glyph_Diff\n\
|
||||
</title>\n\
|
||||
<script src=\"script.js\" type=\"text/javascript\"></script>\n\
|
||||
<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">\n\
|
||||
</head>\n\
|
||||
<body>\n\
|
||||
<div class=\"freeze\">\n\
|
||||
<h4>Font Family: %s</h4>\n\
|
||||
<h4>Style: %s</h4>\n\
|
||||
<p><b>%d</b>pt at <b>%d</b>ppi</p>\n\
|
||||
</div>\n\
|
||||
<table>\n\
|
||||
<thead>\n\
|
||||
<tr>\n\
|
||||
<th onclick=\"sort_t(data,0,asc1);asc1*=-1;asc2=1;asc3=1;\">\n\
|
||||
<a href=\"#\">Glyph Index</a>\n\
|
||||
</th>\n\
|
||||
<th onclick=\"sort_t(data,1,asc2);asc2*=-1;asc3=1;asc1=1;\">\n\
|
||||
<a href=\"#\">Glyph Name</a>\n\
|
||||
</th>\n\
|
||||
<th onclick=\"sort_t(data,2,asc3);asc3*=-1;asc1=1;asc2=1;\">\n\
|
||||
<a href=\"#\">Difference</a>\n\
|
||||
</th>\n\
|
||||
<th>\n\
|
||||
Images\n\
|
||||
</th>\n\
|
||||
</tr>\n\
|
||||
</thead>\n\
|
||||
<tbody id=\"data\">\n", family,
|
||||
style,
|
||||
size,
|
||||
DPI );
|
||||
}
|
||||
|
||||
/* This prints a row to the HTML file for the list-view page. */
|
||||
void Print_Row( FILE* fp, int index, char* name, int diff )
|
||||
{
|
||||
|
|
|
@ -72,15 +72,10 @@ void Make_PNG (FT_Bitmap* bitmap,IMAGE* fruit, int i,int render_mode);
|
|||
int Generate_PNG (IMAGE *bitmap, const char *path,int render_mode);
|
||||
/* Read PNG */
|
||||
void Read_PNG(char *filename, IMAGE * after_effect);
|
||||
/* Add an effect using two PNG images */
|
||||
/* Base Glyph = Gray {127,0,0,255} OR as it is */
|
||||
/* Differences = Red {255,0,0,255} */
|
||||
/* Effect_ID = {1 or 2} */
|
||||
/* Add effects using two PNG images and generate an image*/
|
||||
int Add_effect(IMAGE* base, IMAGE* test, IMAGE* out, int Effect_ID);
|
||||
/* Stitch 2 PNG files */
|
||||
void Stitch(IMAGE* left, IMAGE* right, IMAGE* result);
|
||||
/* Print the row in list-view webpage */
|
||||
void Print_Row( FILE* fp, int index, char* name, int diff );
|
||||
/* Finding the first non-empty (non-white) column */
|
||||
int First_Column(IMAGE* input);
|
||||
/* Finding the first non-empty (non-white) row */
|
||||
|
@ -91,3 +86,7 @@ IMAGE* Append_Columns(IMAGE* small, IMAGE* big);
|
|||
IMAGE* Append_Rows(IMAGE* small, IMAGE* big);
|
||||
/* calculating the Pixel Differences */
|
||||
int Image_Diff( IMAGE* base, IMAGE* test);
|
||||
/* Print the row in list-view webpage */
|
||||
void Print_Row( FILE* fp, int index, char* name, int diff );
|
||||
/* Print the table-headers in list-view webpage */
|
||||
void Print_Head( FILE* fp, char* family, char* style, int size );
|
||||
|
|
|
@ -305,8 +305,8 @@ int main(int argc, char const *argv[])
|
|||
test_slot = test_face->glyph;
|
||||
|
||||
struct stat st = {0};
|
||||
if (stat("./images/", &st) == -1) {
|
||||
mkdir("./images/", 0777);
|
||||
if (stat("./html/", &st) == -1) {
|
||||
mkdir("./html/", 0777);
|
||||
}
|
||||
|
||||
if (stat("./html/images/", &st) == -1) {
|
||||
|
|
Loading…
Reference in New Issue