This commit is contained in:
olikraus 2018-01-14 23:07:22 +01:00
parent 15f8840c38
commit 3101028071
3 changed files with 50 additions and 1 deletions

View File

@ -85,6 +85,10 @@ siji: bdfconv
wqy: bdfconv
./bdfconv -v -f 1 -M ../build/gb2312.map ../bdf/wenquanyi_9pt.bdf -o test.c -n test -d ../bdf/helvB12.bdf
./bdfconv -v -f 1 -M ../build/gb2312.map ../bdf/wenquanyi_10pt.bdf -o test.c -n test -d ../bdf/helvB12.bdf
./bdfconv -v -f 1 -M ../build/gb2312.map ../bdf/wenquanyi_13px.bdf -o test.c -n test -d ../bdf/helvB12.bdf
./bdfconv -v -f 1 -M ../build/gb2312.map ../bdf/wenquanyi_11pt.bdf -o test.c -n test -d ../bdf/helvB12.bdf
./bdfconv -v -f 1 -M ../build/gb2312.map ../bdf/wenquanyi_12pt.bdf -o test.c -n test -d ../bdf/helvB12.bdf

View File

@ -151,17 +151,27 @@ int bg_SetBitmapSize(bg_t *bg, int w, int h)
void bg_SetBitmapPixel(bg_t *bg, int x, int y, int value)
{
static long last_encoding = 0xffffffff;
static long biggest_x = -1;
if ( x >= bg->bitmap_width || y >= bg->bitmap_height )
{
if ( last_encoding != bg->encoding )
{
biggest_x = x;
printf("Glyph size problem: ");
printf("encoding=%ld/0x%lx, ", bg->encoding, bg->encoding);
printf("width=%d, height=%d, ", bg->bitmap_width, bg->bitmap_height);
printf("requested position x=%d, y=%d\n", x, y);
printf("requested position x=%d, y=%d (use BBX %d ...?)\n", x, y, x+1);
last_encoding = bg->encoding;
}
else if ( biggest_x < x )
{
biggest_x = x;
printf("Glyph size problem: ");
printf("encoding=%ld/0x%lx, ", bg->encoding, bg->encoding);
printf("width=%d, height=%d, ", bg->bitmap_width, bg->bitmap_height);
printf("requested position x=%d, y=%d (use BBX %d ...?)\n", x, y, x+1);
}
}
assert( x < ((bg->bitmap_width+7)/8)*8 );

View File

@ -409,6 +409,41 @@ Greek Extended 1F001FFF
{ 0, "gb24st.bdf", "gb24st", 13, 0, BM_T, FM_C, MM_M, "chinese2.map", "_2" },
{ 0, "gb24st.bdf", "gb24st", 13, 0, BM_T, FM_C, MM_M, "chinese3.map", "_3" },
{ 0, "wenquanyi_9pt.bdf", "wqy12", 21, 0, BM_T, FM_C, MM_M, "chinese1.map", "_chinese1" },
{ 0, "wenquanyi_9pt.bdf", "wqy12", 21, 0, BM_T, FM_C, MM_M, "chinese2.map", "_chinese2" },
{ 0, "wenquanyi_9pt.bdf", "wqy12", 21, 0, BM_T, FM_C, MM_M, "chinese2.map", "_chinese3" },
{ 0, "wenquanyi_9pt.bdf", "wqy12", 21, 0, BM_T, FM_C, MM_M, "gb2312.map", "_gb2312" },
{ 0, "wenquanyi_9pt.bdf", "wqy12", 21, 0, BM_T, FM_C, MM_M, "gb2312a.map", "_gb2312a" },
{ 0, "wenquanyi_9pt.bdf", "wqy12", 21, 0, BM_T, FM_C, MM_M, "gb2312b.map", "_gb2312b" },
{ 0, "wenquanyi_10pt.bdf", "wqy13", 21, 0, BM_T, FM_C, MM_M, "chinese1.map", "_chinese1" },
{ 0, "wenquanyi_10pt.bdf", "wqy13", 21, 0, BM_T, FM_C, MM_M, "chinese2.map", "_chinese2" },
{ 0, "wenquanyi_10pt.bdf", "wqy13", 21, 0, BM_T, FM_C, MM_M, "chinese2.map", "_chinese3" },
{ 0, "wenquanyi_10pt.bdf", "wqy13", 21, 0, BM_T, FM_C, MM_M, "gb2312.map", "_gb2312" },
{ 0, "wenquanyi_10pt.bdf", "wqy13", 21, 0, BM_T, FM_C, MM_M, "gb2312a.map", "_gb2312a" },
{ 0, "wenquanyi_10pt.bdf", "wqy13", 21, 0, BM_T, FM_C, MM_M, "gb2312b.map", "_gb2312b" },
{ 0, "wenquanyi_13px.bdf", "wqy14", 21, 0, BM_T, FM_C, MM_M, "chinese1.map", "_chinese1" },
{ 0, "wenquanyi_13px.bdf", "wqy14", 21, 0, BM_T, FM_C, MM_M, "chinese2.map", "_chinese2" },
{ 0, "wenquanyi_13px.bdf", "wqy14", 21, 0, BM_T, FM_C, MM_M, "chinese2.map", "_chinese3" },
{ 0, "wenquanyi_13px.bdf", "wqy14", 21, 0, BM_T, FM_C, MM_M, "gb2312.map", "_gb2312" },
{ 0, "wenquanyi_13px.bdf", "wqy14", 21, 0, BM_T, FM_C, MM_M, "gb2312a.map", "_gb2312a" },
{ 0, "wenquanyi_13px.bdf", "wqy14", 21, 0, BM_T, FM_C, MM_M, "gb2312b.map", "_gb2312b" },
{ 0, "wenquanyi_11pt.bdf", "wqy15", 21, 0, BM_T, FM_C, MM_M, "chinese1.map", "_chinese1" },
{ 0, "wenquanyi_11pt.bdf", "wqy15", 21, 0, BM_T, FM_C, MM_M, "chinese2.map", "_chinese2" },
{ 0, "wenquanyi_11pt.bdf", "wqy15", 21, 0, BM_T, FM_C, MM_M, "chinese2.map", "_chinese3" },
{ 0, "wenquanyi_11pt.bdf", "wqy15", 21, 0, BM_T, FM_C, MM_M, "gb2312.map", "_gb2312" },
{ 0, "wenquanyi_11pt.bdf", "wqy15", 21, 0, BM_T, FM_C, MM_M, "gb2312a.map", "_gb2312a" },
{ 0, "wenquanyi_11pt.bdf", "wqy15", 21, 0, BM_T, FM_C, MM_M, "gb2312b.map", "_gb2312b" },
{ 0, "wenquanyi_12pt.bdf", "wqy16", 21, 0, BM_T, FM_C, MM_M, "chinese1.map", "_chinese1" },
{ 0, "wenquanyi_12pt.bdf", "wqy16", 21, 0, BM_T, FM_C, MM_M, "chinese2.map", "_chinese2" },
{ 0, "wenquanyi_12pt.bdf", "wqy16", 21, 0, BM_T, FM_C, MM_M, "chinese2.map", "_chinese3" },
{ 0, "wenquanyi_12pt.bdf", "wqy16", 21, 0, BM_T, FM_C, MM_M, "gb2312.map", "_gb2312" },
{ 0, "wenquanyi_12pt.bdf", "wqy16", 21, 0, BM_T, FM_C, MM_M, "gb2312a.map", "_gb2312a" },
{ 0, "wenquanyi_12pt.bdf", "wqy16", 21, 0, BM_T, FM_C, MM_M, "gb2312b.map", "_gb2312b" },
//#endif /* TMP */
{ 0, "b10.bdf", "b10", 16, 0, BM_T, FM_C, MM_M, "japanese1.map", "_japanese1" },
{ 0, "b10.bdf", "b10", 16, 0, BM_T, FM_C, MM_M, "japanese2.map", "_japanese2" },