2011/2/20 mattschinkel <[email protected]>
> > I think glcd_text_height and glcd_text_width are closed to what Richard
> > used in his Nokia 3310 with var_nmb variable, storing the number of bytes
> > required to store a char.
>
> You will know the number of bytes the character will take since it can
> be calculated with constants.
>
> For example: (array size) / (number of printable characters) = bytes
> per character
>
> Printable characters = ASCII codes 32 through 126, so there are 95
>
What if you want to add some specific chars ?
And this is not what's used anyway in libs, or am I missing something ?
>
> Although, I just noticed that glcd_5x7_font.jal & glcd_6x8_font.jal
> are missing these printable characters {|}~ maybe they can be added?
>
> > Comment says glcd_text_height and glcd_text_width must be set. But
> > implementation doesn't use them. I understand glcd_text_height = 12 and
> > glcd_text_width = 8 in this procedure. I think this is because you're
> using
> > glcd_8x12_font in your sample. But as a consequence, your code isn't
> > generic.
>
> In glcd_font.jal, I have:
> const FONT_8X12_WIDTH = 8
> const FONT_8X12_HEIGHT = 12
>
> and in my sample, I have:
> glcd_text_width & glcd_text_height
>
> I put these here for future use.
But this is what sometime makes things harder to understand...
> For example, one procedure could do
> all font processing if it knows the font size and other required info.
> A general font procedure could be put into glcd_common.jal, to make
> life easy for new glcd implementation (you would not need to write a
> font procedure for every glcd lib). I prefer to have this so API
> doesn't change in the future. What do you think?
>
sure
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.