This repository has been archived on 2022-01-28. You can view files and clone it, but cannot push or open issues or pull requests.
Marlin-Artillery-M600/Marlin/fonts
AnHardt 6b1b71837c Intit. commit for Chinese
Edited the European part of 'ISO10646_CN.fon' to match the existing fonts.
Added Chinese font to make_fonts.bat
Created 'dogm_font_data_ISO10646_CN.h'
Added Chinese to 'language.h'
Added 'language_cn.h' with some minor edits.
Added Chinese font in 'language_en.h' to not fall back to European font.
Added cn to 'Configuration.h'
Changed WIDTH to LCD_PIXEL_WIDTH and HEIGHT to LCD_PIXEL_HEIGHT to have more descriptive names.

In 'dogm_lcd_implementation.h'
Added Chinese Font
Made 1 pixel more room for the larger Chinese font on the status line.
Changed geometry of the 'select bar' by one pixel.
Changed the way the position for values and postcars are set.
2015-04-27 12:15:36 +02:00
..
bdf2u8g.exe Moved font directory. Updated README.fonts 2015-03-16 17:27:27 +01:00
HD44780_C.fon Moved font directory. Updated README.fonts 2015-03-16 17:27:27 +01:00
HD44780_J.fon Moved font directory. Updated README.fonts 2015-03-16 17:27:27 +01:00
HD44780_W.fon Moved font directory. Updated README.fonts 2015-03-16 17:27:27 +01:00
ISO10646-1.fon Add new (cleaner) Marlin font 2015-03-17 10:33:02 +01:00
ISO10646-5_Cyrillic.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 Moved font directory. Updated README.fonts 2015-03-16 17:27:27 +01:00
make_fonts.bat Intit. commit for Chinese 2015-04-27 12:15:36 +02:00
Marlin_symbols.fon Add new (cleaner) Marlin font 2015-03-17 10:33:02 +01:00
README.fonts Add DISPLAY_CHARSET_HD44780_CYRILLIC as alternative in SanityCheck.h 2015-04-21 21:42:00 +02:00

The fonts are created with Fony.exe (http://hukka.ncn.fi/?fony) because Fontforge didn't do what I want (probably lack off experience). 
In Fony export the fonts to bdf-format. Maybe another one can edit them with Fontforge.
Then run make_fonts.bat what calls bdf2u8g.exe with the needed parameters to produce the .h files.
The .h files must be edited to replace '#include "u8g.h"' with '#include <utility/u8g.h>', replace 'U8G_FONT_SECTION' with 'U8G_SECTION', insert '.progmem.' right behind the first '"' and moved 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 pixel for a line. To have some space in between the lines we can't use more then 10 pixel height for the symbols.
We use fixed width fonts. To fit 22 Symbols on the 128 pixel wide screen, the symbols can't be wider than 5 pixel. Maybe you can work with half symbols - two places in the charset will than build one wide symbol.

 * Get 'Fony.exe'
 * Copy one of the existing *.fon files and work with this.
 * Change the pixels. Don't change width or height.
 * Export as *.bdf
 * 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. See hints in 'README.fonts' or the other 'dogm_font_data_.h' files.
 * Make a new entry in the font list in 'dogm_lcd_implementation.h' before the '#else // fall back'
    #elif defined( 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'
    ... || defined(DISPLAY_CHARSET_YOUR_NEW_FONT) ... )


Especially the Kana font should be revised by someone who knows what he/she does. I am only a west-European with very little knowledge about this script.