Post Reply 
Custom Text Formatting (Previously: Getting long results in a program)
04-13-2024, 10:12 AM
Post: #69
RE: Getting long results in Program
(04-13-2024 09:09 AM)Tyann Wrote:  That's great news for BLIT_P.
For small fonts, do you know if TEXTSIZE returns the correct height, or if we need to modify this in ATEXTSIZE?
Then, if I've understood correctly, we need to decrement 'y' by 'n' pixels before copying it into the buffer and then display the text at 'n' pixels.
then display the text 'n' pixels lower in the buffer, then we copy the buffer back from y=0 to Gx at 'y'-'n' pixels; the accents will be copied into this area and the text from 'y'?
But you need to know which fonts are affected, because it won't work for the others.
Finally, would you suggest that ATEXTOUT should always be called with 10 parameters and default values?

Tyann,

you're overthinking it again Big Grin I've roughly outlined what needs to be done earlier. There's no need to check the font size; the change should be universal and will work the same for all font sizes, but it will improve the situation for small ones without affecting larger ones. There's also no need to change ATEXTSIZE.
To elaborate a bit more, you need to enlarge the buffer by 3 pixels and copy the content of Gx into it, also 3 pixels higher than the given "y". The key is to utilize TEXTOUT_P to insert text into the buffer at position (10,3) rather than (10,0). Accents on letters will naturally appear above (currently, they are being cut off because there is no space in the buffer above). Then, all drawing activities such as frame, underline, or strikethrough should be performed the same way, with the difference that they need to be lowered by 3 pixels. Finally, when calling BLIT_P, you simply execute it for (x, y-3).
That's all Smile It won't change anything for large letters, but it will add accents for small ones. Of course, this may affect the loop that shifts pixels in the buffer for italic, so minor adjustments may be needed.

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-13-2024 10:12 AM
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: 68 Guest(s)