08-03-2024, 01:42 PM
All that information tends to be stored in the font itself. Baseline, height, padding, line spacing, ect, ect.
You can keep your execution times down, by pre-processing those calculations. Make an array of 0 to 255, slide each character through it, and calculate once what the blank pixels are going to be for each character and store it. Then instead of the row - fh&, it'd be row - char_height(ascii_value) for placement.
You can keep your execution times down, by pre-processing those calculations. Make an array of 0 to 255, slide each character through it, and calculate once what the blank pixels are going to be for each character and store it. Then instead of the row - fh&, it'd be row - char_height(ascii_value) for placement.