diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/convbdf.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/convbdf.c b/tools/convbdf.c index 14561869a2..16af43f3b8 100644 --- a/tools/convbdf.c +++ b/tools/convbdf.c | |||
@@ -393,7 +393,7 @@ int bdf_read_header(FILE *fp, struct font* pf) | |||
393 | fprintf(stderr, "Error: bad 'ENCODING'\n"); | 393 | fprintf(stderr, "Error: bad 'ENCODING'\n"); |
394 | return 0; | 394 | return 0; |
395 | } | 395 | } |
396 | if (encoding >= 0 && | 396 | if (encoding >= 0 && |
397 | encoding <= limit_char && | 397 | encoding <= limit_char && |
398 | encoding >= start_char) { | 398 | encoding >= start_char) { |
399 | 399 | ||
@@ -595,6 +595,16 @@ int bdf_read_bitmaps(FILE *fp, struct font* pf) | |||
595 | } | 595 | } |
596 | 596 | ||
597 | /* determine whether font doesn't require encode table*/ | 597 | /* determine whether font doesn't require encode table*/ |
598 | #ifdef ROTATE | ||
599 | l = 0; | ||
600 | for (i=0; i<pf->size; ++i) { | ||
601 | if (pf->offrot[i] != l) { | ||
602 | encodetable = 1; | ||
603 | break; | ||
604 | } | ||
605 | l += pf->maxwidth * (pf->height + 7) / 8; | ||
606 | } | ||
607 | #else | ||
598 | l = 0; | 608 | l = 0; |
599 | for (i=0; i<pf->size; ++i) { | 609 | for (i=0; i<pf->size; ++i) { |
600 | if (pf->offset[i] != l) { | 610 | if (pf->offset[i] != l) { |
@@ -603,6 +613,7 @@ int bdf_read_bitmaps(FILE *fp, struct font* pf) | |||
603 | } | 613 | } |
604 | l += BITMAP_WORDS(pf->width[i]) * pf->height; | 614 | l += BITMAP_WORDS(pf->width[i]) * pf->height; |
605 | } | 615 | } |
616 | #endif | ||
606 | if (!encodetable) { | 617 | if (!encodetable) { |
607 | free(pf->offset); | 618 | free(pf->offset); |
608 | pf->offset = NULL; | 619 | pf->offset = NULL; |