U8g2: [Font request] Problem with convert new font for Persian

Created on 1 Sep 2019  路  5Comments  路  Source: olikraus/u8g2

Hi @olikraus
I want to create a new font for the library, I used the following command, bdf file created successfully.
otf2bdf.exe -r 72 -p 16 btitr.ttf -o btitr16.bdf

But after using the below command the created file is empty!
bdfconv -f 1 -m '32-128,$600-$6ff,$FB50-$FBB1,$FE70-$FEFF' -n btitr16 -o btitr16.c btitr16.bdf

Unfortunately I don't have access to Linux for test.
OS: Windows 7 32bit
Fonts: font.zip
Ref: Here

Is it a problem with the font or the commands I used?
Thanks

All 5 comments

If I remember correctly, there was an issue with the quotes on windows. You must use double quotes on windows:
https://github.com/olikraus/u8g2/blob/master/doc/faq.txt#L229

Also the $ will not work on all systems, maybe better use decimal numbers only, at least
-m "32-65535" should output everything. Maybe also add "-v" for debug output.

The problem was solved, I used double quotes. Thank you very much.
Only one question:
Do you need special tricks to convert fonts?
After converting the font I feel some letters are bent. Also some characters are not displayed well.
But the four fonts you convert are more beautiful ;)

My font data after convert, Used syntax:
bdfconv -f 1 -m "32-65535" -n btitr20 -o btitr20.c btitr20.bdf

const uint8_t btitr20[6706] U8G2_FONT_SECTION("btitr20") = 
  " \0\4\4\5\5\4\6\6\34#\372\365\17\0\17\374\0\0\0\0\2` \6\0 H\2!\20\344"
  ")h\302\210\27\223\10\11\23l\304\12\0%\36+\246\327\206\240\21d\204\220\221\245\204\42\5\16\24)"
  "P\244\64\322\20\21Cb\220\10\0(\24f*\207\222\230!c\206\214\31B\277\231h\314\240A\2)"
  "\27f*\207B(\211\306\220\231\206\10\235\214\31Bd\314\220\61\202\0**\256i\10\327@\21C\304"
  "\220\20\61hD\10R\42B\10\42\61d\4\212\22\201\2\211\31\21b\20\11\63#\246\33\22p\30\0"
  "+\16\255\345\347Z\340\70{\260,p<\3,\17$)g\302\10\26B\204\4\21\22\6\0-\10M"
  "d\351\302\203\5.\11\204(h\302\210\25\0/\26(\246\247\232T\302\244\22&\225\60Q\243\204\211\22"
  "&\225\60\0\60\17\347\244\230N\250\61%N\224\31\25\6\0\61\15\4\352\207F\30\21#X\314D~"
  "\62\24)\346\267^\220P\42\304\254\300\304\14\261\331\311\273P\0\63\30\13&\330\206\230(\206\210x\220"
  "BE\32\22\202\6\22\234C\221\222\1\64\32+\346\307\332\30\21F\212\210(V\210I\232C\246F\16"
  "\234P\244\244\301\0\65\37*\346\307R\300q\304H\31\62tD\10\21\61CBU\22\206\210\220\7&"
  "\222\214\30\2\0\66\31\12\346\307\322(\63\202\204\4\24f\304\5\242B\244\210\215\223P`H\0\67\34"
  "\13&\310F\270 \242D\14\32Af\4\221\22\224 \62e\214\34\205\42e\5\0\70\36\13\246\307V"
  "\320\220\3\247#W\254\224!\22cHPB\202\314\241\21\203\206\4\23\1\0\71\27(\346\247\312(\62"
  "FL\10\31!d\304M\214\11\33\65\63q\1:\13d)h\302\210\325#V\0=\13\313\344\330\302"
  "\203\363\340\36\34[\13d*gB\232\370\377\6\1]\13d*g\2\232\370\377&\1{\25Dr\247"
  "N\10!a\242\21\23$\232@\221\10\11\23#\1}\21Dj\247B\240h\342Q\230 a\342I\64"
  "\0\253\24\7e\210N\220x\42B\210\10\61A\2\5\11\24$\0\267\7b\244I\202\1\273\25\6e"
  "\210B\220 \42\204D\42B\26ABH\21$\10\0\327\20\307d\230B\250\20a\242\10\25E\230("
  "\0\367\24\253\245\327\222@r\4\305\203xp\36\254@r\4E\1\0\0\0\10\350,\10*\377\377\2"
  "\331\10b\244I\202\1\6\14\20$)hN\20\21B\202\214`!\2\0\6\33\22\344)hN\20\21"
  "B\202\10\31\261r\304\12\0\6\37\27\346)\210\6\211$T\4\31\64*\10\221\221c\210\20\31\2\0"
  "\6!\21\7%\210\312\230\22\242\242(RbP\60\0\6\42\24\11f\230\306\220\25A\306\211\242g\63"
  "\23'](\0\6#\22$&X\206\210\60\206\36< !D\222 \0\6$\36h\346\226\216\250p"
  "\204F\205\7\61\212L\231 CD\14\261\246\324\240\61EL\30\1\6%\26\204\346VJ\220\7(\346"
  "B\210\230`\42$\11!\42\14\0\6&!\15\346\366\212\320\241A\2\15\31T\42\224\71\61!BI"
  "s\42P\252t\347^,Qe\10\0\6'\17\344%XN\20\21/\346\23IB\0\6(\31\316%"
  "\367nh!\1I\4\64i\362E\223U\347\1\22%+\14\0\6)\30\7&\230\212 QA\2\11"
  "\12.\250\210\211$e^\24!\2\0\6*\30ne\370\222\210\240\205\303\10\11)$\240I\223\17\234"
  "\254:\4\0\6+\32\256e\370Z\340\261b\213\206\10#$\244\220\200&M>p\262\352\20\0\6,"
  "\32\314\345\326J\22-\304\10\234\215\30\42\224\214!\23\250 \212\60j\216\0\6-\25\314\345\326J\22"
  "-\304\10\234!\15\13\242\10\243\346\10\0\6.\31L&\327ZP\202\343\301$\321B\214\300\31\322\260"
  " \212\60j\216\0\6/\24h%\230R\260Qd\14\221\10D\352\201\10\63D\0\6\60\31\350e\230"
  "N\260Q\343\1\4\33E\250\324\210@\244\36\210\60C\4\0\6\61\24h%\227V\260Q\243\210\211\13"
  "&j\14\21\23F\0\6\62\31\10&\227R\260Q\343\1\6\33Ej\230\270`\242\306\20\61a\4\0"
  "\6\63!\262%G\77\220\360 D\6\12\22R\210\220\20\301T\4[\250\362\204\70q\13\25\246\65\11"
  "\0\6\64*r&G{x\20\343\1\204\10^<<\224\341\201\204\14\24$\244\20!!\202\251\10\266"
  "P\345\11q\342\26*Lk\22\0\6\65%\324\345V\77\210\361\0L\13\31\31D\314H\21aH\4"
  "c\21lE\300$!\15\211\33\310Rij\263\0\6\66.t&W\77\200\360`\306\3\31\17&<"
  "\244\343\1\230\26\62\62\210\230\221\42\302\220\10\306\42\330\212\200IB\32\22\67\220\245\322\324f\1\6\67"
  "\34\356%\370V`\261Di;\244\220\20C\42\16\221\31\64\350A\220E\351J\1\6\70#\356%\370"
  "V`A\301\210\214\42B\210\214(\262C\12\11\61$\342\20\231A\203\36\4Y\224\256\24\0\6\71\32"
  ",\346\326\332\300b\207$\32\231\6\231\241Aa\6\16\244\260\272\65(\0\6: \254&\327\236P\221"
  "$E\16,vh\214 \241\243\302 \63\204\206\34\205\4\253[\203\2\0\6@\11\215 \310\302\17\16"
  "\6A\34\356e\370j\340\261\343\301\212%\31dD\260\60\42\202\241C\371\300\11#\64\0\6B\42+"
  "&\327^\210p\345B\204\7\64\216\234\10QCB\15\11\21\306D\230S\7\37\34IT\6\0\6C"
  "\32\321e(\373X\223X\32-\25\216T@\62\42\307\14\34\343\21\273T\0\6D\35\213\346\306fH"
  "\201\344\310\15\34\71p\226\42\302\211\10\67p \61\27IP\225\1\6E\26\311\345\246\322\250\62\42\210"
  "\14\21\361@\305\210P\342\344\31\0\6F\32\314%\327V\320\221C\303\10\35\21\214D\270\202$\311\271"
  "P\242\310\14\0\6G\20'%\230\312\230\42&\20=\60B\4\0\6H\30\250\345\226\316(\62e\202"
  "\14\21\61\304\232R\203\306\24\61a\4\0\6I\32\315\345\366\346\310r\346\304\204\10%\315\211@\251\322"
  "\235{\261D\225!\0\6J\32\315\345\366\346\310r\346\304\204\10%\315\211@\251\322\235{\261D\225!"
  "\0\6K\13\244 \14N\10\23e\0\6L\14\204 \14\212\220\21!\204\0\6M\13\244`\5N\10"
  "#d\0\6N\11D`\14\6\31\0\6O\13\204 \14\212\210!D\0\6P\13d\340\5\212\10\21"
  "a\0\6Q\12\204\340\13\312\10$\0\6R\12c$\14\202\210\22\0\6`\20\347\244\230N\250\61%"
  "N\224\31\25\6\0\6a\16\4\352\207F\30\21#X\314D~\6b\25)\346\267^\220P\42\304\254"
  "\300\304\14\261\331\311\273P\0\6c\31\13&\330\206\230(\206\210x\220BE\32\22\202\6\22\234C\221"
  "\222\1\6d\33+\346\307\332\30\21F\212\210(V\210I\232C\246F\16\234P\244\244\301\0\6e "
  "*\346\307R\300q\304H\31\62tD\10\21\61CBU\22\206\210\220\7&\222\214\30\2\0\6f\32"
  "\12\346\307\322(\63\202\204\4\24f\304\5\242B\244\210\215\223P`H\0\6g\35\13&\310F\270 "
  "\242D\14\32Af\4\221\22\224 \62e\214\34\205\42e\5\0\6h\37\13\246\307V\320\220\3\247#"
  "W\254\224!\22cHPB\202\314\241\21\203\206\4\23\1\0\6i\30(\346\247\312(\62FL\10\31"
  "!d\304M\214\11\33\65\63q\1\6~\33\16\246\366nh!\1I\4\64i\362E\223U\347!\23"
  "!\262lha\0\6\206\34\314\345\326J\22-\304\10\234\211\10\21DJ\20\12CfHA\24a\324"
  "\34\1\6\230\34H&\227R\260Q!\304\24\12\17\64\330(R\303\304\5\23\65\206\210\11#\0\6\251"
  "\32\321e(\373X\223X\32-\25\216T@\62\42\307\14\34\343\21\273T\0\6\257\37\321%(\77\0"
  "\301#B\216 z\362(\251p\244\2\222\21\71f\340\30G\215\330\245\2\6\300\30\7&\230\212 Q"
  "A\2\11\12.\250\210\211$e^\24!\2\0\6\314\32\315\345\366\346\310r\346\304\204\10%\315\211@"
  "\251\322\235{\261D\225!\0\6\360\20\347\244\230N\250\61%N\224\31\25\6\0\6\361\16\4\352\207F"
  "\30\21#X\314D~\6\362\25)\346\267^\220P\42\304\254\300\304\14\261\331\311\273P\0\6\363\31\13"
  "&\330\206\230(\206\210x\220BE\32\22\202\6\22\234C\221\222\1\6\364\33+\346\307\332\30\21F\212"
  "\210(V\210I\232C\246F\16\234P\244\244\301\0\6\365 *\346\307R\300q\304H\31\62tD\10"
  "\21\61CBU\22\206\210\220\7&\222\214\30\2\0\6\366\32\12\346\307\322(\63\202\204\4\24f\304\5"
  "\242B\244\210\215\223P`H\0\6\367\35\13&\310F\270 \242D\14\32Af\4\221\22\224 \62e"
  "\214\34\205\42e\5\0\6\370\37\13\246\307V\320\220\3\247#W\254\224!\22cHPB\202\314\241\21"
  "\203\206\4\23\1\0\6\371\30(\346\247\312(\62FL\10\31!d\304M\214\11\33\65\63q\1 \14"
  "\7\0 \10\2 \15\7\0 \10\2 \16\11\241!\10\202\10\5 \17\24\207\11\10V\270P\202B"
  "\4\21\22\42\220\250`\361\0 \30\14\303dZJ\210H\202\214\20 \31\13\303dZ\202\221(\42\1"
  " \34\17\245$jF\30\21CB\210 !\0 \35\20\245$j\202\10\22\42B\214\20\21\10\0 "
  "\71\17\343\244XJ\210 !\202\10\11\23\0 :\17\343\244XB\230 BB\210\210\4\0\42\31\10"
  "b\244I\202\1\350\30\20\4!\14N\10\21!\244\10\42\2\11\0\350 \11D`\13\6\31\0\350!"
  "\13\204 \13\306$!\204\0\350\42\10c \13B\2\350#\13\244 \13N\10#d\0\350$\14\204"
  " \13\212\220\21!\204\0\350%\12\204\340\12\312\10$\0\350&\13d\134\6\212\10\21a\0\350'\13"
  "\244\334\5N\10#d\0\350(\13\304 \13\6\251\21H\0\350)\14\4\341\12\212$\244D \1\350"
  "*\20\4\341\12N\10\21!J\4\21\201\4\0\350+\17\4\341\12\212\220\21!\4\215@\2\0\350,"
  "\13\304 \13\216\10\25E\0\350-\17\4\341\12\312\210\26AB\210\10\3\0\373V\33\16\246\366nh"
  "!\1I\4\64i\362E\223U\347!\23!\262lha\0\373W\32\257e\6Gh\261\345H<x"
  "\261B\10\32\361\20\211\20Z\70\270\70\0\373X\26\5bVJ !C\210\214YAb`\20\23\241"
  "\304\4\1\373Y\25\246afJ\250PB\36\224\30\27$D\221`\202\302\0\373z\34\314\345\326J\22"
  "-\304\10\234\211\10\21DJ\20\12CfHA\24a\324\34\1\373{\36\354\351\326\12\71%*V\10"
  ")ED\14\31D*R\214\70\61\210H\260r\212\216\0\373|\34\14\242\306\316\300b\210\202 +W"
  "\42\315)c\344\201\206\20WP\350\320P\0\373}\33\354\241\306\12AS+\224\204\61F\346\301\23T"
  "\343A\4\11X\36\224(\0\373\212\34H&\227R\260Q!\304\24\12\17\64\330(R\303\304\5\23\65"
  "\206\210\11#\0\373\213\34I&\247R\270a!\4\225\12\17:\334\260B\245\210\215\22\66\210P\231B"
  "\0\373\216\32\321e(\373X\223X\32-\25\216T@\62\42\307\14\34\343\21\273T\0\373\217\36\322e"
  "\70\273\350\262G\221\236%\27n\134\300Q\42\7\15$\363\340\201\11\26d\20\15\373\220\27\311a\230\332"
  "\30\23X\30)El\30\261\61f\12\25\42\5\0\373\221\25\312a\250\332 #g\216\234!G\335\270"
  "\42\17T \22\373\222\37\321%(\77\0\301#B\216 z\362(\251p\244\2\222\21\71f\340\30G"
  "\215\330\245\2\373\223\42\322%\70\77\0\321#\202\216 {\24i\251p\304\2\22\22If \231\7\17"
  "L\260 \203h\0\373\224\31\310!\210^\30\42B\206\230\70A\246\20)RC\214\224)C\10\0\373"
  "\225\26\312!\230\236 BB\6\231\71C\212\34m\36\250\70\64\0\373\244\30\7&\230\212 QA\2"
  "\11\12.\250\210\211$e^\24!\2\0\373\245\33\11&\230\216\60q\304\204\205\15'l\252\62\42\206"
  "\214\30\222\2M\10b\3\373\374\32\315\345\366\346\310r\346\304\204\10%\315\211@\251\322\235{\261D\225"
  "!\0\373\375\26/%\7\207\60\23\241\24\205\62c\302\214\221\66l\226\235\2\373\376\23\305\341VJ "
  "!C\210\214YAbp\211\20\2\373\377\22f\341fJ\250PB\36\224\30\134$\204\10\0\374^\17"
  "\4!\14\212\220\21!\4\215@\2\0\374_\16\4!\14\312\210\26!\244\10\3\0\374`\13\304`\14"
  "\6\251\21H\0\374a\15\4!\14\212,B\211@\2\0\374b\13\304\240\14\216\210$d\0\375\362\62"
  "Qj\70gx\250B\7\11M&$\21\261\42H\216 \25f\4!\61C\4\215\31\62\204\314\220\21"
  "\322\14\61\61d\310\203\7fD\254\33B\4\0\376\201\24\11f\230\306\220\25A\306\211\242g\63\23'"
  "](\0\376\202\25\11f\210\206 \25!\10\6\33E\263\71+T\25\11\0\376\203\22$&X\206\210"
  "\60\206\36< !D\222 \0\376\204\22%&h\206\220@$\204\5\31A\277xA\0\376\205\36h"
  "\346\226\216\250p\204F\205\7\61\212L\231 CD\14\261\246\324\240\61EL\30\1\376\206\35i\346\226"
  "\216\260\200\244\206\205\7\63\214P\241 \202\202\20\271\306\324De\214\230\1\376\207\26\204\346VJ\220\7"
  "(\346B\210\230`\42$\11!\42\14\0\376\210\26\245\246fJ\30!\363OT\20\31'DL\220\20"
  "C\302\0\376\211!\15\346\366\212\320\241A\2\15\31T\42\224\71\61!BIs\42P\252t\347^,"
  "Qe\10\0\376\212\33\17\346\6\213\340\301A\302\16\16\17\271\60\23\241\24q\30\244\15\233e\247\0\376"
  "\213\31\5\42X\206\230\20AB\4\31!\64\220\220!D\306\254 \61\4\0\376\214\24\306!h\212\230"
  "PD\306\204\7\23*\224\220\7%\6\376\215\17\344%XN\20\21/\346\23IB\0\376\216\16\345%"
  "hJ\30!\363OT\20\31\376\217\31\316%\367nh!\1I\4\64i\362E\223U\347\1\22%+"
  "\14\0\376\220\30o\345\6Gh\261\345H<x\261B\10\32\361\240\6\217\16\10\0\376\221\24\305\341V"
  "J !C\210\214YAb\340\220!B\0\376\222\22f\341fJ\250PB\36\224\30G\204\214\20\0"
  "\376\223\30\7&\230\212 QA\2\11\12.\250\210\211$e^\24!\2\0\376\224\33\11&\230\216\60"
  "q\304\204\205\15'l\252\62\42\206\214\30\222\2M\10b\3\376\225\30ne\370\222\210\240\205\303\10\11"
  ")$\240I\223\17\234\254:\4\0\376\226\33\217%\10W\10\241e\303\3\15-\226\250\210q\17J\254"
  "\20\241D\310\61\0\376\227\24\305aXF\24%\42\14$d\10\221\61+H\14\1\376\230\23\206ah"
  "F\10\21E\302\203\11\25J\310\203\22\3\376\231\32\256e\370Z\340\261b\213\206\10#$\244\220\200&"
  "M>p\262\352\20\0\376\232\36\317\345\7_h\361\0\302\26\15\22\36\134h\261DE\214{Pb\205"
  "\10%B\216\1\376\233\27\5bXJ\230!BJD\30H\310\20\42cV\220\30\2\0\376\234\24\306"
  "ahJ(\61\201\212\204\7\23*\224\220\7%\6\376\235\32\314\345\326J\22-\304\10\234\215\30\42\224"
  "\214!\23\250 \212\60j\216\0\376\236\34\354\345\326J\71\25J\224\204)\65D\320\30\22d\220h#"
  "\246`\301T'\0\376\237\32\354\241\306\316\300b\210\202 +W\42\315)c\344\201\12\35\71\64\24\0"
  "\376\240\32\354\241\306\12AS+\224\204\61F\346\301\23T\343\201\10\35\71\64\24\0\376\241\25\314\345\326"
  "J\22-\304\10\234!\15\13\242\10\243\346\10\0\376\242\33\354\345\326J\71\25J\224\204)\65D\320\30"
  "\22dP\35\63Xa\252\23\0\376\243\24L!\310\316\300b\210\202 +W\42\315)c\4\1\376\244"
  "\23L!\310\12AS+\224\204\61F\346\301\23T\3\376\245\31L&\327ZP\202\343\301$\321B\214"
  "\300\31\322\260 \212\60j\216\0\376\246\36L&\327ZP\202\303\312\251P\242$L\251!\202\306\220 "
  "\203\352\230\301\12S\235\0\376\247\30\314a\310\226\310\351A\15,\206(\10\262r%\322\234\62F\20\0"
  "\376\250\27\314a\310\226\310\351\1\21\64\265BI\30cd\36<A\65\0\376\251\24h%\230R\260Q"
  "d\14\221\10D\352\201\10\63D\0\376\252\26k%\310ZH\201\4'\12\64D\320\220\7'JP\63"
  "\0\376\253\31\350e\230N\260Q\343\1\4\33E\250\324\210@\244\36\210\60C\4\0\376\254\32\353e\310"
  "V\310\201#\303\206\24Hp\242@C\4\15yp\242\4\65\3\376\255\24h%\227V\260Q\243\210\211"
  "\13&j\14\21\23F\0\376\256\24i%\247V\270a\205J\21\33%l\324\240\62\205\0\376\257\31\10"
  "&\227R\260Q\343\1\6\33Ej\230\270`\242\306\20\61a\4\0\376\260\31\11&\247R\270a\343\301"
  "\206\33V\250\24\261Q\302\6\21*S\10\0\376\261!\262%G\77\220\360 D\6\12\22R\210\220\20"
  "\301T\4[\250\362\204\70q\13\25\246\65\11\0\376\262\34t%Gg\240 a\205\10\11\23\214E\260"
  "\206,O\220\33\270Tij\263\0\376\263\27\13a\250f\230(\206\204\11\42b\210\220\7'TH\42"
  "\4\0\376\264\26\354 \270J\260@AD\210\21\42B\310\203\25J\204\4\21\376\265*r&G{x"
  "\20\343\1\204\10^<<\224\341\201\204\14\24$\244\20!!\202\251\10\266P\345\11q\342\26*Lk"
  "\22\0\376\266)t&G{x\60\343\201\204\10\17\242<\210\360\360 P\220\260B\204\204\11\306\42X"
  "C\226'\310\15\134\252\64\265Y\0\376\267\33\313a\250VP\201A\202\225\13\17\66\344\220\60Ad\362"
  "\340\204\12\21F\0\376\270\34\314a\270VX\221A\302\25\14\17\203 B\302\10\21!\344\301\3\24\42"
  "F\10\376\271%\324\345V\77\210\361\0L\13\31\31D\314H\21aH\4c\21lE\300$!\15\211"
  "\33\310Rij\263\0\376\272#\325\345f\77\210\361 \214\13\31\32&\314P\21a\210\4k\21\314a"
  "K\63\344F\256U\233\334\60\0\376\273\27-!\310\42\301\62\221\20\211h\4\241\21,\226\250\21R\10"
  "\0\376\274\30-!\330\342@\63A\204\214\11\22H\10\241\21\17\36\254\60\42\0\376\275.t&W\77"
  "\200\360`\306\3\31\17&<\244\343\1\230\26\62\62\210\230\221\42\302\220\10\306\42\330\212\200IB\32\22"
  "\67\220\245\322\324f\1\376\276,u&g\77\200\360\200\306\203\31\17(<\304\343A\30\27\62\64L\230"
  "\241\42\302\20\11\326\42\230\303\226f\310\215\134\253\66\271a\0\376\277\34\315a\310^\330\241c\303\203%"
  "X&\22\42\21\215 \64\202\305\22\65B\12\1\376\300\35\315a\330^\330\241c\303\203\35h&\210\220"
  "\61A\2\11!\64\342\301\203\25F\4\376\301\34\356%\370V`\261Di;\244\220\20C\42\16\221\31"
  "\64\350A\220E\351J\1\376\302\35\357%\10Wh\301di<\244\224\20S\42N\221\31\65h\304\13"
  "')\6\25\22\376\303\36\354!\310N\310\201$\11\216\234\206\214\20#\42\202\20\31\64D\14\211\25J"
  "\322\234\2\376\304\35\355!\330N\320\221DI\16\235h\220\20\63\42\302L\64f\14\211\7\17J(\22"
  "\376\305#\356%\370V`A\301\210\214\42B\210\214(\262C\12\11\61$\342\20\231A\203\36\4Y\224"
  "\256\24\0\376\306$\357%\10WhA\341\210\14#B\212\214\60\302CJ\11\61%\342\24\231Q\203F"
  "\274p\222bP!\1\376\307$\354!\310N\310Aa\310\214!Af\214\240\221c\310\10\61\42\42\10"
  "\221AC\304\220X\241$\315)\0\376\310#\355!\330N\320A\201\310\14\42Ah\214\250\241\203\6\11"
  "\61#\42\314Dc\306\220x\360\240\204\42\1\376\311\32,\346\326\332\300b\207$\32\231\6\231\241Aa"
  "\6\16\244\260\272\65(\0\376\312\30\314\345\306\26\71S\347\312\21KA\244\4\31T\7\253S\204\2\0"
  "\376\313\22I!\230\16!#G\2\6|\20\2\213a\0\376\314\20(!\210J\221\23G\312\20y\300"
  "d\0\376\315 \254&\327\236P\221$E\16,vh\214 \241\243\302 \63\204\206\34\205\4\253[\203"
  "\2\0\376\316\35l&\307^\320\221C\303\203*v\352\134\71R*\210\224 \203\352`u\212P\0\376"
  "\317\27\311a\230R\270a\343\1\20\62r$`\300\7!\260\30\6\0\376\320\24\310a\210\216\260A\244"
  "D\27\71q\244\14\221\7L\6\376\321\34\356e\370j\340\261\343\301\212%\31dD\260\60\42\202\241C"
  "\371\300\11#\64\0\376\322 \320e\10s\360\321\343!\20M$$\221\200aB\10\24\22b\134\211\7"
  "\17D\274\71\63\0\376\323\33\7bx\212(A\204D\215)\22DH\20!AFX\205\302D\21\62"
  "\0\376\324\26\307axN\250A\203\307\20\61\21FD\30\21%\36\240\21\376\325\42+&\327^\210p"
  "\345B\204\7\64\216\234\10QCB\15\11\21\306D\230S\7\37\34IT\6\0\376\326\42,&\327^"
  "\210\200\5C\204\7\66r\240\10qA\204\4\62\21\350\324\261\203!\226(Ie\6\0\376\327\31\347a"
  "x\6\31\262c\212\4\21\22DH\220\21V\241\60Q\204\14\0\376\330\31\307axJ\210\60eB\4"
  "\36C\304D\30\21aD\224x\200F\0\376\331\32\321e(\373X\223X\32-\25\216T@\62\42\307"
  "\14\34\343\21\273T\0\376\332\36\322e\70\273\350\262G\221\236%\27n\134\300Q\42\7\15$\363\340\201"
  "\11\26d\20\15\376\333\27\311a\230\332\30\23X\30)El\30\261\61f\12\25\42\5\0\376\334\25\312"
  "a\250\332 #g\216\234!G\335\270\42\17T \22\376\335\35\213\346\306fH\201\344\310\15\34\71p"
  "\226\42\302\211\10\67p \61\27IP\225\1\376\336\30\214&\327jP\221\363O\202\221\10f\331)!"
  "j\322 +\4\0\376\337\24\345!XN\30!$H\14\231\315\220!\17D\14\1\376\340\20\346aX"
  "R\230!\364f&$\36\24\21\376\341\26\311\345\246\322\250\62\42\210\14\21\361@\305\210P\342\344\31\0"
  "\376\342\30\211\345\246R\250BFZ\230\20QBD\21\22bF\210\223\16\0\376\343\23\10!\210\316\240"
  "\62#\302\214\70b\4E\220!\0\376\344\23\12!\230\316\260R#B\215\20R\4\311\213!\2\376\345"
  "\32\314%\327V\320\221C\303\10\35\21\214D\270\202$\311\271P\242\310\14\0\376\346\33\315%\347V\330"
  "\241c\303\4\26\23\254D\60\223$\313\215`\242&\231!\0\376\347\24\305aX\206\20\22#\3\11\31"
  "Bd\314\12\22C\0\376\350\22\206ahJ\240\61\343A\204\12%\344A\211\1\376\351\20'%\230\312"
  "\230\42&\20=\60B\4\0\376\352\25i%\230V\70aS\225\21\61d\304\220\24hB\20\33\376\353"
  "\31j!\230\212@b\205\316 \11C$\210\210$HB\244\30\62\4\0\376\354\30\210!\207\316\240\62"
  "A$\11\362\340\201\10!\201\202\210)\64\4\0\376\355\30\250\345\226\316(\62e\202\14\21\61\304\232R"
  "\203\306\24\61a\4\0\376\356\27\251\345\226\316\60B\205\202\10\12B\344\32S\23\225\61b\6\0\376\357"
  "\32\315\345\366\346\310r\346\304\204\10%\315\211@\251\322\235{\261D\225!\0\376\360\26/%\7\207\60"
  "\23\241\24\205\62c\302\214\221\66l\226\235\2\376\361\32\315\345\366\346\310r\346\304\204\10%\315\211@\251"
  "\322\235{\261D\225!\0\376\362\26/%\7\207\60\23\241\24\205\62c\302\214\221\66l\226\235\2\376\363"
  "\23\305\341VJ !C\210\214YAbp\211\20\2\376\364\22f\341fJ\250PB\36\224\30\134$"
  "\204\10\0\376\365%Lf\330\6\32DA\306\203\10\24J\314\30\42\224\24\31CDP\11a#\304\25"
  "\34\71\220\234\220`\226\0\376\366)n&\370\206\250`\250\316\205\7\21\60\314\60\61\244\304\20\32DF"
  "\24\31q#\306\215\30h\273D%\310\224\31bf\0\376\367'\213&\310\306\300\220\4\307\205\7\24&"
  "\224\220\61$\210\220(A\204\210\230\22\242F\10+\67p\34\61\21\242,\1\376\370)\215&\350\306\320"
  "\260DG\6\17\30d\230\20RB\312\214!\63\206\314\250\21\343D\214\263\356T\42\22D\312\214\60\63"
  "\0\376\371$\312f\266b\220P\42\306 A\222DH\11A#D\25\33\67\214\320\10A\326\203\24\27"
  "\222\234\270\200\0\376\372+\314f\326F\270 \303D\220\22Ah\10\231!d\6\215 %\202\324\61\253"
  "F\220!A\204\210\232\361`E\206%)\62(\0\376\373\35\352%\270b\220P\42\306 A\222DH"
  "\11A#D\25\33\67\252\320\10A\226\0\376\374#\354%\330F\270 \303D\220\22Ah\10\231!d"
  "\6\215 %\202\324\61\253F\220!A\242\210\232\1\0";

Debug output:

c:\bdfconv>bdfconv -f 1 -v -m "32-65535" -n btitr20 -o btitr20.c btitr20.bdf
Parse File btitr20.bdf: 288 glyph(s) found
Map: map_cmd_list='32-65535'
Map: exclude=0 from=32/$20 to=65535/$ffff map=32/$20
Reduce: Start
Reduce: End
CalculateMaxBBX: x=-6, y=-11, w=28, h=35
CalculateMaxBBX: Encodings x=8207, y=1613, w=65210, h=59416
bf_CalculateMinMaxDWidth: dx_min=0, dx_max=22
bf_CalculateMinMaxDWidth: x_min=-6, x_max=4
bf_CalculateMaxBitFieldSize: bbx.x=4, bbx.y=6, bbx.w=5, bbx.h=5, dwidth=6
RLE Compress: best zero bits 4, one bits 4, total bit size 53368
RLE Compress: Font code generation, selected glyphs=288, total glyphs=288
RLE Compress: ASCII gylphs=32, Unicode glyphs=256
RLE Compress: Glyphs per unicode lookup table entry=100
RLE Compress: Unicode lookup table len=2, written entries=2
RLE Compress: Unicode lookup table first entry: delta=8, encoding=59436
RLE Compress: Unicode lookup table last entry: delta=2090, encoding=65535
RLE Compress: 'A' pos = 0, 'a' pos = 0
RLE Compress: Font size 6706
bf_WriteU8G2CByFilename: Write file 'btitr20.c'

Usually these problems don't come from bdfconv , converting one bitmap format to an other with the same size. Usually they come from otf2bdf, automatic converting and scaling the TTF-(vector)-font to a fixed size bitmap. The smaller the bitmap the more problems.
The usual solution is editing the .bdf file in a font editor, like FontForge, to your taste. But from a
certain smallness on you can't find a satisfying solution. For example 'Chinese' is impossible in 8x8.

There are several commandline options to otf2bdf which may work.
https://github.com/olikraus/u8g2/blob/master/tools/font/otf2bdf/otf2bdf.c#L1233
Glyph hinting or auto hinting may help in otf2bdf (I think -a is an extention to my otf2bdf version).

Like @AnHardt said, small point sizes are always difficult, but also higher point sizes might have issues. For example 16 may work, 17 produces bad results, 18 again works.
I suggest to install the freetype tool suite (https://github.com/genesi/freetype/tree/master/ft2demos) and use "ftview" tool to see under which conditions the conversion with otf2bdf produces a good result.

Thank you both dear friends, very useful tips.
@olikraus The results with -n are not interesting and requires more tests and also -a not available. I think different situations should be considered perhaps the problem is the font.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

walenw picture walenw  路  8Comments

luebbe picture luebbe  路  5Comments

sarwarislammoon picture sarwarislammoon  路  4Comments

Devilscave picture Devilscave  路  3Comments

BrickBee picture BrickBee  路  3Comments