Hi all, they are new user, excuse me for my English
I'm working with display nokia and pic 18f452 and the code of Jaime Fernández-Beloved Belmonte of :
http://www.hobbypic.com/index.php?optio ... &Itemid=36,
with the compiler of the CCS.
It works perfectly but I have found some problem of imperfection in the font:
Send screen:
as you see I have plot two font various and the space between the two font too much seems to be wide unless not letter “m†that the space is too much short
How resolve it?
Thanks ,
Michele
The code:
//-----------------------------------------------M A I N ---------------------------
gclcd_font(0);
gclcd_color(BLUE);
gclcd_gotoxy(5,20);
printf(gclcd_putc,"lmnopqrstvuz\n\n");
// gclcd_gotoxy(5,30);
printf(gclcd_putc,"This is a \n test");
gclcd_font(1);
gclcd_color(RED);
gclcd_gotoxy(20,80);
printf(gclcd_putc,"Mnopqrs");
while (true); // Variamos el contraste
//-------------------------------- F U N C T I O N --------------------------
int gclcd_putc(int16 c)
{
unsigned int16 index;
unsigned int8 i, j, w, data, skipped=1;
unsigned int8 startY;
startY=yCoord;
gclcd_cmd(MEM_CONTROL);
gclcd_data(0b01101000);
if(c == '\n') gclcd_newline();
if(c == '\f') gclcd_cls();
if(c < 32) return 0;
c -= 32;
index = c*(font.width)*(font.height/8)+2;//+font.width;
for(w=0; w<font.width; w++)
{
for(i=0; i<font.height/8; i++)
{
if (font_select == 0){
data = Arial9[index++]; // tipo de letra usado
}else if(font_select == 1){
data = Times_New_Roma8[index++]; // tipo de letra usado
}else{
data = Arial9[index++]; // tipo de letra usado
}
for(j=0; j<8; j++)
{
if(data & 0x01)
{
if(skipped)
{
gclcd_gotoxy(xCoord, yCoord);
gclcd_cmd(MEMWRITE);
skipped=0;
}
#ifdef HIGH_COLOR
gclcd_data(color >>

;
gclcd_data(color);
#else
gclcd_data(color);
#endif
yCoord++;
}
else
{
skipped=1;
gclcd_gotoxy(xCoord, ++yCoord);
}
data >>= 1;
}
}
gclcd_gotoxy(++xCoord, startY);
}
gclcd_cmd(MEM_CONTROL);
gclcd_data(0b01001000);
return 0;
}
void gclcd_font(int8 a)
{ if (a == 0) {
font.width = Arial9[0];
font.height = Arial9[1];
font_select = 0;
}else{
font.width = Times_New_Roma8[0];
font.height = Times_New_Roma8[1];
font_select = 1;
}
}