Skip to content

This is a repository for the support of Korean NanumGothicCoding fonts for https://github.com/olikraus/u8g2

Notifications You must be signed in to change notification settings

xyz37/U8G2_Korean_Font

Repository files navigation

U8G2 library Korean Font

This is a repository for the support of Korean NanumGothicCoding fonts for https://github.com/olikraus/u8g2

Arduino Due with SSD1306 OLED Graphic LCD tested.

Hangul test with Arduino Due Hangul characters begin. Hangul characters end.

References

  1. Convert TTF font to BDF with otf2bdf.exe in "1. OTF2BDF"

    Or change "1. OTF2BDF\Convet.cmd" contents.

    "1. OTF2BDF\Convet.cmd" makes "1. OTF2BDF_Fonts<font name.ttf>" to "1. OTF2BDF_Output*.bdf"

    It make 3 size(16pt, 24pt, 36pt) of fonts

  2. Convert BDF to U8G2 library header with bdfconv.exe and korea.map in "2. BDFConv"

    Or "2. BDFConv\Convert.cmd" contents.

    "2. BDFConv\Convert.cmd" makes "1. OTF2BDF_Output*.bdf" to "2. BDFConv_Output*.c"

  3. "2. BDFConv_Output*.c" copy your skech folder and rename extension .c to .h

  4. Define include

    #include "u8g2_font_unifont_t_korean_NanumGothicCoding_16.h"
  1. Here is a sample skech code.
void setup(void) 
{
  u8g2.begin();
  u8g2.enableUTF8Print();
}

void loop(void) 
{
  u8g2.setFont(u8g2_font_unifont_t_korean_NanumGothicCoding_16);
  u8g2.setFontDirection(0);
  u8g2.clearBuffer();
  u8g2.setCursor(0, 16);
  u8g2.print("Hello!");
  u8g2.setCursor(0,40);
  u8g2.print("안녕 H ☞ ☯.");	
  u8g2.sendBuffer();
  
  delay(1000);
}

Notices

  • korean.map was all of character in NanumGothicCoding font even English characters.
    • You possible font glyph can be checked with the BDF Viewer.
  • The font size is so large that you can not use various sizes in Arduino.
    • This should be tested later.

About

This is a repository for the support of Korean NanumGothicCoding fonts for https://github.com/olikraus/u8g2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages