[SOLVED] - X & Y not at 0 - OLED Display Module 1.3" 128x64 I2C

Hi everyone,

Need a little advice about a slightly odd problem,

I noticed in the u8g example I am running that my x and y co-ords are 0,20 in the sketch. but when i check the screen they do not correspond the text is sat at 1,10 if i use a magnifying glass to count pixels. and setting the code to -1,10 corresponds and the code then sits at the official 0,0 position.

the oled is using the SH1106 driver chip according to the seller & deescription, I am using the following code.

U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE); // I2C / TWI 

void draw(void) {
  // graphic commands to redraw the complete screen should be placed here  
  u8g.setFont(u8g_font_unifont);
  u8g.setPrintPos(0, 20); 
 
  u8g.print("Hello World!");
}

void setup(void) {
  // flip screen, if required
  // u8g.setRot180();
}

void loop(void) {
  // picture loop
  u8g.firstPage();  
  do {
    draw();
  } while( u8g.nextPage() );
  
  // rebuild the picture after some delay
  delay(500);
}

but as i say for some reason when I try and set the code to 0,0 the code goes offscreen, setting it to -1,10 gets it right in the upper left corner.

anyone else had this issue and is it me or the screen?

Never mind, I should have RTFM before posting, i've been doing some digging in the u8g manual for another item and answered this question.

The reference point (0,20) for the origin of the text string usually is one pixel below the lower left edge of the first character. The height of the uppercase letters is shown in the font overview bitmap (in this example 18, see here). In some cases the size of the uppercase letters is also part of the font name.