devxlogo

Displaying Text and Setting the Font

Displaying Text and Setting the Font

Question:
I am working on a project that reads in teletext information from the COM port in 8-bit binary form. Since ASCII does not represent teletext graphical characters, I have written my own font to represent the teletext characters. How can I change the font with which they are displayed to my font? At the moment I can only display the files in ASCII, as when I set the input to teletext it displays the wrong characters. I think it’s reading the input and outputting the corresponding glyphs using some default windows font type. Is there some Win API command that can allow me to choose the font type with which to display the information?

Answer:
Hmmm…. If you’re reading the transmission as a stream, you’re probably evaluating the characters as they come in, or have a buffer of some sort. In any case, you can use a TRichEdit component to display the text, and set the font as necessary.

See also  Does It Make Sense to Splurge on a Laptop?
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist