Skip to content

Commit

Permalink
Font controlled from example
Browse files Browse the repository at this point in the history
  • Loading branch information
rgujju committed Nov 29, 2022
1 parent cfc5c28 commit 820e771
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions examples/Youtube_Stats/Youtube_Stats.ino
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,28 @@ void setup()
#ifdef DESIGN_1
/* Show youtube logo */
Paperdink.epd.drawBitmap(100, 55, youtube_logo, youtube_logo_width, youtube_logo_height, GxEPD_BLACK);
if(Paperdink.epd.epd2.hasColor){
Paperdink.epd.drawBitmap(100, 55, youtube_logo_red, youtube_logo_width, youtube_logo_height, GxEPD_RED);
if(Paperdink.has_color){
Paperdink.epd.drawBitmap(100, 55, youtube_logo_red, youtube_logo_width, youtube_logo_height, Paperdink.color);
}

/* Print name of the channel */
Paperdink_UI.display_text(Paperdink.epd, 0, 130, YOUTUBE_CHANNEL_NAME, 400, 50, Paperdink_UI.font_med_bold);
Paperdink_UI.display_text_center(Paperdink.epd, 0, 130, YOUTUBE_CHANNEL_NAME, 400, 50, &PAPERDINK_FONT_MED_BOLD);

#elif DESIGN_2
/* Show youtube icon */
Paperdink.epd.drawBitmap(50, 60, youtube_icon, youtube_icon_width, youtube_icon_height, GxEPD_BLACK);
if(Paperdink.epd.epd2.hasColor){
Paperdink.epd.drawBitmap(50, 60, youtube_icon_red, youtube_icon_width, youtube_icon_height, GxEPD_RED);
if(Paperdink.has_color){
Paperdink.epd.drawBitmap(50, 60, youtube_icon_red, youtube_icon_width, youtube_icon_height, Paperdink.color);
}

/* Print name of the channel */
Paperdink_UI.display_text(Paperdink.epd, 170, 65, YOUTUBE_CHANNEL_NAME, 0, 0, Paperdink_UI.font_med_bold);
Paperdink_UI.display_text(Paperdink.epd, 170, 100, DESIGN_2_STRING, 0, 0, Paperdink_UI.font_sml_bold);
Paperdink_UI.display_text_center(Paperdink.epd, 170, 65, YOUTUBE_CHANNEL_NAME, 0, 0, &PAPERDINK_FONT_MED_BOLD);
Paperdink_UI.display_text_center(Paperdink.epd, 170, 100, DESIGN_2_STRING, 0, 0, &PAPERDINK_FONT_SML_BOLD);

#endif

/* Display number of subscribers and views */
Paperdink_Youtube.font = &PAPERDINK_FONT_MED;
Paperdink_Youtube.display_subscribers_med(Paperdink.epd, 0, 170, 400, 50);
Paperdink_Youtube.display_views_med(Paperdink.epd, 0, 220, 400, 50);

Expand Down

0 comments on commit 820e771

Please sign in to comment.