forked from flipperdevices/flipperzero-firmware
-
-
Notifications
You must be signed in to change notification settings - Fork 553
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
225 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include "available_fonts.h" | ||
#include "712serif/712serif.h" | ||
#include "bedstead/bedstead.h" | ||
#include "dpcomic/dpcomic.h" | ||
#include "funclimbing/funclimbing.h" | ||
#include "graph35pix/graph35pix.h" | ||
#include "karma_future/karma_future.h" | ||
#include "mode_nine/mode_nine.h" | ||
#include "pixelflag/pixelflag.h" | ||
#include "redhat_mono/redhat_mono.h" | ||
#include "zector/zector.h" | ||
|
||
const FONT_INFO* const available_fonts[AVAILABLE_FONTS_COUNT] = { | ||
&modeNine_15ptFontInfo, | ||
&_712Serif_24ptFontInfo, | ||
&bedstead_17ptFontInfo, | ||
&dPComic_18ptFontInfo, | ||
&funclimbingDemo_18ptFontInfo, | ||
&graph35pix_12ptFontInfo, | ||
&karmaFuture_14ptFontInfo, | ||
&pixelFlag_18ptFontInfo, | ||
&redHatMono_16ptFontInfo, | ||
&zector_18ptFontInfo}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
|
||
#include "font_info.h" | ||
|
||
#define AVAILABLE_FONTS_COUNT (10) | ||
|
||
extern const FONT_INFO* const available_fonts[AVAILABLE_FONTS_COUNT]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include "canvas_extensions.h" | ||
|
||
void canvas_draw_str_ex( | ||
Canvas* canvas, | ||
uint8_t x, | ||
uint8_t y, | ||
const char* text, | ||
size_t text_length, | ||
const FONT_INFO* const font) { | ||
const char* p_ch = text; | ||
char ch; | ||
size_t i = 0; | ||
uint8_t offset_x = x; | ||
uint8_t char_width = font->charInfo[0].width; | ||
uint8_t offset_x_inc = char_width + font->spacePixels; | ||
while(i < text_length && (ch = *p_ch) != 0) { | ||
if(ch >= font->startChar && ch <= font->endChar) { | ||
uint8_t char_index = ch - font->startChar; | ||
canvas_draw_xbm( | ||
canvas, | ||
offset_x, | ||
y, | ||
char_width, | ||
font->height, | ||
&font->data[font->charInfo[char_index].offset]); | ||
} | ||
|
||
offset_x += offset_x_inc; | ||
|
||
p_ch++; | ||
i++; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
#include <stdint.h> | ||
#include <gui/gui.h> | ||
#include <font_info.h> | ||
|
||
void canvas_draw_str_ex( | ||
Canvas* canvas, | ||
uint8_t x, | ||
uint8_t y, | ||
const char* text, | ||
size_t text_length, | ||
const FONT_INFO* const font); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.