Post Reply 
Scalable font for large text display in programs?
12-17-2023, 07:29 AM
Post: #5
RE: Scalable font for large text display in programs?
(12-14-2023 07:17 AM)komame Wrote:  
(12-12-2023 08:13 PM)deSitter Wrote:  I need to display large numeric data with normal sized text. This has to be visible in the dark (telescope work) and red on black color. The built-in font for the input screen is way too small even at the "large" setting.

You can use enlarged text drawing with TEXTOUT_P and BLIT_P. I've written a simple function PRINTLARGE that accomplishes this.

This is an example of usage:
Code:
PRINTLARGE(text,g,x,y,f_col,b_col)
BEGIN
  local width;
  DIMGROB_P(G9,320,30,b_col);
  width:=TEXTOUT_P(text,G9,0,0,7,f_col,320,b_col);
  BLIT_P(G0,x,y,x+width*2,y+58,G9,0,0,width,29);
END;

EXPORT LT_TEST()
BEGIN
  RECT();
  PRINTLARGE("LARGE TEXT 123",G0,0,0,RGB(0,0,255),RGB(255,255,255));
  PRINTLARGE("example",G0,70,70,RGB(255,0,0),RGB(0,0,0));
  WAIT(0);
END;

Best wishes,
Piotr

Excellent thanks!

-drl
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Scalable font for large text display in programs? - deSitter - 12-17-2023 07:29 AM



User(s) browsing this thread: 1 Guest(s)