|
发表于 2005-6-29 16:28:38
|
显示全部楼层
[quote:31cad168b7="FangQ"][quote:31cad168b7="cnhnln"]这两个粗体都是怎么生成的阿?说来听听啊。我都问了一遍了,都不理我 [/quote]
这个我在第二个粗体的发行公告里面写了:
http://sourceforge.net/project/shownotes.php?release_id=337916
[code:1]This package is the bold face for WenQuanYi Bitmap Song.
the bolding process uses the traditional algorithm, i.e.
extending each black pixel one pixel to the right.
if(isbold)
{
char *bitmap2=new char[16*16];
memcpy(bitmap2,bitmap,16*16);
for(int i=0;i<16;i++)
for(int c=0;c<16;c++)
{
if(!bitmap[i*16+c]) continue;
if(c<colcount-1) bitmap2[i*16+c+1]=1;
else if(c==colcount-1) bitmap2[i*16+c-1]=1;
}
memcpy(bitmap,bitmap2,16*16);
delete [] bitmap2;
}
To install this package, you need to overwrite the
original bold font pcf.gz files with the new files in
this package, and then restart X-window.
PS: The bold face in the original wqy-bitmapfont package
is generated by the following code
// bitmap[16*16] holds the original bitmap
// bitmap2[16*16] holds the bolded bitmap
// colcount is the actual bitmap size, say 11, 12, 14 and 16
// for example: colcount=11 means 11 pixel by 11 pixel bitmap
if(isbold)
{
char *bitmap2=new char[16*16];
memcpy(bitmap2,bitmap,16*16);
for(int i=0;i<16;i++)
for(int c=0;c<16;c++)
{
if(!bitmap[i*16+c]) continue;
if(c<colcount-1&&!bitmap[i*16+c+2])
bitmap2[i*16+c+1]=1;
else if(c>=colcount-1&&!bitmap[i*16+c-2])
bitmap2[i*16+c-1]=1;
}
memcpy(bitmap,bitmap2,16*16);
delete [] bitmap2;
}
Changes:
ChangeLog:
2005/6/26:
1. this font is bold font for wqy-bitmapfont 0.5.0 with the traditional algorithm[/code:1][/quote]
原来的呢?人工手动做的? |
|