Announcement

Collapse
No announcement yet.

Text is not displayed properly

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Text is not displayed properly

    Click image for larger version

Name:	text problem.png
Views:	76
Size:	407.7 KB
ID:	68309
    Hello,

    I have a 2" 176x220 ST7775 display working with Golgelox. It runs correctly the videos, images, SD, UART, GPIOs... However, I don't achieve to write text in the display.
    The text is painted with line and dots.
    It has the Goldelox-gx2-R27 PMMC

    Why is this happening?
    I have try a lot of changes:

    //txt_Set(FONT_ID, MS_SanSerif8x12);
    txt_FGcolour(YELLOW); // txt_Set(TEXT_COLOUR, YELLOW);
    txt_Opacity(OPAQUE); // txt_Set(TEXT_OPACITY, TRANSPARENT);
    txt_Width(2); // txt_Set(TEXT_WIDTH, 2);
    txt_Height(2); // txt_Set(TEXT_HEIGHT,2);
    txt_Xgap(5);
    txt_Ygap(5);
    //txt_MoveCursor(1,1);
    gfx_MoveTo(1,40);

    Could be the driver? (I have the same driver configuration working with a RPI (no goldelox) and write text properly)


  • #2
    Also I have text this code from an example:

    //Proportional font test, font in data space
    #DATA
    byte MS_SanSerif8x12
    2, // Type 2, Char Width preceeds character; Table of widths also
    96, // Num chars
    32, // Starting Char
    8, // Font_Width
    12, // Font_Height
    4, 4, 6, 8, 7, 8, 7, 3, // Widths of chars 0x32 to 0x39
    4, 4, 5, 7, 4, 4, 4, 6, // etc.
    7, 7, 7, 7, 7, 7, 7, 7,
    7, 7, 4, 4, 7, 7, 7, 7,
    8, 8, 8, 8, 8, 8, 7, 8,
    8, 4, 6, 8, 7, 8, 8, 8,
    8, 8, 8, 8, 8, 8, 8, 8,
    8, 8, 8, 4, 6, 4, 7, 7,
    4, 7, 7, 7, 7, 7, 4, 7,
    7, 3, 3, 7, 3, 9, 7, 7,
    7, 7, 4, 6, 4, 7, 7, 8,
    6, 6, 6, 5, 3, 5, 8, 4,
    4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 32 ' '
    4, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, // 33 '!'
    6, 0x00, 0x00, 0x48, 0x48, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 34 '"'
    8, 0x00, 0x00, 0x24, 0x24, 0x7E, 0x24, 0x24, 0x24, 0x7E, 0x24, 0x24, 0x00, // 35 '#'
    7, 0x00, 0x00, 0x10, 0x38, 0x54, 0x50, 0x30, 0x18, 0x14, 0x54, 0x38, 0x10, // 36 '$'
    8, 0x00, 0x00, 0x30, 0x49, 0x32, 0x04, 0x08, 0x10, 0x26, 0x49, 0x06, 0x00, // 37 '%'
    7, 0x00, 0x00, 0x20, 0x50, 0x50, 0x20, 0x20, 0x54, 0x48, 0x48, 0x34, 0x00, // 38 '&'
    3, 0x00, 0x00, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 39 '''
    4, 0x00, 0x00, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, // 40 '('
    4, 0x00, 0x00, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, // 41 ')'
    5, 0x00, 0x00, 0x00, 0x50, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 42 '*'
    7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x7C, 0x10, 0x10, 0x00, 0x00, // 43 '+'
    4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x40, // 44 ','
    4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, // 45 '-'
    4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, // 46 '.'
    6, 0x00, 0x00, 0x08, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x00, // 47 '/'
    7, 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x38, 0x00, // 48 '0'
    7, 0x00, 0x00, 0x10, 0x70, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, // 49 '1'
    7, 0x00, 0x00, 0x38, 0x44, 0x04, 0x04, 0x08, 0x10, 0x20, 0x40, 0x7C, 0x00, // 50 '2'
    7, 0x00, 0x00, 0x38, 0x44, 0x04, 0x04, 0x18, 0x04, 0x04, 0x44, 0x38, 0x00, // 51 '3'
    7, 0x00, 0x00, 0x08, 0x18, 0x18, 0x28, 0x28, 0x48, 0x7C, 0x08, 0x08, 0x00, // 52 '4'
    7, 0x00, 0x00, 0x7C, 0x40, 0x40, 0x78, 0x44, 0x04, 0x04, 0x44, 0x38, 0x00, // 53 '5'
    7, 0x00, 0x00, 0x38, 0x44, 0x40, 0x40, 0x78, 0x44, 0x44, 0x44, 0x38, 0x00, // 54 '6'
    7, 0x00, 0x00, 0x7C, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x20, 0x00, // 55 '7'
    7, 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, // 56 '8'
    7, 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x3C, 0x04, 0x04, 0x44, 0x38, 0x00, // 57 '9'
    4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, // 58 ':'
    4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x20, 0x40, // 59 ';'
    7, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x20, 0x40, 0x20, 0x10, 0x08, 0x00, // 60 '<'
    7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x7C, 0x00, 0x00, 0x00, // 61 '='
    7, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x10, 0x08, 0x10, 0x20, 0x40, 0x00, // 62 '>'
    7, 0x00, 0x00, 0x38, 0x44, 0x04, 0x04, 0x08, 0x10, 0x10, 0x00, 0x10, 0x00, // 63 '?'
    8, 0x00, 0x00, 0x0C, 0x32, 0x21, 0x4D, 0x53, 0x52, 0x4C, 0x20, 0x31, 0x0E, // 64 '@'
    8, 0x00, 0x00, 0x10, 0x10, 0x28, 0x28, 0x44, 0x44, 0x7C, 0x82, 0x82, 0x00, // 65 'A'
    8, 0x00, 0x00, 0x78, 0x44, 0x44, 0x44, 0x78, 0x44, 0x44, 0x44, 0x78, 0x00, // 66 'B'
    8, 0x00, 0x00, 0x3C, 0x42, 0x40, 0x40, 0x40, 0x40, 0x40, 0x42, 0x3C, 0x00, // 67 'C'
    8, 0x00, 0x00, 0x78, 0x44, 0x42, 0x42, 0x42, 0x42, 0x42, 0x44, 0x78, 0x00, // 68 'D'
    8, 0x00, 0x00, 0x7C, 0x40, 0x40, 0x40, 0x78, 0x40, 0x40, 0x40, 0x7C, 0x00, // 69 'E'
    7, 0x00, 0x00, 0x7C, 0x40, 0x40, 0x40, 0x78, 0x40, 0x40, 0x40, 0x40, 0x00, // 70 'F'
    8, 0x00, 0x00, 0x3C, 0x42, 0x40, 0x40, 0x4E, 0x42, 0x42, 0x46, 0x3A, 0x00, // 71 'G'
    8, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x7E, 0x42, 0x42, 0x42, 0x42, 0x00, // 72 'H'
    4, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, // 73 'I'
    6, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x90, 0x90, 0x60, 0x00, // 74 'J'
    8, 0x00, 0x00, 0x44, 0x48, 0x50, 0x60, 0x60, 0x50, 0x48, 0x44, 0x42, 0x00, // 75 'K'
    7, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x7C, 0x00, // 76 'L'
    8, 0x00, 0x00, 0x41, 0x41, 0x63, 0x63, 0x55, 0x55, 0x49, 0x49, 0x41, 0x00, // 77 'M'
    8, 0x00, 0x00, 0x42, 0x62, 0x62, 0x52, 0x52, 0x4A, 0x46, 0x46, 0x42, 0x00, // 78 'N'
    8, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00, // 79 'O'
    8, 0x00, 0x00, 0x7C, 0x42, 0x42, 0x42, 0x7C, 0x40, 0x40, 0x40, 0x40, 0x00, // 80 'P'
    8, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x42, 0x42, 0x4A, 0x46, 0x3C, 0x02, // 81 'Q'
    8, 0x00, 0x00, 0x7C, 0x42, 0x42, 0x42, 0x7C, 0x42, 0x42, 0x42, 0x42, 0x00, // 82 'R'
    8, 0x00, 0x00, 0x38, 0x44, 0x40, 0x40, 0x38, 0x04, 0x04, 0x44, 0x38, 0x00, // 83 'S'
    8, 0x00, 0x00, 0x7C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, // 84 'T'
    8, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00, // 85 'U'
    8, 0x00, 0x00, 0x41, 0x41, 0x22, 0x22, 0x22, 0x14, 0x14, 0x08, 0x08, 0x00, // 86 'V'
    8, 0x00, 0x00, 0x41, 0x41, 0x41, 0x22, 0x2A, 0x2A, 0x1C, 0x14, 0x14, 0x00, // 87 'W'
    8, 0x00, 0x00, 0x41, 0x41, 0x22, 0x14, 0x08, 0x14, 0x22, 0x41, 0x41, 0x00, // 88 'X'
    8, 0x00, 0x00, 0x41, 0x41, 0x22, 0x14, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, // 89 'Y'
    8, 0x00, 0x00, 0x7F, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x7F, 0x00, // 90 'Z'
    4, 0x00, 0x00, 0x60, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, // 91 '['
    6, 0x00, 0x00, 0x40, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x00, // 92 '\'
    4, 0x00, 0x00, 0x60, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, // 93 ']'
    7, 0x00, 0x10, 0x28, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 94 '^'
    7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 95 '_'
    4, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 96 '`'
    7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x04, 0x3C, 0x44, 0x44, 0x3C, 0x00, // 97 'a'
    7, 0x00, 0x00, 0x40, 0x40, 0x40, 0x78, 0x44, 0x44, 0x44, 0x44, 0x78, 0x00, // 98 'b'
    7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x40, 0x40, 0x44, 0x38, 0x00, // 99 'c'
    7, 0x00, 0x00, 0x04, 0x04, 0x04, 0x3C, 0x44, 0x44, 0x44, 0x44, 0x3C, 0x00, // 100 'd'
    7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x7C, 0x40, 0x44, 0x38, 0x00, // 101 'e'
    4, 0x00, 0x00, 0x20, 0x40, 0x40, 0x60, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, // 102 'f'
    7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x44, 0x44, 0x44, 0x44, 0x3C, 0x04, // 103 'g'
    7, 0x00, 0x00, 0x40, 0x40, 0x40, 0x58, 0x64, 0x44, 0x44, 0x44, 0x44, 0x00, // 104 'h'
    3, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, // 105 'i'
    3, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, // 106 'j'
    7, 0x00, 0x00, 0x40, 0x40, 0x40, 0x48, 0x50, 0x60, 0x50, 0x48, 0x44, 0x00, // 107 'k'
    3, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, // 108 'l'
    9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x49, 0x49, 0x49, 0x49, 0x49, 0x00, // 109 'm'
    7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x64, 0x44, 0x44, 0x44, 0x44, 0x00, // 110 'n'
    7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x44, 0x38, 0x00, // 111 'o'
    7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x44, 0x44, 0x44, 0x44, 0x78, 0x40, // 112 'p'
    7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x44, 0x44, 0x44, 0x44, 0x3C, 0x04, // 113 'q'
    4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, // 114 'r'
    6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0x20, 0x10, 0x48, 0x30, 0x00, // 115 's'
    4, 0x00, 0x00, 0x00, 0x40, 0x40, 0x60, 0x40, 0x40, 0x40, 0x40, 0x20, 0x00, // 116 't'
    7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x4C, 0x34, 0x00, // 117 'u'
    7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x28, 0x28, 0x10, 0x10, 0x00, // 118 'v'
    8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x49, 0x55, 0x55, 0x22, 0x22, 0x00, // 119 'w'
    6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x48, 0x30, 0x30, 0x48, 0x48, 0x00, // 120 'x'
    6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x48, 0x48, 0x48, 0x30, 0x20, 0x20, // 121 'y'
    6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x08, 0x10, 0x20, 0x40, 0x78, 0x00, // 122 'z'
    5, 0x00, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, // 123 '{'
    3, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, // 124 '|'
    5, 0x00, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, // 125 '}'
    8, 0x00, 0x00, 0x00, 0x32, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 126 '~'
    4, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60 // 127 ''
    #END

    Comment


    • #3
      Hello!

      Have you seen this post? help please

      Comment

      Working...
      X