Skip to content

Commit

Permalink
#100 custom fonts
Browse files Browse the repository at this point in the history
doxygen
  • Loading branch information
igors48 committed Jun 26, 2022
1 parent a341b58 commit 1a9db91
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core/component/textComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bool textComponentIsStateModified(Component *component)
TextState *state = (TextState *)component->state;
(state->provide)(state);
return (strcmp(state->content, state->_content) != 0) ||
(state->size != state->_size) || // todo is these checks (size and font) needed
(state->size != state->_size) || // todo is these checks (size and font) needed #108
(state->fontColor != state->_fontColor) ||
(state->backColor != state->_backColor) ||
(state->font != state->_font);
Expand Down
10 changes: 6 additions & 4 deletions src/core/watch/tft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
* @author Igor Usenko (github: igors48)
* @brief TFT API implementation based on sprite
*
* Holds in memory full-screen sprite
* All drawings are performed on that sprite
* When all is drawn - sprite is pushed to video memory
* Also maintains the dirty flag to prevent not needed pushes
* Holds in memory full-screen sprite.
* <br>
* All drawings are performed on that sprite.
* When all is drawn - sprite is pushed to video memory.
* <br>
* Also maintains the dirty flag to prevent not needed pushes.
*/
#include "tft.hpp"
#include "ttgo.hpp"
Expand Down
6 changes: 6 additions & 0 deletions src/core/watch/tft.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
*/
#pragma once

/**
* @brief Code of small size custom font
*/
const unsigned char SMALL_FONT = 128;
/**
* @brief Code of medium size custom font
*/
const unsigned char MEDIUM_FONT = 129;

typedef struct
Expand Down

0 comments on commit 1a9db91

Please sign in to comment.