How to print window console font in c++ graphics -
when using outtextxy() in graphic.h, can use limited number of font. how can display basic font above? normal window console raster font.
if console raster not in list enumerated below - may want use installuserfont
, use installed font in settextstyle
.
you have make .chr file contains console raster font -
enum font_names { default_font, triplex_font, small_font, sans_serif_font, gothic_font, script_font, simplex_font, triplex_scr_font, complex_font, european_font, bold_font }; userfont = installuserfont("console_raster.chr"); /* install font file console raster */ settextstyle(userfont, horiz_dir, 4); /* select user font */ outtextxy(x, y, "hello world!"); /* output text */
those .chr file store stroked fonts - each stem of glyph represented 1 line down center of stem, , line later drawn width. have make available console raster in .chr format.
btw, has been 20 years since looked @ these bgi functions!
though hope have considered modern graphics libraries.
Comments
Post a Comment