Firmware2/Marlin/fonts
2016-07-19 15:26:14 -07:00
..
bdf2u8g.exe
HD44780_C.fon
HD44780_J.fon Update Kana font 2016-03-31 10:02:47 +09:00
HD44780_W.fon Moved font directory. Updated README.fonts 2015-03-16 17:27:27 +01:00
ISO10646_CN.fon Intit. commit for Chinese 2015-04-27 12:15:36 +02:00
ISO10646_Kana.fon Update Kana font 2016-03-31 10:02:47 +09:00
ISO10646-1.fon Add new (cleaner) Marlin font 2015-03-17 10:33:02 +01:00
ISO10646-4_Greek.fon Greek language pack from @psavva 2016-07-10 18:59:04 -07:00
ISO10646-5_Cyrillic.fon
make_fonts.bat Greek language pack from @psavva 2016-07-10 18:59:04 -07:00
Marlin_symbols.fon Add new (cleaner) Marlin font 2015-03-17 10:33:02 +01:00
README.md Rename ultralcd implementation files for consistency 2016-07-19 15:26:14 -07:00

The fonts are created with Fony.exe (http://hukka.ncn.fi/?fony) because Fontforge didn't do what I want (probably lack of experience).

In Fony export the fonts to bdf-format. (Maybe another one can edit them with Fontforge.) Then run make_fonts.bat which calls bdf2u8g.exe with the parameters needed to produce the .h files. The .h files must be edited and moved:

  • Replace #include "u8g.h" with #include <utility/u8g.h>,
  • Replace U8G_FONT_SECTION with U8G_SECTION,
  • Insert .progmem. right after the first quote ",
  • Move the file to the main directory.

How to integrate a new font: Currently we are limited to 256 symbols per font. We use a menu system with 5 lines, on a display with 64 pixel height. That means we have 12 pixels per line. So to have any space between the lines we can use no more than 10 pixel height for the symbols. For up to 11 pixels set TALL_FONT_CORRECTION 1 when loading the font. To fit 22 Symbols on the 128 pixel wide screen, the symbols can't be wider than 5 pixel, for the first 128 symbols. For the second half of the font we now support up to 11x11 pixel.

  • Get Fony.exe from hukka.ncn.fi
  • Copy one of the existing *.fon files and use the copy for your work.
  • Only change the pixels. Don't change width or height.
  • Export as a *.bdf file
  • Use bdf2u8g.exe to produce the .h file. Examples for the existing fonts are in make_fonts.bat.
  • Edit the produced .h file to match our needs. Find hints in the dogm_font_data_.h files.
  • Make a new entry in the font list in ultralcd_impl_DOGM.h before the #else // fall-back line:
    #elif ENABLED(DISPLAY_CHARSET_NEWNAME)
      #include "dogm_font_data_yourfont.h"
      #define FONT_MENU_NAME YOURFONTNAME
    #else // fall-back
  • Add your font to the list of permitted fonts in 'language_en.h'
    ... || ENABLED(DISPLAY_CHARSET_YOUR_NEW_FONT) ... )