Browse Source

Moves the font folder into the buildroot

pull/1/head
João Brázio 8 years ago
parent
commit
4f191a384b
No known key found for this signature in database GPG Key ID: F62CFD37DFFDB540
  1. 30
      Marlin/fonts/README.md
  2. BIN
      Marlin/fonts/bdf2u8g.exe
  3. 0
      buildroot/share/fonts/HD44780_C.fon
  4. 0
      buildroot/share/fonts/HD44780_J.fon
  5. 0
      buildroot/share/fonts/HD44780_W.fon
  6. 0
      buildroot/share/fonts/ISO10646-1.fon
  7. 0
      buildroot/share/fonts/ISO10646-4_Greek.fon
  8. 0
      buildroot/share/fonts/ISO10646-5_Cyrillic.fon
  9. 0
      buildroot/share/fonts/ISO10646_CN.fon
  10. 0
      buildroot/share/fonts/ISO10646_Kana.fon
  11. 0
      buildroot/share/fonts/Marlin_symbols.fon
  12. 20
      buildroot/share/fonts/README.md
  13. 0
      buildroot/share/fonts/make_fonts.bat

30
Marlin/fonts/README.md

@ -1,30 +0,0 @@
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](http://hukka.ncn.fi/?fony)
- 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:
```cpp
#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'
```cpp
... || ENABLED(DISPLAY_CHARSET_YOUR_NEW_FONT) ... )
```

BIN
Marlin/fonts/bdf2u8g.exe

Binary file not shown.

0
Marlin/fonts/HD44780_C.fon → buildroot/share/fonts/HD44780_C.fon

0
Marlin/fonts/HD44780_J.fon → buildroot/share/fonts/HD44780_J.fon

0
Marlin/fonts/HD44780_W.fon → buildroot/share/fonts/HD44780_W.fon

0
Marlin/fonts/ISO10646-1.fon → buildroot/share/fonts/ISO10646-1.fon

0
Marlin/fonts/ISO10646-4_Greek.fon → buildroot/share/fonts/ISO10646-4_Greek.fon

0
Marlin/fonts/ISO10646-5_Cyrillic.fon → buildroot/share/fonts/ISO10646-5_Cyrillic.fon

0
Marlin/fonts/ISO10646_CN.fon → buildroot/share/fonts/ISO10646_CN.fon

0
Marlin/fonts/ISO10646_Kana.fon → buildroot/share/fonts/ISO10646_Kana.fon

0
Marlin/fonts/Marlin_symbols.fon → buildroot/share/fonts/Marlin_symbols.fon

20
buildroot/share/fonts/README.md

@ -0,0 +1,20 @@
# Marlin fonts
## Author and license
The original author of the following font files is [A. Hardtung](https://github.com/AnHardt).
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
- HD44780_C.fon ([fe2bd23](https://github.com/MarlinFirmware/Marlin/commit/fe2bd237d556439499dfdee852c1550c7a16430a))
- HD44780_J.fon ([fe2bd23](https://github.com/MarlinFirmware/Marlin/commit/fe2bd237d556439499dfdee852c1550c7a16430a))
- HD44780_W.fon ([fe2bd23](https://github.com/MarlinFirmware/Marlin/commit/fe2bd237d556439499dfdee852c1550c7a16430a))
- ISO10646-1.fon ([be79235](https://github.com/MarlinFirmware/Marlin/commit/be79235ef255a5c42fd385820447ec351f23b9b1))
- ISO10646_5_Cyrillic.fon ([fe2bd23](https://github.com/MarlinFirmware/Marlin/commit/fe2bd237d556439499dfdee852c1550c7a16430a))
- ISO10646_CN.fon ([6b1b718](https://github.com/MarlinFirmware/Marlin/commit/6b1b71837c98ceab55db7433357a13cd829d1ede))
- ISO10646_Kana.fon ([fe2bd23](https://github.com/MarlinFirmware/Marlin/commit/fe2bd237d556439499dfdee852c1550c7a16430a))
- Marlin_symbols.fon ([fe2bd23](https://github.com/MarlinFirmware/Marlin/commit/fe2bd237d556439499dfdee852c1550c7a16430a))
Any additional changes to these font files being distributed with Marlin are copyrighted under the terms of the [GPLv3](http://www.gnu.org/licenses/gpl-3.0.txt) license.
## Documentation

0
Marlin/fonts/make_fonts.bat → buildroot/share/fonts/make_fonts.bat

Loading…
Cancel
Save