Post Reply 
Custom Text Formatting (Previously: Getting long results in a program)
04-02-2024, 06:09 PM
Post: #34
RE: Getting long results in Program
(04-01-2024 09:08 PM)Tyann Wrote:  I've replaced G9 with ICON in my programme and it works quite well, but I still have a few changes to make.
All this has given me something to think about, and while I've decided on a programme with 2 instructions, DEFTEXT to define the parameters and TEXT_P to display, I'm wondering whether it wouldn't be better to create a single function based on the TEXTOUT_P syntax, with the option of defining attributes such as italics, bold, underlined, framed or strikethrough.
TEXT_P(s,[g],x,y[,p,c,a,l,f);
with s=string to display
g=screen (default G0)
x and y= display coordinates
p=police (default 0)
c=colour (default 0=black)
l=width limit (default is all text)
f=background colour (default is transparent)
This could offer the community some new features and to ensure that this project is written rigorously and efficiently, I suggest that we do it together, as your programming skills are superior to mine.
What do you say?

Sure, I can help. Although from what you're writing, it seems like you've already tackled the hardest part. This reorganization to consolidate everything into one function probably isn't a big challenge.
Due to the fact that PPL does not support default parameter values for function parameters, this needs to be implemented through several functions with the same name, which take a different number of parameters but internally refer to one common function with predetermined values for all parameters.

I also wanted to show you the differences between various bold modes:
   

The numbered lines are as follows:
1. regular text,
2. bold by displaying 3-times in the same place,
3. bold by displaying 2-times with a 1-pixel horizontal shift,
4. bold by combining points 2 and 3.

Notice that between points 2 and 3, the difference for large fonts is not significant (the solution with a horizontal shift results in slightly thicker letters), but when you look at very small fonts, you can see that option 2 provides much sharper letters (more readable) than option 3.

btw, Super-bold looks pretty cool; consider adding it as one of the formatting options as well.
I'll leave it up to your decision.

Piotr Kowalewski
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Getting long results in Program - komame - 04-02-2024 06:09 PM
RE: Custom Text Formatting - Tyann - 04-15-2024, 06:55 PM
RE: Custom Text Formatting - komame - 04-15-2024, 07:42 PM
RE: Custom Text Formatting - Tyann - 04-16-2024, 04:38 AM
RE: Custom Text Formatting - komame - 04-16-2024, 06:02 AM



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