Browse Source

Add DISPLAY_CHARSET_HD44780_CYRILLIC as alternative in SanityCheck.h

and add some documentation - how to integrate a new font.
AnHardt 9 years ago
parent
commit
c5e0e29d23
2 changed files with 22 additions and 3 deletions
  1. 2
    2
      Marlin/SanityCheck.h
  2. 20
    1
      Marlin/fonts/README.fonts

+ 2
- 2
Marlin/SanityCheck.h View File

@@ -87,8 +87,8 @@
87 87
   /**
88 88
    * Required LCD language
89 89
    */
90
-  #if !defined(DOGLCD) && defined(ULTRA_LCD) && !defined(DISPLAY_CHARSET_HD44780_JAPAN) && !defined(DISPLAY_CHARSET_HD44780_WESTERN)
91
-    #error You must enable either DISPLAY_CHARSET_HD44780_JAPAN or DISPLAY_CHARSET_HD44780_WESTERN for your LCD controller.
90
+  #if !defined(DOGLCD) && defined(ULTRA_LCD) && !defined(DISPLAY_CHARSET_HD44780_JAPAN) && !defined(DISPLAY_CHARSET_HD44780_WESTERN)&& !defined(DISPLAY_CHARSET_HD44780_CYRILLIC)
91
+    #error You must enable either DISPLAY_CHARSET_HD44780_JAPAN or DISPLAY_CHARSET_HD44780_WESTERN  or DISPLAY_CHARSET_HD44780_CYRILLIC for your LCD controller.
92 92
   #endif
93 93
 
94 94
   /**

+ 20
- 1
Marlin/fonts/README.fonts View File

@@ -3,4 +3,23 @@ In Fony export the fonts to bdf-format. Maybe another one can edit them with Fon
3 3
 Then run make_fonts.bat what calls bdf2u8g.exe with the needed parameters to produce the .h files.
4 4
 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.
5 5
 
6
-Especially the Kana and Cyrillic fonts should be revised by someone who knows what he/she does. I am only a west-European with very little knowledge about this scripts.
6
+How to integrate a new font:
7
+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.
8
+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.
9
+
10
+ * Get 'Fony.exe'
11
+ * Copy one of the existing *.fon files and work with this.
12
+ * Change the pixels. Don't change width or height.
13
+ * Export as *.bdf
14
+ * Use 'bdf2u8g.exe' to produce the *.h file. Examples for the existing fonts are in 'make_fonts.bat'
15
+ * Edit the produced .h file to match our needs. See hints in 'README.fonts' or the other 'dogm_font_data_.h' files.
16
+ * Make a new entry in the font list in 'dogm_lcd_implementation.h' before the '#else // fall back'
17
+    #elif defined( DISPLAY_CHARSET_NEWNAME )
18
+      #include "dogm_font_data_yourfont.h"
19
+      #define FONT_MENU_NAME YOURFONTNAME
20
+    #else // fall-back
21
+ * Add your font to the list of permitted fonts in 'language_en.h'
22
+    ... || defined(DISPLAY_CHARSET_YOUR_NEW_FONT) ... )
23
+
24
+
25
+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.

Loading…
Cancel
Save