1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

LovyanGFXAdvent Calendar 2022

Day 16

LovyanGFXで画面描画(6):内蔵英数系フォント

Last updated at Posted at 2022-12-19

(2022/12/21更新:Qiitaの画像表示横幅にあわせて一般ブラウザで画像が dot by dot で表示されるようにしました)

LovyanGFX の src/lgfx/v1/lgfx_fonts.hpp 中に定義されているうちの、以下の分のフォントシェイプを表示しました。
(2022/12/12 の develop branch 18a5440 での記述です)

    extern const lgfx::GLCDfont Font0;
    extern const lgfx::BMPfont  Font2;
    extern const lgfx::RLEfont  Font4;
    extern const lgfx::RLEfont  Font6;
    extern const lgfx::RLEfont  Font7;
    extern const lgfx::RLEfont  Font8;
    extern const lgfx::GLCDfont Font8x8C64;
    extern const lgfx::FixedBMPfont AsciiFont8x16;
    extern const lgfx::FixedBMPfont AsciiFont24x48;

    extern const lgfx::GFXfont TomThumb                 ;
    extern const lgfx::GFXfont FreeMono9pt7b            ;
    extern const lgfx::GFXfont FreeMono12pt7b           ;
    extern const lgfx::GFXfont FreeMono18pt7b           ;
    extern const lgfx::GFXfont FreeMono24pt7b           ;
    extern const lgfx::GFXfont FreeMonoBold9pt7b        ;
    extern const lgfx::GFXfont FreeMonoBold12pt7b       ;
    extern const lgfx::GFXfont FreeMonoBold18pt7b       ;
    extern const lgfx::GFXfont FreeMonoBold24pt7b       ;
    extern const lgfx::GFXfont FreeMonoOblique9pt7b     ;
    extern const lgfx::GFXfont FreeMonoOblique12pt7b    ;
    extern const lgfx::GFXfont FreeMonoOblique18pt7b    ;
    extern const lgfx::GFXfont FreeMonoOblique24pt7b    ;
    extern const lgfx::GFXfont FreeMonoBoldOblique9pt7b ;
    extern const lgfx::GFXfont FreeMonoBoldOblique12pt7b;
    extern const lgfx::GFXfont FreeMonoBoldOblique18pt7b;
    extern const lgfx::GFXfont FreeMonoBoldOblique24pt7b;
    extern const lgfx::GFXfont FreeSans9pt7b            ;
    extern const lgfx::GFXfont FreeSans12pt7b           ;
    extern const lgfx::GFXfont FreeSans18pt7b           ;
    extern const lgfx::GFXfont FreeSans24pt7b           ;
    extern const lgfx::GFXfont FreeSansBold9pt7b        ;
    extern const lgfx::GFXfont FreeSansBold12pt7b       ;
    extern const lgfx::GFXfont FreeSansBold18pt7b       ;
    extern const lgfx::GFXfont FreeSansBold24pt7b       ;
    extern const lgfx::GFXfont FreeSansOblique9pt7b     ;
    extern const lgfx::GFXfont FreeSansOblique12pt7b    ;
    extern const lgfx::GFXfont FreeSansOblique18pt7b    ;
    extern const lgfx::GFXfont FreeSansOblique24pt7b    ;
    extern const lgfx::GFXfont FreeSansBoldOblique9pt7b ;
    extern const lgfx::GFXfont FreeSansBoldOblique12pt7b;
    extern const lgfx::GFXfont FreeSansBoldOblique18pt7b;
    extern const lgfx::GFXfont FreeSansBoldOblique24pt7b;
    extern const lgfx::GFXfont FreeSerif9pt7b           ;
    extern const lgfx::GFXfont FreeSerif12pt7b          ;
    extern const lgfx::GFXfont FreeSerif18pt7b          ;
    extern const lgfx::GFXfont FreeSerif24pt7b          ;
    extern const lgfx::GFXfont FreeSerifItalic9pt7b     ;
    extern const lgfx::GFXfont FreeSerifItalic12pt7b    ;
    extern const lgfx::GFXfont FreeSerifItalic18pt7b    ;
    extern const lgfx::GFXfont FreeSerifItalic24pt7b    ;
    extern const lgfx::GFXfont FreeSerifBold9pt7b       ;
    extern const lgfx::GFXfont FreeSerifBold12pt7b      ;
    extern const lgfx::GFXfont FreeSerifBold18pt7b      ;
    extern const lgfx::GFXfont FreeSerifBold24pt7b      ;
    extern const lgfx::GFXfont FreeSerifBoldItalic9pt7b ;
    extern const lgfx::GFXfont FreeSerifBoldItalic12pt7b;
    extern const lgfx::GFXfont FreeSerifBoldItalic18pt7b;
    extern const lgfx::GFXfont FreeSerifBoldItalic24pt7b;

    extern const lgfx::GFXfont Orbitron_Light_24;
    extern const lgfx::GFXfont Orbitron_Light_32;
    extern const lgfx::GFXfont Roboto_Thin_24   ;
    extern const lgfx::GFXfont Satisfy_24       ;
    extern const lgfx::GFXfont Yellowtail_32    ;
    extern const lgfx::GFXfont DejaVu9 ;
    extern const lgfx::GFXfont DejaVu12;
    extern const lgfx::GFXfont DejaVu18;
    extern const lgfx::GFXfont DejaVu24;
    extern const lgfx::GFXfont DejaVu40;
    extern const lgfx::GFXfont DejaVu56;
    extern const lgfx::GFXfont DejaVu72;


FontX

image.png

ちっちゃなフォント

image.png

24pixel ぐらいの、サイズバリエーションの無い(あるいは2種類しかない)フォント

image.png

FreeMono / FreeSans / FreeSerif

18pt のものだけ表示。
image.png

image.png

image.png

18pt は例えば src/lgfx/Fonts/GFXFF/FreeMono18pt7b.h であれば以下の yAdvance 値 35 というのが縦サイズになります。

const GFXfont FreeMono18pt7b PROGMEM = {
  (uint8_t  *)FreeMono18pt7bBitmaps,
  (GFXglyph *)FreeMono18pt7bGlyphs,
  0x20, 0x7E, 35 };

DejaVu

image.png

使用したスケッチ

以下のようなスケッチで表示しました。

#include "pc.hpp"
#include <LovyanGFX.hpp>
#include <LGFX_AUTODETECT.hpp>


LGFX display ( 750,1200,1 );

void setup() {
  display.init();
  display.setSwapBytes(true); 
  display.setTextSize(1);
}

void loop(){

// FONTX
  display.clear();
  display.setCursor(0, 0);

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\nFont0 :(8px ASCII monospaced font)\n");
  display.setFont(&fonts::Font0);
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\nFont2 :(16px ASCII proportional font)\n");
  display.setFont(&fonts::Font2);
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKlcd.color888(255, 0, 0)LMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\nDejaVu18 :(24px ASCII proportional font)\n");
  display.setFont(&fonts::Font4);
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\nFont6 :(36px shape / 48px size clock character monospaced font)\n");
  display.setFont(&fonts::Font6);
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" 1234567890apm.:-");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\nFont7 :(48px 7 segment shape clock character monospaced font)\n");
  display.setFont(&fonts::Font7);
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" 01234567890.:-");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\nFont8 :(75px clock character monospaced font)\n");
  display.setFont(&fonts::Font8);
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" 01234567890.:-");

  delay(5000);
  // SMALL FONT
  display.clear();
  display.setCursor(0, 0);


  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\nFont0 :(8px ASCII)\n");
  display.setFont(&fonts::Font0);
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\nFont8x8C64 :(C64 font 8x8px ASCII)\n");
  display.setFont(&fonts::Font8x8C64);
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\nAsciiFont8x16 :(8x16px ASCII monospaced font)\n");
  display.setFont(&fonts::AsciiFont8x16);
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKlcd.color888(255, 0, 0)LMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\nTomThumb :(3x5px ASCII and more monospaced font)\n");
  display.setFont(&fonts::TomThumb );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");


  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\n DejaVu9  :(9px, and 12,18,24,40,56,72px ASCII proportional font)\n");
  display.setFont(&fonts:: DejaVu9  );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
 
  delay(5000);
  // only 24pixel or 32pixel size font
  display.clear();
  display.setCursor(0, 0);

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\nAsciiFont24x48 :(24x48px ASCII monospaced font)\n");
  display.setFont(&fonts::AsciiFont24x48);
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\nOrbitron_Light_24 :(24px ASCII proportional font)\n");
  display.setFont(&fonts::Orbitron_Light_24  );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
 
  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\nOrbitron_Light_32 :(32px ASCII proportional font)\n");
  display.setFont(&fonts::Orbitron_Light_32  );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
 
  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\nRoboto_Thin_24 :(24px ASCII proportional font)\n");
  display.setFont(&fonts::Roboto_Thin_24 );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
 
  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\n Satisfy_24  :(24px ASCII proportional font )\n");
  display.setFont(&fonts:: Satisfy_24  );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
 
  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\n Yellowtail_32  :(32px ASCII proportional font)\n");
  display.setFont(&fonts:: Yellowtail_32  );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  delay(5000);
  // FreeMono 
  display.clear();
  display.setCursor(0, 0);

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf(      "\nFreeMono18pt7b :(18pt/%dpx, and 9,12,24pt ASCII monospaced font\n)",
                 (&fonts::FreeMono18pt7b)->yAdvance);
  display.setFont(&fonts::FreeMono18pt7b);
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf(      "\nFreeMonoBold18pt7b :(18pt/%dpx, and 9,12,24pt ASCII monospaced font)\n",
                 (&fonts::FreeMonoBold18pt7b)->yAdvance);
  display.setFont(&fonts::FreeMonoBold18pt7b );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf(      "\nFreeMonoOblique18pt7b  :(18pt/%dpx, and 9,12,24pt ASCII monospaced font)\n",
                 (&fonts::FreeMonoOblique18pt7b)->yAdvance);
  display.setFont(&fonts::FreeMonoOblique18pt7b  );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf(      "\nFreeMonoBoldOblique18pt7b  :(18pt/%dpx, and 9,12,24pt ASCII monospaced font)\n",
                 (&fonts::FreeMonoBoldOblique18pt7b)->yAdvance);
  display.setFont(&fonts::FreeMonoBoldOblique18pt7b );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  delay(5000);
  //  FreeSans 
  display.clear();
  display.setCursor(0, 0);

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf(      "\nFreeSans18pt7b  :(18pt/%dpx, and 9,12,24pt ASCII proportional font)\n",
                 (&fonts::FreeSans18pt7b)->yAdvance);
  display.setFont(&fonts::FreeSans18pt7b );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf(      "\nFreeSansBold18pt7b  :(18pt/%dpx, and 9,12,24pt ASCII proportional font)\n",
                 (&fonts::FreeSansBold18pt7b)->yAdvance);
  display.setFont(&fonts::FreeSansBold18pt7b );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
  
  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf(      "\nFreeSansOblique18pt7b :(18pt/%dpx, and 9,12,24pt ASCII proportional font)\n",
                 (&fonts::FreeSansOblique18pt7b)->yAdvance);
  display.setFont(&fonts::FreeSansOblique18pt7b );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf(      "\nFreeSansBoldOblique18pt7b :(18pt/%dpx, and 9,12,24pt ASCII proportional font)\n",
                 (&fonts::FreeSansBoldOblique18pt7b)->yAdvance);
  display.setFont(&fonts::FreeSansBoldOblique18pt7b );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  delay(5000);
  //  FreeSerif 
  display.clear();
  display.setCursor(0, 0);


  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf(      "\nFreeSerif18pt7b  :(18pt/%dpx, and 9,12,24pt ASCII proportional font)\n",
                 (&fonts::FreeSerif18pt7b)->yAdvance);
  display.setFont(&fonts::FreeSerif18pt7b  );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
  
  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf(      "\nFreeSerifItalic18pt7b   :(18pt/%dpx, and 9,12,24pt ASCII proportional font)\n",
                 (&fonts::FreeSerifItalic18pt7b)->yAdvance);
  display.setFont(&fonts::FreeSerifItalic18pt7b   );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
  
  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf(      "\nFreeSerifBold18pt7b   :(18pt/%dpx, and 9,12,24pt ASCII proportional font)\n",
                 (&fonts::FreeSerifBold18pt7b)->yAdvance);
  display.setFont(&fonts::FreeSerifBold18pt7b  );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
 
  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf(      "\nFreeSerifBoldItalic18pt7b  :(18pt/%dpx, and 9,12,24pt ASCII proportional font)\n",
                 (&fonts::FreeSerifBoldItalic18pt7b)->yAdvance);
  display.setFont(&fonts::FreeSerifBoldItalic18pt7b  );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
 
  delay(5000);
  // DejaVu FONT
  display.clear();
  display.setCursor(0, 0);

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\n DejaVu9  :(9px ASCII proportional font)\n");
  display.setFont(&fonts:: DejaVu9  );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\n DejaVu12  :(12px ASCII proportional font)\n");
  display.setFont(&fonts:: DejaVu12  );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\n DejaVu18  :(18px ASCII proportional font)\n");
  display.setFont(&fonts:: DejaVu18  );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\n DejaVu24  :(24px ASCII proportional font)\n");
  display.setFont(&fonts:: DejaVu24  );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");

  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\n DejaVu40  :(40px ASCII proportional font)\n");
  display.setFont(&fonts:: DejaVu40  );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");


  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\n DejaVu56  :(56px ASCII proportional font)\n");
  display.setFont(&fonts:: DejaVu56  );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");


  display.setFont(&fonts::DejaVu18);
  display.setTextColor(TFT_BLACK, TFT_YELLOW);
  display.printf("\n DejaVu72  :(72px ASCII proportional font)\n");
  display.setFont(&fonts:: DejaVu72  );
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.println(" !\"#$%&'()*+,./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
  delay(5000);


}


1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?