My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

u8glib-bdf2u8g.patch 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --- tools/font/bdf2u8g/bdf2u8g.c 2017-04-08 01:04:48.000000000 -0400
  2. +++ tools/font/bdf2u8g/bdf2u8g.c 2018-02-24 17:24:26.368926703 -0500
  3. @@ -175,9 +175,9 @@
  4. for( i = 0; i < data_pos; i++ )
  5. {
  6. #ifdef BDF2U8G_COMPACT_OUTPUT
  7. - fprintf(out_fp, "%d", data_buf[i]);
  8. + fprintf(out_fp, "0x%02x", data_buf[i]);
  9. #else
  10. - fprintf(out_fp, "%3d", data_buf[i]);
  11. + fprintf(out_fp, "0x%02x", data_buf[i]);
  12. #endif
  13. if ( i+1 != data_pos )
  14. fprintf(out_fp, ",");
  15. @@ -484,7 +484,8 @@
  16. int bdf_char_max_y;
  17. int bdf_char_min_y;
  18. -int bdf_delta_x; /* DWIDTH arg 1 */
  19. +int bdf_delta_x_default = -1;
  20. +int bdf_delta_x = -1; /* DWIDTH arg 1 */
  21. int bdf_delta_max_x;
  22. int bdf_delta_min_x;
  23. int bdf_delta_y; /* DWIDTH arg 2 */
  24. @@ -1095,6 +1096,22 @@
  25. bdf_char_ascent = bdf_char_height + bdf_char_y;
  26. //printf("h:%d w:%d ascent: %d\n", bdf_char_height, bdf_char_width, bdf_char_ascent);
  27. }
  28. + else if ( strcmp(p_buf, "CHARS") == 0 )
  29. + {
  30. + if (bdf_delta_x < 0) {
  31. + bdf_delta_x = 0;
  32. + }
  33. + if (bdf_delta_x_default < 0) {
  34. + bdf_delta_x_default = bdf_delta_x;
  35. + }
  36. + }
  37. + else if ( strcmp(p_buf, "STARTCHAR") == 0 )
  38. + {
  39. + if (bdf_delta_x_default < 0) {
  40. + bdf_delta_x_default = 0;
  41. + }
  42. + bdf_delta_x = bdf_delta_x_default;
  43. + }
  44. else if ( strcmp(p_buf, "BITMAP") == 0 )
  45. {
  46. bdf_line_state = BDF_LINE_STATE_BITMAP;