FreeBSD Bugzilla – Attachment 168728 Details for
Bug 205707
Improve parsing of BDFs by vtfontcvt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
read character size from BBX entry
vtfontcvt.diff (text/plain), 830 bytes, created by
Ed Maste
on 2016-03-28 14:13:07 UTC
(
hide
)
Description:
read character size from BBX entry
Filename:
MIME Type:
Creator:
Ed Maste
Created:
2016-03-28 14:13:07 UTC
Size:
830 bytes
patch
obsolete
>diff --git a/usr.bin/vtfontcvt/vtfontcvt.c b/usr.bin/vtfontcvt/vtfontcvt.c >index ffe43b5..30f0126 100644 >--- a/usr.bin/vtfontcvt/vtfontcvt.c >+++ b/usr.bin/vtfontcvt/vtfontcvt.c >@@ -251,10 +251,22 @@ parse_bdf(FILE *fp, unsigned int map_idx) > size_t length; > uint8_t bytes[wbytes * height], bytes_r[wbytes * height]; > unsigned int curchar = 0, dwidth = 0, i, line; >+ unsigned int h, w; > > while ((ln = fgetln(fp, &length)) != NULL) { > ln[length - 1] = '\0'; > >+ if (strncmp(ln, "BBX ", 4) == 0 && >+ sscanf(ln + 4, "%u %u", &w, &h) == 2) { >+ if (h > height) >+ errx(1, "BBX height %u too large", h); >+ if (w > width) >+ errx(1, "BBX width %u too large", w); >+ height = h; >+ width = w; >+ printf("h,w set to %u %u\n", h, w); >+ } >+ > if (strncmp(ln, "ENCODING ", 9) == 0) { > curchar = atoi(ln + 9); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 205707
:
164832
|
164833
| 168728 |
180939
|
180943
|
194668
|
199764
|
199765
|
205123