vtfontcvt: improve BDF and hex font parsing
MFC r348661: vtfontcvt: rework height/width setting
Introduce VFNT_MAXDIMENSION to replace bare 128, add set_height, and
consistently use set_height and set_width.
Submitted by: Dmitry Wagin
MFC r348662: vtfontcvt: include width and height in verbose info
Submitted by: Dmitry Wagin
MFC r348668: vtfontcvt: zero memory allocated by xmalloc
Submitted by: Dmitry Wagin
MFC r348692: vtfontcvt: exit on error if the input font has too many glyphs
The kernel has a limit of 131072 glyphs in a font; add the same check to
vtfontcvt so that we won't create a font file that the kernel will not
load.
MFC r348796: vtfontcvt: allow out-of-order glyphs
Reported by: mi
MFC r349049: vtfontcvt: add comments in add_glyph
MFC r349100: vtfontcvt: improve BDF and hex font parsing
Support larger font sizes.
Submitted by: Dmitry Wagin (original version)
MFC r349101: vtfontcvt: initialize bbwbytes to avoid GCC 4.2.1 warning
MFC r349105: vtfontcvt: initialize another variable to quiet GCC warning
I believe this case could be triggered by a broken .bdf font.
MFC r349107: vtfontcvt: improve .bdf verification
Previously we would crash if the BBX y-offset was outside of the font
bounding box.
Reported by: afl fuzzer
MFC r349108: vtfontcvt: improve .bdf validation
Previously if we had a BBX entry that had invalid values (e.g. bounding
box outside of font bounding box) and failed sscanf (e.g., because it
had fewer than four values) we skipped the BBX value validation and then
triggered an assertion failure.
Reported by: afl fuzzer
MFC r349111: vtfontcvt: correct typo in hex parsing update
Submitted by: Dmitry Wagin
MFC r349333: vtfontcvt: improve .bdf validation
Previously if we had a FONTBOUNDINGBOX or DWIDTH entry that had missing
or invalid values and and failed sscanf, we would proceeded with
partially initialized bounding box / device width variables.
Reported by: afl fuzzer (FONTBOUNDINGBOX)
PR: 205707
Sponsored by: The FreeBSD Foundation