U8g2: Custom Font (Malayalam Language)

Created on 4 Oct 2019  ยท  18Comments  ยท  Source: olikraus/u8g2

Hi sir
I am interested to use the Malayalam language with my 128X32 pixel SSD1306 display. How to make a font for printing Malayalam text on my OLED?

Most helpful comment

You need (a) a suitable font file, perferable in .bdf format and (b) you need to figure out the unicode range for this language. Assuming, that the range is from 0xd00 to 0xd7f, it might look like this (derived from GNU unifont):
malayalam

The code for this font is this:

/*
  Fontname: -gnu-Unifont-Medium-R-Normal-Sans-16-160-75-75-c-80-iso10646-1
  Copyright: Copyright (C) 1998-2019 Roman Czyborra, Paul Hardy,  Qianqian Fang, Andrew Miller, Johnnie Weaver, David Corbett, et al.  License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>  with the GNU Font Embedding Exception.
  Glyphs: 225/57086
  BBX Build Mode: 0
*/
const uint8_t u8g2_font_malayalam[4378] U8G2_FONT_SECTION("u8g2_font_malayalam") = 
  "\341\0\3\2\5\5\5\5\6\20\20\0\376\12\376\13\377\1\235\3\71\5\7 \6\0@\217\2!\10A"
  "Q\210\342\220\10\42\10\205H\214\42s\13#\17FE\210\252\247aH\242\226a\210z\2$\22GE"
  "\210.\34\224(\222\302y\214\244\312 f\0%\24GE\210F\223\222R\22)i\234&R\22%%"
  "M\1&\22GE\210j+e\225PL\42-\21\223L\232\2'\7\201P\214b\10(\14\203\315\207"
  "*\211\222\250\267(\13)\15\203\311\207\42\213\262\250\227(\211\0*\15\347\304\210\256Ti\333\222\246Z"
  "\6+\14\347\304\210.\256\15C\26\327\0,\11\202L\207BI\24\0-\7$H\212b\10.\7B"
  "L\210b\10/\14FE\210\266X\15\323\260\232\2\60\22FE\210J\213\222P\233\22%\332\304$\312"
  "$\0\61\14EI\210*\223\222\260O\203\0\62\17FE\210fHB\61\315\264\260\232\16\3\63\20F"
  "E\210fHB\61\215\346T\24\223!\1\64\20FE\210\62\324\222\250\222%Y\62\214i\5\65\17F"
  "E\210\342\220V\7\71M\305dH\0\66\17FE\210j\12\323tPB\307dH\0\67\14FE\210"
  "\342ZL\213i\23\0\70\20FE\210fHBc\62$\241c\62$\0\71\16FE\210fHBc"
  "\62\250\215\321\4:\11\342\314\210b\210\207\0;\12\42\315\207b\210\225D\1<\11%I\210\62\353\332"
  "\1=\11\246D\211\342N\34\6>\11%E\210\42\355\326\21\77\17FE\210fHB\61\15\253\71\230"
  "F\0@\22FE\210j\312\244DI\226H\211\224HZ\342!A\16FE\210J\213ZBq\30D"
  "\307\0B\16FE\210bPB\343\260\204\216\303\2C\16FE\210fHBkG\61\31\22\0D\16"
  "FE\210b\210\262$\364[\62D\0E\15FE\210\342\220V\7%m\35\6F\14FE\210\342\220"
  "V\7%\355\12G\16FE\210fHBki\10m\312\22H\14FE\210\42t\34\6\321c\0I"
  "\13EI\210b\220\302~\32\4J\16GE\210j\20\343\236\262(\313\66\0K\21FE\210\42\324\222"
  "\250\222\211b\222E\265$\14L\12FE\210\42\355\257\303\0M\15FE\210\42\24\247!Z<:\6"
  "N\20FE\210\42\334\66%R\42)\221\22\355\30O\14FE\210fHB\177L\206\4P\15FE"
  "\210bPB\343\260\244]\1Q\27g\305\207f\210\302$L\302$L\302$L\22%\221\244!\7\4"
  "R\20FE\210bPB\343\260D\265$KB\61S\16FE\210fHB\263\243\230\14\11\0T\12"
  "GE\210\342\220\305\375\15U\13FE\210\42\364\217\311\220\0V\21GE\210\42\265&Y\224EY%"
  "L\322\70\3W\15FE\210\42\364\342\62\15\321(\6X\17FE\210\42\24\223\250M\324\242\226P\14"
  "Y\16GE\210\42U\223,\312*i\334\15Z\13FE\210\342Z\354\65\35\6[\12\203\321\207b\210"
  "\372\247\1\134\14FE\210\42\215\253q\32W\3]\12\203\305\207b\352\237\206\0^\11f\304\214J\213"
  "\222\60_\7'\304\207\342\20`\7cH\215\42+a\16\6E\210fH\302\64\31F\233\262\4b\16"
  "fE\210\42mY\64\321qS\26\0c\15\6E\210fHB\265c\62$\0d\14fE\210\266e"
  "\321Fo\312\22e\17\6E\210fHBq\30\324b\62$\0f\14eE\210N\12K\203\24\366\4"
  "g\23fE\207\66Y\264$K\262hK\207$\24\223!\1h\14fE\210\42mY\64\321\307\0i"
  "\14eI\210*\314\21\261O\203\0j\14\245E\207\262\216\210}\224\42\11k\21fE\210\42mK\242"
  "J&&YTK\302\0l\12eI\210F\354\237\6\1m\22\7E\210bQ\242H\212\244H\212\244"
  "H\212\244\2n\13\6E\210\42Y\64\321\307\0o\14\6E\210fHB\37\223!\1p\16FE\207"
  "\42Y\64\321qS\226\64\5q\14FE\207f\321Fo\312\222\26r\13\6E\210\42Y\64Q\355\12"
  "s\15\6E\210fHB\331\61\31\22\0t\13EE\210*,\15R\330Uu\12\6E\210\42\364\233"
  "\262\4v\14\6E\210\42\64&Qo\242\4w\21\7E\210\42\225\42)\222\42)\222\42\251b\1x"
  "\17\6E\210\42\24\223(\23\265(\11\305\0y\16FE\207\42\364\230D\226\264\62$\0z\12\6E"
  "\210\342\32\366:\14{\16\244I\207J\311\302,*\326\242,\24|\10\301Q\207\342\203\0}\17\244I"
  "\207B\314\242,,\325\302,\221\0~\12gD\214F\223\42M\1\177#\20B\7#\351w\222\316I"
  "'\35\222lJ\302\64J\206$\233\222\60\235\206d\330\71\351\234tR\322\17\200$\20B\7#\351w"
  "\222\316I'm\322\62%Q\22E\207$\32\302(\211\212Q\262\350\234tN:)\351\7\0\0\0\4"
  "\377\377\15\0\13\204X\15G\211\244D\1\15\1\15\210\320\14O\213\244$\314\206\10\15\2\13\204p\12"
  "G\211\244D\1\15\3\15#\365\10\247\242T\223D\251\0\15\4&\316\305\7\343\7i\33\24\227!q"
  "\31\22\227A\332\206\377C\264(C\342\62$\306!Q\6e\220\206e\370\20\15\5\36\16A\11o\310"
  "\304J\24\15R\250dI\250\14Q\64$YRR\262\244\224M\221\2\15\6*PA\10o\310\244,"
  "L\42%\31\244LQ\262$J\22e\210\222(Q\262\244\224(YRJ\262)\222rJ\216\15\12\0"
  "\15\7\37\213E\7K\323\242$J\302P\14\207(\224\222PJ\302D\12s,\31.\71\70\134\0\15"
  "\10\42\215A\7g\311\222Z\322\242%-Z\322\62%\251\322\24)mR\230\243\71\60\350@\16\17:"
  "\0\15\11\22\7M\11g\210*\245\212\26'\203\22\17C\0\15\12\25\13I\11gK\372\242\364)i"
  "L\223-\322\1e\220\1\15\13\26\11M\11GS\242$\32\262!\7\222\64\33\264\64\33$\0\15\14"
  "\33\13I\11K\323\242$J\302(\21\223h\210\222HJJRRJ\244H\1\15\15$\316\305\7\343"
  "\7i\33\24\227!q\31\22\227A\332\206\377C\264\15\212\313\220\270\14\211\313 m\303\7\1\15\16!"
  "MA\11\37\31r$L\266(\321\242\212\26U*\303\240\344@\224\344@\224\344@\224\344\210\6\15\17"
  " MA\11\37\30r$\214\246$\323\222\232\226\324\222d\230r \311\342$\213\223,\7\42\5\15\20"
  "#PA\11\37\335\321,\231\246$Q\22-\251(\211\226tJ\222a\11\343\244\16&u\60\251\243\31"
  "\0\15\21'\316\305\7\343\7i\33\24\227!q\31\22\227A\332\206\377\203\62(\303\64D\303\220\14\312"
  "\60$\203\62l\207\17\1\15\22\25\12I\11oH\303,NrDG\6\61\311\302dS\0\15\23\27"
  "\14I\11k\224\262(\22S\65T\303-U\262$J\42M\1\15\24\32\15E\11kL\242,J\22"
  "\61J\22\65\251\250\351VR\262L\212t\0\15\25\27\13I\11s\7\262\70\13\207K\224ER\26I"
  "Y\224(S\2\15\26\31\15E\11k\210\223\60\225C\35\310\206\64\223\302L\312\302D\33\206\0\15\27"
  "\21\315D\11K\334\322,IS\265\222\245\331\11\15\30\33\16E\11\37\231r K\222\255\242EY\242"
  "EYR\31.\71\220\346\300!\15\31\31\14E\11K\333\242$K\302TL\207(Z\242$\225\222\64"
  "\221\242\5\15\32\22\13I\11\37\313\261\34\313\324\250\230\206\325\341\1\15\33\31\14I\11\37\321\241:\20"
  "FR\230DI&&Q\222U\222\341\224\0\15\34\30\14E\11gP\246\64K\266JT\213\344l\70"
  "$\261\224\14\223\2\15\35\36\17A\11k\10\243\312\220eJ\224D\231\22%Q&I\65\71\312\222\64"
  "\252C\212\4\15\36\37\15E\11KS\243$Z\302(I\304$J\206(\211\22))%RRJ\22"
  ")\322\0\15\37\20\347P\11gP\342\34\30t N\6\5\15 \24\11M\11k\320\322$\7t@"
  "\7t I\263A\2\15!\27\14\311\10K\213\272iQ\246E\231\26eIT\13\243\262\42\1\15\42"
  "\31\13\311\10G\213\222\250\222H\225D\252$R\245\26EZTU$\0\15#\32\14E\11\313\42E"
  "R$F\221\30Eb\24\15QIJ\242\212TI\0\15$\32\14I\11K\32\262HL\262$\224\262"
  "L\12#)\214\264(K\62-\1\15%\24\14E\11#\36\222\64TC\65TC\65T\303\341!\15"
  "&\21\10M\11k\220RY[bS\226D\13\0\15'\23\13I\11\253\255%\14\305P\14\305JV"
  "[&\0\15(\23\13I\11k\331Z\302P\14\305P\254dM%\0\15)\30\13I\11K\332\42-"
  "\11\303!\12\245$\224\222PJ\262H*\1\15*\24\14E\11\37\314\301\34\314\301d\7\264X\213\223"
  "d\70\15+\30\14E\11\37\331\221,\7\262\34\310\222-\323\242L\213\262$\31\16\15,\32\14E\11"
  "\313\226DR$F\221\30Eb\24\15QIJ\242\212\24\15\1\15-\23\10M\11k\220RY[\242"
  "\60[\342$\31\22\0\15.\24\12M\11k\330\242,\11\63\61\323B)\35\342\341 \15/\32\14I"
  "\11'\323\222\246L\12#)\214\244,\323\222\60\211\304L\32\42\0\15\60\25\13I\11k\210C-M"
  "\242\60K\302P\14\325\250*\1\15\61\24\11M\11k\320\322$\7t@\7t@\7\222\64\1\15\62"
  "\24\13I\11KN\242T\14\305p\30B\35\322\241\341\1\15\63\27JI\10k\330\342$\7\222M*"
  "Fj\16e\303\226c\303 \15\64\22\11M\11#\134\262L\253D\265A\16\263t\5\15\65\26\14E"
  "\11kH\223\60\224\63\71\223\63\71S\303$\33\206\0\15\66\27\14I\11+\334\302,\11S\61\25\263"
  "!\214*Q\26E\252\2\15\67\27\14E\11W\23\243\244\30I\351\226l\231\26eZ\224%\311p\15"
  "\70\25\15A\11K\21\243F\255\246\325\264\232V\323Jm\23\0\15\71\31\15A\11\37\331\241,\7\322"
  "\70M\246TKR-\312\242d\220\42\0\15:\27JM\10#\207r(\207r(\207r(\207\206C"
  "\230C)\0\15;\10\241\340\14c\20\15<\13\204l\15G\211\244D\1\15=\20\247Y\10\267\22&"
  "Y\334\267$L\322\24\15>\15\4q\11G\211\262\66)Q\0\15\77\13dq\11G\211\244\254\77\15"
  "@\13\204q\11G\211\222\255\177\15A\16\4\361\10G\211\262\250\26%Q\4\15B\17E\355\7K*"
  "f\305,i\321\222\5\15C\17\206i\7\67\254\226\253\225aL\206\4\15D\33\211]\7\37\311\201\34"
  "\310\221\34\311\241\34\312\221\34I\224E\252$\303\220\0\15E%\316\305\7\343\7i\33\24\227!q\31"
  "\22\227A\332\206\377\213qH,\303\20\212\303\220\14\312\60$\342\360!\15F\17%\301\10g\311l\223"
  "\222(MY\2\15G\17\4A\11G\211\206$\313\226(Q\0\15H\16\6A\11CQ\22\77\65)"
  ".\0\15I%\316\305\7\343\7i\33\24\227!q\31\22\227A\332\206\377\213\62\15\212\313\20n\303\220"
  "\14\312\60$\323\360A\15J\36\60\301\10g\207\224,\7\42-\307\264\34\233rL\251cJ\35\210\222"
  "(G\304\34\5\15K\32\20A\11G\307\224(G\242!Gu\202N\30rT\312\221(\321\61\5\15"
  "L\35\60\301\10gG\332\342$\321\342$\321rl\312\241\244\35\211\222:\32\345\204\34\5\15M\15\206"
  "h\15'JB\61\31\22\0\15N\10B\334\14c\10\15O LE\10'\62\225\244\244\230)S\246"
  "DI\246DI\246DI&IY\222#\331\60H\0\15P%\316\305\7\343\7i\33\24\227!q\31"
  "\22\227A\332\206\377\343\64(\203\242\14\241\242\14Cb\31\302i\370 \15Q&\316\305\7\343\7i\33"
  "\24\227!q\31\22\227A\332\206\377\343\220\14\312\60\15\342\220\14\203\62$\203\270\15\37\2\15R%\316"
  "\305\7\343\7i\33\24\227!q\31\22\227A\332\206\377\243\70$\303\240\14\241\70\14\211\62\14\241\70|"
  "\10\15S%\316\305\7\343\7i\33\24\227!q\31\22\227A\332\206\377\243\66(\303\240\14\341\66\14\311"
  "\240\14\241\66|\20\15T\30*M\11#\207\22\35\210\322$\12\243$\314\322(\321Fe\70\4\15U"
  "\30+\311\11\37\252E\211\322\251%j\211Z\242,\251ER(i\0\15V\31KE\11KG\242\34"
  "\213\226,\311\244Z\62\25\207\61\213\263\34X\1\15W\14\305l\12\247\213R\314J\0\15X\33KI"
  "\11{\7\263$\252D%-\212\264(\322\242H\213*Q%S\224\10\15Y\27\14E\11kG\262L"
  "I\223HM\42m\30\222\250\32\225#\31\15Z\25\13I\11K\31\244&\255\242U\264\212V)uI"
  "\6\1\15[\25\14E\11\343\220%a\252\305Z\254\305Z,V\322!\2\15\134\30I\311\10\37\210\262"
  "HiQZ\224\26\245EiQZ\244,\312\1\15]\23,E\11\37K\263(\351\377\377\377\177Q\262"
  "\12\0\15^\32,\305\10K\207JZ\230T\304\244\42\15YR\212\223(\216t$\307\0\15_\32\17"
  "A\11[G\243\34\213\222\70J\262(\351\226$J[\322\324\71R\1\15`\33LE\10K\324\242\226"
  "DTt,\311\221l\30\264\34\211zG\262a\220\0\15a%m\305\7KS\243$Z\302(I\304"
  "$J\206(\211\22))%RRJ\22)\222r\64G\242\34\223\0\15b\22\213H\7gH\206d"
  "\212\206()%R\244\0\15c\23\253H\7gH\206d\212\206()%\352<$\0\15d'\316\305"
  "\7\343\7i\33\24\227!q\31\22\227A\332\206\377C\264(C\62(\312\220\215C\242\14\312 \15\313"
  "\360!\15e&\316\305\7\343\7i\33\24\227!q\31\22\227A\332\206\377C\64\16\311\240\14C\66\16"
  "\211\62(\203\64\16\37\2\15f\15\246\324\11gHBc\62$\0\15g\27KI\10{\210\303\64L"
  "\303\64L\303\64L\206\203\16\16*\0\15h\25\14E\11k\310\201\60\215\303\70\214\303\70L\343l\30"
  "\2\15i\26\15E\11K\321\201\250\232\25\263bV\314\212Y\65\312\6\1\15j\22\10M\11KGr"
  " \35\244\222\26i\221\250\0\15k\26*\315\10k\330\342$\63\225\244$\223JRK\230dC\10\15"
  "l\35n\305\7K\321\264\250\22%YQ+jE\255\250\25\223(\13s\64Gs\64\3\15m\30j"
  "\315\7oH\303,NrDG\6U\13\223\65Gr$\336\0\15n\33l\305\7kH\223\60\224\63"
  "\71\223\63\71S\303$\33\206\34\314\301\34Y\0\15o\25\13E\11w\307r,U\6\251I\213\42-"
  "\252D\231\2\15p\33L\311\7\63\252FY\30ea\224\205Q\26FY\30U\27\71\7\206\34\1\15"
  "q\25+\311\10k\331Z\302P\14\305J\26\346P\232\345\300\6\15r\35\16E\11K\31\243Z\224h"
  "a\222h\321\60hI\24fI\24fQ\222FY\12\15s\17\252L\11g\70\344\320\16D\71\240\3"
  "\15t\30jI\11w\307r,\32\226r\22'j\64d\221T\222ZD\5\15u\37kI\11{\7"
  "s\60\322\224R\22%a\224\210I\64DI$%%))%R\244\0\15v\33\15A\11\37\31r"
  "\244\24gI\234%\311\224%Z\22EZ\262%\311p\10\15w /\301\10[\322\221HJ\322(K"
  "\322(\232\244J\251\22%\245J\224\224\242!\211\302\34\6\15x\33\20A\11\63K\6)\351T\351-"
  "\351[\322\267\244oI\237\42%\213\222A\15y\34\16E\11K\331\201(K\263\260\26\15\203\226Da"
  "\226Da\26%i\224\245\0\15z\37mE\11\37\322\261(\207#EYJ\265$\213\42%\213\222\212"
  "T\351)\351))u\2\15{\36kI\11{\7s\60\322\224R\22%a\224\210I$&\221\230D"
  "I\226DM\12\0\15|\30iM\11W\207r(\32\224j\222&b$Fb\224dQM\1\15}"
  "\37lE\11\37\330\321\34\215.\65-\311\222(\221*\221T\211\244J$U\242$\322\24\0\15~\34"
  "kI\11{\7s\60\7\224b\224\204Q\42&\221\230Db\22%Q\223\250\0\15\177\37mE\11w"
  "\207\262\34\316\201)\316\222\70K\302\341\240DY\22IY\22IYd\231\1\0";

All 18 comments

You need (a) a suitable font file, perferable in .bdf format and (b) you need to figure out the unicode range for this language. Assuming, that the range is from 0xd00 to 0xd7f, it might look like this (derived from GNU unifont):
malayalam

The code for this font is this:

/*
  Fontname: -gnu-Unifont-Medium-R-Normal-Sans-16-160-75-75-c-80-iso10646-1
  Copyright: Copyright (C) 1998-2019 Roman Czyborra, Paul Hardy,  Qianqian Fang, Andrew Miller, Johnnie Weaver, David Corbett, et al.  License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>  with the GNU Font Embedding Exception.
  Glyphs: 225/57086
  BBX Build Mode: 0
*/
const uint8_t u8g2_font_malayalam[4378] U8G2_FONT_SECTION("u8g2_font_malayalam") = 
  "\341\0\3\2\5\5\5\5\6\20\20\0\376\12\376\13\377\1\235\3\71\5\7 \6\0@\217\2!\10A"
  "Q\210\342\220\10\42\10\205H\214\42s\13#\17FE\210\252\247aH\242\226a\210z\2$\22GE"
  "\210.\34\224(\222\302y\214\244\312 f\0%\24GE\210F\223\222R\22)i\234&R\22%%"
  "M\1&\22GE\210j+e\225PL\42-\21\223L\232\2'\7\201P\214b\10(\14\203\315\207"
  "*\211\222\250\267(\13)\15\203\311\207\42\213\262\250\227(\211\0*\15\347\304\210\256Ti\333\222\246Z"
  "\6+\14\347\304\210.\256\15C\26\327\0,\11\202L\207BI\24\0-\7$H\212b\10.\7B"
  "L\210b\10/\14FE\210\266X\15\323\260\232\2\60\22FE\210J\213\222P\233\22%\332\304$\312"
  "$\0\61\14EI\210*\223\222\260O\203\0\62\17FE\210fHB\61\315\264\260\232\16\3\63\20F"
  "E\210fHB\61\215\346T\24\223!\1\64\20FE\210\62\324\222\250\222%Y\62\214i\5\65\17F"
  "E\210\342\220V\7\71M\305dH\0\66\17FE\210j\12\323tPB\307dH\0\67\14FE\210"
  "\342ZL\213i\23\0\70\20FE\210fHBc\62$\241c\62$\0\71\16FE\210fHBc"
  "\62\250\215\321\4:\11\342\314\210b\210\207\0;\12\42\315\207b\210\225D\1<\11%I\210\62\353\332"
  "\1=\11\246D\211\342N\34\6>\11%E\210\42\355\326\21\77\17FE\210fHB\61\15\253\71\230"
  "F\0@\22FE\210j\312\244DI\226H\211\224HZ\342!A\16FE\210J\213ZBq\30D"
  "\307\0B\16FE\210bPB\343\260\204\216\303\2C\16FE\210fHBkG\61\31\22\0D\16"
  "FE\210b\210\262$\364[\62D\0E\15FE\210\342\220V\7%m\35\6F\14FE\210\342\220"
  "V\7%\355\12G\16FE\210fHBki\10m\312\22H\14FE\210\42t\34\6\321c\0I"
  "\13EI\210b\220\302~\32\4J\16GE\210j\20\343\236\262(\313\66\0K\21FE\210\42\324\222"
  "\250\222\211b\222E\265$\14L\12FE\210\42\355\257\303\0M\15FE\210\42\24\247!Z<:\6"
  "N\20FE\210\42\334\66%R\42)\221\22\355\30O\14FE\210fHB\177L\206\4P\15FE"
  "\210bPB\343\260\244]\1Q\27g\305\207f\210\302$L\302$L\302$L\22%\221\244!\7\4"
  "R\20FE\210bPB\343\260D\265$KB\61S\16FE\210fHB\263\243\230\14\11\0T\12"
  "GE\210\342\220\305\375\15U\13FE\210\42\364\217\311\220\0V\21GE\210\42\265&Y\224EY%"
  "L\322\70\3W\15FE\210\42\364\342\62\15\321(\6X\17FE\210\42\24\223\250M\324\242\226P\14"
  "Y\16GE\210\42U\223,\312*i\334\15Z\13FE\210\342Z\354\65\35\6[\12\203\321\207b\210"
  "\372\247\1\134\14FE\210\42\215\253q\32W\3]\12\203\305\207b\352\237\206\0^\11f\304\214J\213"
  "\222\60_\7'\304\207\342\20`\7cH\215\42+a\16\6E\210fH\302\64\31F\233\262\4b\16"
  "fE\210\42mY\64\321qS\26\0c\15\6E\210fHB\265c\62$\0d\14fE\210\266e"
  "\321Fo\312\22e\17\6E\210fHBq\30\324b\62$\0f\14eE\210N\12K\203\24\366\4"
  "g\23fE\207\66Y\264$K\262hK\207$\24\223!\1h\14fE\210\42mY\64\321\307\0i"
  "\14eI\210*\314\21\261O\203\0j\14\245E\207\262\216\210}\224\42\11k\21fE\210\42mK\242"
  "J&&YTK\302\0l\12eI\210F\354\237\6\1m\22\7E\210bQ\242H\212\244H\212\244"
  "H\212\244\2n\13\6E\210\42Y\64\321\307\0o\14\6E\210fHB\37\223!\1p\16FE\207"
  "\42Y\64\321qS\226\64\5q\14FE\207f\321Fo\312\222\26r\13\6E\210\42Y\64Q\355\12"
  "s\15\6E\210fHB\331\61\31\22\0t\13EE\210*,\15R\330Uu\12\6E\210\42\364\233"
  "\262\4v\14\6E\210\42\64&Qo\242\4w\21\7E\210\42\225\42)\222\42)\222\42\251b\1x"
  "\17\6E\210\42\24\223(\23\265(\11\305\0y\16FE\207\42\364\230D\226\264\62$\0z\12\6E"
  "\210\342\32\366:\14{\16\244I\207J\311\302,*\326\242,\24|\10\301Q\207\342\203\0}\17\244I"
  "\207B\314\242,,\325\302,\221\0~\12gD\214F\223\42M\1\177#\20B\7#\351w\222\316I"
  "'\35\222lJ\302\64J\206$\233\222\60\235\206d\330\71\351\234tR\322\17\200$\20B\7#\351w"
  "\222\316I'm\322\62%Q\22E\207$\32\302(\211\212Q\262\350\234tN:)\351\7\0\0\0\4"
  "\377\377\15\0\13\204X\15G\211\244D\1\15\1\15\210\320\14O\213\244$\314\206\10\15\2\13\204p\12"
  "G\211\244D\1\15\3\15#\365\10\247\242T\223D\251\0\15\4&\316\305\7\343\7i\33\24\227!q"
  "\31\22\227A\332\206\377C\264(C\342\62$\306!Q\6e\220\206e\370\20\15\5\36\16A\11o\310"
  "\304J\24\15R\250dI\250\14Q\64$YRR\262\244\224M\221\2\15\6*PA\10o\310\244,"
  "L\42%\31\244LQ\262$J\22e\210\222(Q\262\244\224(YRJ\262)\222rJ\216\15\12\0"
  "\15\7\37\213E\7K\323\242$J\302P\14\207(\224\222PJ\302D\12s,\31.\71\70\134\0\15"
  "\10\42\215A\7g\311\222Z\322\242%-Z\322\62%\251\322\24)mR\230\243\71\60\350@\16\17:"
  "\0\15\11\22\7M\11g\210*\245\212\26'\203\22\17C\0\15\12\25\13I\11gK\372\242\364)i"
  "L\223-\322\1e\220\1\15\13\26\11M\11GS\242$\32\262!\7\222\64\33\264\64\33$\0\15\14"
  "\33\13I\11K\323\242$J\302(\21\223h\210\222HJJRRJ\244H\1\15\15$\316\305\7\343"
  "\7i\33\24\227!q\31\22\227A\332\206\377C\264\15\212\313\220\270\14\211\313 m\303\7\1\15\16!"
  "MA\11\37\31r$L\266(\321\242\212\26U*\303\240\344@\224\344@\224\344@\224\344\210\6\15\17"
  " MA\11\37\30r$\214\246$\323\222\232\226\324\222d\230r \311\342$\213\223,\7\42\5\15\20"
  "#PA\11\37\335\321,\231\246$Q\22-\251(\211\226tJ\222a\11\343\244\16&u\60\251\243\31"
  "\0\15\21'\316\305\7\343\7i\33\24\227!q\31\22\227A\332\206\377\203\62(\303\64D\303\220\14\312"
  "\60$\203\62l\207\17\1\15\22\25\12I\11oH\303,NrDG\6\61\311\302dS\0\15\23\27"
  "\14I\11k\224\262(\22S\65T\303-U\262$J\42M\1\15\24\32\15E\11kL\242,J\22"
  "\61J\22\65\251\250\351VR\262L\212t\0\15\25\27\13I\11s\7\262\70\13\207K\224ER\26I"
  "Y\224(S\2\15\26\31\15E\11k\210\223\60\225C\35\310\206\64\223\302L\312\302D\33\206\0\15\27"
  "\21\315D\11K\334\322,IS\265\222\245\331\11\15\30\33\16E\11\37\231r K\222\255\242EY\242"
  "EYR\31.\71\220\346\300!\15\31\31\14E\11K\333\242$K\302TL\207(Z\242$\225\222\64"
  "\221\242\5\15\32\22\13I\11\37\313\261\34\313\324\250\230\206\325\341\1\15\33\31\14I\11\37\321\241:\20"
  "FR\230DI&&Q\222U\222\341\224\0\15\34\30\14E\11gP\246\64K\266JT\213\344l\70"
  "$\261\224\14\223\2\15\35\36\17A\11k\10\243\312\220eJ\224D\231\22%Q&I\65\71\312\222\64"
  "\252C\212\4\15\36\37\15E\11KS\243$Z\302(I\304$J\206(\211\22))%RRJ\22"
  ")\322\0\15\37\20\347P\11gP\342\34\30t N\6\5\15 \24\11M\11k\320\322$\7t@"
  "\7t I\263A\2\15!\27\14\311\10K\213\272iQ\246E\231\26eIT\13\243\262\42\1\15\42"
  "\31\13\311\10G\213\222\250\222H\225D\252$R\245\26EZTU$\0\15#\32\14E\11\313\42E"
  "R$F\221\30Eb\24\15QIJ\242\212TI\0\15$\32\14I\11K\32\262HL\262$\224\262"
  "L\12#)\214\264(K\62-\1\15%\24\14E\11#\36\222\64TC\65TC\65T\303\341!\15"
  "&\21\10M\11k\220RY[bS\226D\13\0\15'\23\13I\11\253\255%\14\305P\14\305JV"
  "[&\0\15(\23\13I\11k\331Z\302P\14\305P\254dM%\0\15)\30\13I\11K\332\42-"
  "\11\303!\12\245$\224\222PJ\262H*\1\15*\24\14E\11\37\314\301\34\314\301d\7\264X\213\223"
  "d\70\15+\30\14E\11\37\331\221,\7\262\34\310\222-\323\242L\213\262$\31\16\15,\32\14E\11"
  "\313\226DR$F\221\30Eb\24\15QIJ\242\212\24\15\1\15-\23\10M\11k\220RY[\242"
  "\60[\342$\31\22\0\15.\24\12M\11k\330\242,\11\63\61\323B)\35\342\341 \15/\32\14I"
  "\11'\323\222\246L\12#)\214\244,\323\222\60\211\304L\32\42\0\15\60\25\13I\11k\210C-M"
  "\242\60K\302P\14\325\250*\1\15\61\24\11M\11k\320\322$\7t@\7t@\7\222\64\1\15\62"
  "\24\13I\11KN\242T\14\305p\30B\35\322\241\341\1\15\63\27JI\10k\330\342$\7\222M*"
  "Fj\16e\303\226c\303 \15\64\22\11M\11#\134\262L\253D\265A\16\263t\5\15\65\26\14E"
  "\11kH\223\60\224\63\71\223\63\71S\303$\33\206\0\15\66\27\14I\11+\334\302,\11S\61\25\263"
  "!\214*Q\26E\252\2\15\67\27\14E\11W\23\243\244\30I\351\226l\231\26eZ\224%\311p\15"
  "\70\25\15A\11K\21\243F\255\246\325\264\232V\323Jm\23\0\15\71\31\15A\11\37\331\241,\7\322"
  "\70M\246TKR-\312\242d\220\42\0\15:\27JM\10#\207r(\207r(\207r(\207\206C"
  "\230C)\0\15;\10\241\340\14c\20\15<\13\204l\15G\211\244D\1\15=\20\247Y\10\267\22&"
  "Y\334\267$L\322\24\15>\15\4q\11G\211\262\66)Q\0\15\77\13dq\11G\211\244\254\77\15"
  "@\13\204q\11G\211\222\255\177\15A\16\4\361\10G\211\262\250\26%Q\4\15B\17E\355\7K*"
  "f\305,i\321\222\5\15C\17\206i\7\67\254\226\253\225aL\206\4\15D\33\211]\7\37\311\201\34"
  "\310\221\34\311\241\34\312\221\34I\224E\252$\303\220\0\15E%\316\305\7\343\7i\33\24\227!q\31"
  "\22\227A\332\206\377\213qH,\303\20\212\303\220\14\312\60$\342\360!\15F\17%\301\10g\311l\223"
  "\222(MY\2\15G\17\4A\11G\211\206$\313\226(Q\0\15H\16\6A\11CQ\22\77\65)"
  ".\0\15I%\316\305\7\343\7i\33\24\227!q\31\22\227A\332\206\377\213\62\15\212\313\20n\303\220"
  "\14\312\60$\323\360A\15J\36\60\301\10g\207\224,\7\42-\307\264\34\233rL\251cJ\35\210\222"
  "(G\304\34\5\15K\32\20A\11G\307\224(G\242!Gu\202N\30rT\312\221(\321\61\5\15"
  "L\35\60\301\10gG\332\342$\321\342$\321rl\312\241\244\35\211\222:\32\345\204\34\5\15M\15\206"
  "h\15'JB\61\31\22\0\15N\10B\334\14c\10\15O LE\10'\62\225\244\244\230)S\246"
  "DI\246DI\246DI&IY\222#\331\60H\0\15P%\316\305\7\343\7i\33\24\227!q\31"
  "\22\227A\332\206\377\343\64(\203\242\14\241\242\14Cb\31\302i\370 \15Q&\316\305\7\343\7i\33"
  "\24\227!q\31\22\227A\332\206\377\343\220\14\312\60\15\342\220\14\203\62$\203\270\15\37\2\15R%\316"
  "\305\7\343\7i\33\24\227!q\31\22\227A\332\206\377\243\70$\303\240\14\241\70\14\211\62\14\241\70|"
  "\10\15S%\316\305\7\343\7i\33\24\227!q\31\22\227A\332\206\377\243\66(\303\240\14\341\66\14\311"
  "\240\14\241\66|\20\15T\30*M\11#\207\22\35\210\322$\12\243$\314\322(\321Fe\70\4\15U"
  "\30+\311\11\37\252E\211\322\251%j\211Z\242,\251ER(i\0\15V\31KE\11KG\242\34"
  "\213\226,\311\244Z\62\25\207\61\213\263\34X\1\15W\14\305l\12\247\213R\314J\0\15X\33KI"
  "\11{\7\263$\252D%-\212\264(\322\242H\213*Q%S\224\10\15Y\27\14E\11kG\262L"
  "I\223HM\42m\30\222\250\32\225#\31\15Z\25\13I\11K\31\244&\255\242U\264\212V)uI"
  "\6\1\15[\25\14E\11\343\220%a\252\305Z\254\305Z,V\322!\2\15\134\30I\311\10\37\210\262"
  "HiQZ\224\26\245EiQZ\244,\312\1\15]\23,E\11\37K\263(\351\377\377\377\177Q\262"
  "\12\0\15^\32,\305\10K\207JZ\230T\304\244\42\15YR\212\223(\216t$\307\0\15_\32\17"
  "A\11[G\243\34\213\222\70J\262(\351\226$J[\322\324\71R\1\15`\33LE\10K\324\242\226"
  "DTt,\311\221l\30\264\34\211zG\262a\220\0\15a%m\305\7KS\243$Z\302(I\304"
  "$J\206(\211\22))%RRJ\22)\222r\64G\242\34\223\0\15b\22\213H\7gH\206d"
  "\212\206()%R\244\0\15c\23\253H\7gH\206d\212\206()%\352<$\0\15d'\316\305"
  "\7\343\7i\33\24\227!q\31\22\227A\332\206\377C\264(C\62(\312\220\215C\242\14\312 \15\313"
  "\360!\15e&\316\305\7\343\7i\33\24\227!q\31\22\227A\332\206\377C\64\16\311\240\14C\66\16"
  "\211\62(\203\64\16\37\2\15f\15\246\324\11gHBc\62$\0\15g\27KI\10{\210\303\64L"
  "\303\64L\303\64L\206\203\16\16*\0\15h\25\14E\11k\310\201\60\215\303\70\214\303\70L\343l\30"
  "\2\15i\26\15E\11K\321\201\250\232\25\263bV\314\212Y\65\312\6\1\15j\22\10M\11KGr"
  " \35\244\222\26i\221\250\0\15k\26*\315\10k\330\342$\63\225\244$\223JRK\230dC\10\15"
  "l\35n\305\7K\321\264\250\22%YQ+jE\255\250\25\223(\13s\64Gs\64\3\15m\30j"
  "\315\7oH\303,NrDG\6U\13\223\65Gr$\336\0\15n\33l\305\7kH\223\60\224\63"
  "\71\223\63\71S\303$\33\206\34\314\301\34Y\0\15o\25\13E\11w\307r,U\6\251I\213\42-"
  "\252D\231\2\15p\33L\311\7\63\252FY\30ea\224\205Q\26FY\30U\27\71\7\206\34\1\15"
  "q\25+\311\10k\331Z\302P\14\305J\26\346P\232\345\300\6\15r\35\16E\11K\31\243Z\224h"
  "a\222h\321\60hI\24fI\24fQ\222FY\12\15s\17\252L\11g\70\344\320\16D\71\240\3"
  "\15t\30jI\11w\307r,\32\226r\22'j\64d\221T\222ZD\5\15u\37kI\11{\7"
  "s\60\322\224R\22%a\224\210I\64DI$%%))%R\244\0\15v\33\15A\11\37\31r"
  "\244\24gI\234%\311\224%Z\22EZ\262%\311p\10\15w /\301\10[\322\221HJ\322(K"
  "\322(\232\244J\251\22%\245J\224\224\242!\211\302\34\6\15x\33\20A\11\63K\6)\351T\351-"
  "\351[\322\267\244oI\237\42%\213\222A\15y\34\16E\11K\331\201(K\263\260\26\15\203\226Da"
  "\226Da\26%i\224\245\0\15z\37mE\11\37\322\261(\207#EYJ\265$\213\42%\213\222\212"
  "T\351)\351))u\2\15{\36kI\11{\7s\60\322\224R\22%a\224\210I$&\221\230D"
  "I\226DM\12\0\15|\30iM\11W\207r(\32\224j\222&b$Fb\224dQM\1\15}"
  "\37lE\11\37\330\321\34\215.\65-\311\222(\221*\221T\211\244J$U\242$\322\24\0\15~\34"
  "kI\11{\7s\60\7\224b\224\204Q\42&\221\230Db\22%Q\223\250\0\15\177\37mE\11w"
  "\207\262\34\316\201)\316\222\70K\302\341\240DY\22IY\22IYd\231\1\0";

Thanks for your reply

Again thanks a lot

I have a problem, Malayalam font cant read in Arduino IDE software and not showing in OLED. How to solve it?

Code

Capture

Output

993f0337-aff6-4f73-abb7-271b5c6c4cca
but the Glyph is working
code(My name in Malayalam (เด…เดทเตเดนเดฆเต))
Capture

output

e1e7a7a4-c59c-41b3-b767-516ecc01f8ef

working drawUTF8

code (เดจเดจเตเดฆเดฟ olikraus)
Capture

output

cdacc68a-f40b-4a90-9ff4-44fb81ef6274

And also Malayalam has Dependent vowel signs. It's 'x' position is not normal. And has Two-part dependent vowel signs, when we use Two-part dependent vowel signs the character position in between Two-part dependent vowel signs.

For more details check this
https://www.unicode.org/charts/PDF/U0D00.pdf

How can I convert this font?
https://www.dafontfree.net/freefonts-malayalam-f112349.htm

Not sure about Arduino IDE part, but try enableUTF8Print for display.

Not sure about Arduino IDE part, but try enableUTF8Print for display.

Thanks

I changed the font of my Arduino IDE editor into a Malayalam font. Now I can read Malayalam
Capture

In order to use u8g2.print() you need to enable it (as mentioned above). However this is only the first step. As a second precondition, you need to ensure, that your editor is able to operate in UTF8 mode: The resulting C file must be saved as UTF8 text file. The Arduino IDE by default works in UTF8 code, you should be able to directly type in or copy Malayalam glyphs from a char set tool. Especially there should not be these boxes. Instead you should see the glyphs in the C code string itself. I mean, the gylphs should be visible like here: https://github.com/olikraus/u8g2/blob/master/sys/arduino/u8g2_page_buffer/Chinese/Chinese.ino#L280

And also Malayalam has Dependent vowel signs. It's 'x' position is not normal. And has Two-part dependent vowel signs, when we use Two-part dependent vowel signs the character position in between Two-part dependent vowel signs.

U8g2 is made for embedded systems with very limited resources. So... it is by far not as powerful as a windows true type font rendering system (which requires magabytes of code).

Moreover, as a open source project we unfortunately do not have the resources to implement the required kerning algorithms for your language. At the end I assume it is up to you to output each glyph individually and shift the next glyph depending of the previous glyph into the right position.

There had been some attempts to implement support procedures for this, but I am not sure whether this will help you. There is an undocumented function called drawExtUTF8, see #529

How can I convert this font?
https://www.dafontfree.net/freefonts-malayalam-f112349.htm

There are several FAQ entries on this:
https://github.com/olikraus/u8g2/blob/master/doc/faq.txt#L219

To obtain .bdf from .ttf you can use otf2bdf (http://sofia.nmsu.edu/~mleisher/Software/otf2bdf/)

There are several FAQ entries on this:
https://github.com/olikraus/u8g2/blob/master/doc/faq.txt#L219

Thanks a lot

I found a video tutorial on this topic but is not in English.
Video
https://www.youtube.com/watch?v=V18zwLFAB18

I used bdfconv but it not converting full of my font

I tried to convert the bdf file in the below zip file. But I got a *.c file
My command is
bdfconv -f 1 -m '32-255' -n fontname -o myfont.c myfont.bdf
Please check it
Font Project.zip

Sorry
It working on this command (in Windows 7)
bdfconv -f 1 -m "32-255" -n fontname -o myfont.c myfont.bdf

How can I view and edit Malayalam letters in fony software
Capture

Malayalam Unicode table

The characters may be denoted by Unicode symbols in the range 0D00-0D7F. Below a table, that will show them if your browser supports UTF-8 and you have a Malayalam font installed.
Capture

Consonants

The values 0D15-0D39 denote consonants (or, rather, syllables consonant+a), except for 0D29 which doesn't exist.
Capture

A selection of conjunct consonants


When combined with vowel diacritics some consonants change shape.
More details

Vowels that modify consonant symbols

The values 0D3E-0D43, 0D46-0D48, 0D4A-0D4D, 0D02-0D03 denote various modifying vowels, used to change the an into a different vowel (or no vowel). Here shown following the symbol เด• ka.
Capture
Capture

How to do these with the u8g2 library?

I found a similar problem in the Arabic language
Capture


How you solved this in the Arabic Language?
How can I solve it in the Malayalam language?

More

This Font contains more characters in the Malayalam.
I want to convert that font. But the problem is that the Fony software doesn't show Malayalam characters.
This font has some additional characters in Malayalam start from 0xD6C to 0xED59. I want to include those characters also.

Malayalam Fonts

Name | Size
Akshar | 522.8 KiB
Anjali-Beta | 451.6 KiB
AnjaliOldLipi | 423.4 KiB
Dyuthi | 203.1 KiB
ECB-Thinkal | 72.3 KiB
Kalyani | 80.2 KiB
ML-NILA01 | 40.7 KiB
ML-NILA02 | 50.6 KiB
ML-NILA03 | 56.8 KiB
ML-NILA04 | 80.7 KiB
MLB TTAmbili | 75.8 KiB
Manjari-Bold | 125.5 KiB
Manjari-Regular | 129.4 KiB
Manjari-Thin | 132.3 KiB
Meera | 331.2 KiB
PMLTKN 0 | 65.7 KiB
Panchami | 65.7 KiB
Rachana W01 | 193.8 KiB
Rachana W01 | 1.1 MiB
RaghuMalayalam | 55.0 KiB
Suruma | 461.0 KiB
Tholika New | 83.1 KiB
Tholika Traditional | 311.8 KiB
Thoolika | 58.4 KiB
Thoolika Uni | 83.8 KiB
ThoolikaTraditional New | 313.9 KiB

_from: www.saikatham.com_

Hello @olikraus
I think you have solved all the problems in the u8g2 library related to Arabic.
Some of them are below
image

The Malayalam language has similar conditions are below

image

And also two characters combine and form a new character

ML Combined
More details

How can I create a fully working Malayalam font? Can I use any script for that?

I think you have solved all the problems in the u8g2 library related to Arabic.

not true. This is still open i think.

Arabic and Malayalam require the following extra steps:

  1. Combination of glyphs
  2. Construction of new glyphs based on two other glyphs

The first point is partly supported by the above mentioned ExtUTF8 function.
The second point should be handled by your text editor. Or, if this is not the case, you need to do a string replace step before printing: Search for two chars replace it by one other char. However, I do not know whether the second point is true for you.

I want to convert that font. But the problem is that the Fony software doesn't show Malayalam characters.

Fony is only for bdf editing, but I think the fonts you provided are ttf only, so otf2bdf and bdfconv are sufficient.

1. Combination of glyphs

The first point is partly supported by the above mentioned ExtUTF8 function.

Capture
In my table, I want to fix the second character for all other characters
example:
0x0d28, 0x0d4d, 15, /* เดจ and เต */
in here the first char 0x0d28 is changing to any char but the second char 0x0d4d and gap reduction value are fixed. Is this possible?

And I am confused with the last value

/* this line terminates the table */
  0xffff, 0xffff, 0xffff

What are you mean by that line?

2. Construction of new glyphs based on two other glyphs

The second point should be handled by your text editor. Or, if this is not the case, you need to do a string replace step before printing: Search for two chars replace it by one other char. However, I do not know whether the second point is true for you.
I fund a font that contains more characters for the construction of new glyphs based on two other glyphs.



It starts from 0xECE3 to 0xED59 and also I found the range starts from 0xE000to 0xF8FFcan use for private use.
Can replace two glyphs by one as shown in the picture above? Is there any code available for that?

3. Main Need

Fony is only for bdf editing, but I think the fonts you provided are ttf only, so otf2bdf and bdfconv are sufficient.

I am using Windows 7. Can you suggest me a software to convert TTF to bdf?

What are you mean by that line?

It just marks the end of the table.

Is there any code available for that?

You probably need some kind of search and replace functionality.
There is a lot of information in the net. But I do not know, whether this fits to Arduino World...

https://stackoverflow.com/questions/1494399/how-do-i-search-find-and-replace-in-a-standard-string

I am using Windows 7. Can you suggest me a software to convert TTF to bdf?

All my own development happens within Ubuntu. As I said, I have no idea how to do this with windows.

Thanks, @olikraus

It just marks the end of the table.

Can I set first char to any char and second is a constant?

All my own development happens within Ubuntu. As I said, I have no idea how to do this with windows.

Can I use otf2bdf in my android phone using Termux? (I think android support Linux commands)

Can I set first char to any char and second is a constant?

No, you have to provide all the combinations.

Can I use otf2bdf in my android phone using Termux? (I think android support Linux commands)

Unknown...

Hi @olikraus

All my own development happens within Ubuntu. As I said, I have no idea how to do this with windows.

Is OTF2BDF convert a C programming file?
Can I run it in a C compiler?

Is OTF2BDF convert a C programming file?
Can I run it in a C compiler?

Yes: http://sofia.nmsu.edu/~mleisher/Software/otf2bdf/

@olikraus
Where I get otf2bdf's commands?

Where I get otf2bdf's commands?

You mean? You have to download the zip, extract the same, compile everything, then you will have the otf2bdf command.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

idreamsi picture idreamsi  ยท  7Comments

morosanl picture morosanl  ยท  3Comments

BrickBee picture BrickBee  ยท  3Comments

Bonnie12 picture Bonnie12  ยท  6Comments

13590787364 picture 13590787364  ยท  3Comments