Make the font name and size settings reflect the data in the font file

rather than arbitrary values.
This commit is contained in:
Bill Medland 2001-07-18 20:00:44 +00:00 committed by Alexandre Julliard
parent 0249fcd560
commit 4eb22c68b3
1 changed files with 4 additions and 3 deletions

View File

@ -338,8 +338,9 @@ int l_ascent = return_data_value(dfShort, &cpe_font_struct->hdr.fi.dfAscent);
point_size = 10 * return_data_value(dfShort, &cpe_font_struct->hdr.fi.dfPoints );
dpi = (l_cellheight * 720) / point_size;
fprintf(fs, "%d-%d-%d-%d-", l_cellheight, 10*l_cellheight, 72, 72);
/* point_size, dpi, dpi); */
fprintf(fs, "%d-%d-%d-%d-",l_cellheight, point_size,
return_data_value (dfShort, &cpe_font_struct->hdr.fi.dfHorizRes),
return_data_value (dfShort, &cpe_font_struct->hdr.fi.dfVertRes));
/* spacing */
@ -379,7 +380,7 @@ int l_ascent = return_data_value(dfShort, &cpe_font_struct->hdr.fi.dfAscent);
else return ERROR_DATA;
fprintf(fs, "SIZE %d %d %d\n",
l_cellheight,
return_data_value(dfShort, &cpe_font_struct->hdr.fi.dfPoints ),
return_data_value(dfShort, &cpe_font_struct->hdr.fi.dfHorizRes),
return_data_value(dfShort, &cpe_font_struct->hdr.fi.dfVertRes)); /* dfVertRes[2] */