Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Feb 2025 02:49:38 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: fb4102bc52a6 - stable/13 - vtfontcvt: Improve error message for unsupported DWIDTH
Message-ID:  <202502200249.51K2ncMD045431@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=fb4102bc52a69e6736d69818460c01c253bd8753

commit fb4102bc52a69e6736d69818460c01c253bd8753
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-01-20 20:04:20 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-02-20 02:49:24 +0000

    vtfontcvt: Improve error message for unsupported DWIDTH
    
    vtfontcvt requires that all glyphs are 1x or 2x a common width,
    reporting for example "bitmap with unsupported DWIDTH 27 0 on line xxx"
    if the font is expected to be 32 pixels wide.
    
    Add the expected / permitted values to the error message to make the
    issue more clear - for the same example,
    "bitmap with unsupported DWIDTH 27 0 (not 32 or 64)".
    
    Reviewed by:    ziaee
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 3433daae0d20d55503084c4d17b8a3e685657ad2)
    (cherry picked from commit 036ce9b76e0ac5bb3a611a4b259a39e3158c25d4)
---
 usr.bin/vtfontcvt/vtfontcvt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr.bin/vtfontcvt/vtfontcvt.c b/usr.bin/vtfontcvt/vtfontcvt.c
index d68516dda360..508e298257a4 100644
--- a/usr.bin/vtfontcvt/vtfontcvt.c
+++ b/usr.bin/vtfontcvt/vtfontcvt.c
@@ -451,8 +451,8 @@ parse_bdf(FILE *fp, unsigned int map_idx)
 			if (sscanf(ln + 7, "%d %d", &dwidth, &dwy) != 2)
 				errx(1, "invalid DWIDTH at line %u", linenum);
 			if (dwy != 0 || (dwidth != fbbw && dwidth * 2 != fbbw))
-				errx(1, "bitmap with unsupported DWIDTH %d %d at line %u",
-				    dwidth, dwy, linenum);
+				errx(1, "bitmap with unsupported DWIDTH %d %d (not %d or %d) at line %u",
+				    dwidth, dwy, fbbw, 2 * fbbw, linenum);
 			if (dwidth < fbbw)
 				set_width(dwidth);
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502200249.51K2ncMD045431>