-
Hello. I have a request, maybe someone can help me make an impact font so that it is monospace, size 62 points/82 pixels and width 38 pixels. |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments
-
Only the numbers 0 to 9 are needed |
Beta Was this translation helpful? Give feedback.
-
bdfconv.exe support font mode 2 (-b 2) which will generate monospaced fonts. |
Beta Was this translation helpful? Give feedback.
-
I need the impact font from this link. Only numbers from 0 to 9. Size 60 pixels by 38 pixels |
Beta Was this translation helpful? Give feedback.
-
font from this page https://font.download/font/impact#google_vignette |
Beta Was this translation helpful? Give feedback.
-
Conversion was done with the following two commands (linux):
This gives the following u8g2 gylphs: The c code for your .ino file is this (just do a copy and paste): const uint8_t impact60[1165] U8G2_FONT_SECTION("impact60") =
"\12\2\5\6\6\6\1\1\7)>\1\377<\370<\0\0\0\0\0\4p\60\246\251_\372)\70\344R"
"&\6j\34\247u\326G}\322c<\220\243\70\220\243\70\220\243\70\316\243\70\316\243<\314\243<\314\243"
"<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314"
"\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<"
"\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243"
"\70\316\243\70\220\243\70\220\243\70\220\203<\322G}V\207q\334\346af\305F\366\342\1\0\61#\251"
"_\372\3v\342+\374\242\63xC\77p\304Nh\5f\177\70\222!\372\371\377\377\377\377\367\1\31\0"
"\62d\251_\32\32\374\3O\350%f\336\306q\230G}\224c<R\243\70P\343\64P\343\70N\343"
"\70N\343\70N\343\70N\343\70N\303<N\303<N\303<N\243<\364#CaH\206\340\10\206\340"
"\10\206\302\21\14\301\21\14\225!\30\202#\30*C\60T\206`H~d\10\206\344G\206d\20\12\377"
"}\0\4\0\63\211\251_\232\65\62eb\336\246u\230G\201\22(\205\16d<\316\243\70\316\243\70\316"
"\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\364C;\266C\77\362cV(\245N"
"\354\304V\250eZ\346E^\62D\77\355\207y\224\207y\224\207y\224\207y\224\207y\224\207y\224\207"
"y\224\207y\224\207y\224\207y\224\207y\224\207y\24\307y\24\307y\24\7r\24\7r\220\7\2\251"
"\217\362\260N\333\274L\264\324\211^@\0\64a\251_\372\3.\245R\321j\323\232\274\26\261\203\211\360"
"\200\211\360\200\211\360x\212\360x\11\361x\11\361p\12\361p\12\361p\211\361h\212\361h\212\361h\212"
"\361`\12\362`\12\362`\12\362X\13\362X\212\362X\212\362P\213\362P\213\362P\12\363H\13\363H"
"\13\363H%R\376\253\17\375\374\367\1\22\0\65i\251_\372\3\30(\201\377\222c;\237\61<\307`"
"\60\207x(G\210\244\20\12!\321\21;\220\361\70\217\362\60\217\362\60\217\362\60\217\362\320\317\237y\224"
"\207y\224\207y\224\207y\224\207y\224\207y\224\207y\224\207y\224\207y\224\207y\224\207y\224\307q"
"\224\307q\24\7z\20G\2\245\317\362\254N\333\274\214\264T\211f<\0\66\220\251_\32.\264\244Z"
"d\346mZgy\24(\201\320\203<\216\303\70\216\303\70\314\303\70\314Sy\230Gy\230Gy\230G"
"y\350\347H\242=Dc=\2$\205\220\350\210\316\310\214\31\310\200\230G\201\224\207y\224\207y\224\207"
"y\224\207y\224\207y\224\207y\224\207y\224\207y\224\207y\224\207y\224\207y\224\207y\224\207y\224"
"\207y\224\207y\224\207y\224\207y\224\207q\34\207q\34Gy\234\7y\240\20\2)\317\362\60\316\313"
"DK\225h\206\3\0\67\71\251_\372\3\26\247q\377m\347i\307v\246\37\332\261\235\351\207vlg"
"\372\241\35\333I\77i\307v\322O\332\261\235\364\223vl\207~\246\35\333\241\237i\307v\350\247\17\4"
"\70\227\251_\332-\364\204^b\346mZg}\324'\205\320c<\220\243\70\316\243\70\316\243<\314\243"
"<\314\243<\314\243<\314\243<\314\243<\314\243<\216\243<\216\243\70\220\243\70\222c<\322gu\332"
"\6^\240\306q\230g}R\10\205\320c<\220\243\70\316\243<\314\243<\314\243<\314\243<\314\243<"
"\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\314\243<\216\243"
"<\216\243\70\320c<P(}\324gu\332\346e\342\205N\364\2\2\0\71\216\251_\372-\266\244Z"
"b\346mZg}\24\10\205\320\203<\216\303\70\314\303\70\314\303\70\314Sy\230Gy\230Gy\230G"
"y\230Gy\230Gy\230Gy\230Gy\230Gy\230Gy\230Gy\230Gy\230Gy\230Gy\230"
"Gy\230Gy\230Gy\24H\211\210\210\31w\304P$<\22$<\224C<\230\202<\364s\345a"
"\36\345a\36\345a\36\345a\36\345a\34\346a\34\307a\34\347A\36'\224@\351\263:m\363\62\322"
"R%z\361\0\0\0\0\4\377\377\0"; in your ino file use If you don't like the rastering result, please follow instructions from here to generate an alternative version of the bdf file: https://learn.adafruit.com/custom-fonts-for-pyportal-circuitpython-display/conversion |
Beta Was this translation helpful? Give feedback.
-
Thank you for your help. Everything worked |
Beta Was this translation helpful? Give feedback.
-
What program can I use to convert a png image to a c file? |
Beta Was this translation helpful? Give feedback.
-
You can convert png to xbm format (which actually is c code) with any tool which supports xbm as an output format (for example gimp). Video Tutorial: https://www.youtube.com/watch?v=ac5CYQ3OJ7c Online converter: https://javl.github.io/image2cpp/ See also: https://github.com/olikraus/u8g2/wiki/u8g2reference#drawxbm |
Beta Was this translation helpful? Give feedback.
-
Thank you for your help
Pobierz aplikację BlueMail <https://bluemail.me> for Desktop
olikraus wrote:
You can convert png to xbm format (which actually is c code) with any tool which supports xbm as an output format (for example gimp).
Video Tutorial: https://www.youtube.com/watch?v=ac5CYQ3OJ7c <https://www.youtube.com/watch?v=ac5CYQ3OJ7c>
Online converter: https://javl.github.io/image2cpp/ <https://javl.github.io/image2cpp/>
See also: https://github.com/olikraus/u8g2/wiki/u8g2reference#drawxbm <https://github.com/olikraus/u8g2/wiki/u8g2reference#drawxbm>
—
Reply to this email directly, view it on GitHub <#2521 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AOCQWSRUPMXCVD3PI7ZLXPDZ327ADAVCNFSM6AAAAABP3IDFHOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOJWGM4DAOA> .
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
I need the impact font from this link. Only numbers from 0 to 9. Size 60 pixels by 38 pixels