Skip to content

Commit 1b4673e

Browse files
authored
Closing #165 (#166)
1 parent 6315ccc commit 1b4673e

34 files changed

+225
-121
lines changed

application.fam

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ App(
1515
],
1616
stack_size=2 * 1024,
1717
order=20,
18-
fap_version="2.23",
18+
fap_version="2.3",
1919
fap_author="Alexander Kopachov (@akopachov)",
2020
fap_description="Software-based TOTP authenticator for Flipper Zero device",
2121
fap_weburl="https://github.com/akopachov/flipper-zero_authenticator",
@@ -38,5 +38,8 @@ App(
3838
Lib(
3939
name="roll_value",
4040
),
41+
Lib(
42+
name="fonts",
43+
),
4144
],
4245
)

features_config.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,3 @@
3434
#ifndef TOTP_TARGET_FIRMWARE
3535
#define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_OFFICIAL_STABLE
3636
#endif
37-
38-
// List of available font for TOTP code
39-
#define TOTP_FONT_MODENINE (1)
40-
#define TOTP_FONT_REDHATMONO (2)
41-
#define TOTP_FONT_BEDSTEAD (3)
42-
#define TOTP_FONT_ZECTOR (4)
43-
#define TOTP_FONT_712SERIF (5)
44-
#define TOTP_FONT_GRAPH35PIX (6)
45-
#define TOTP_FONT_KARMAFUTURE (7)
46-
#define TOTP_FONT_FUNCLIMBING (8)
47-
#define TOTP_FONT_DPCOMIC (9)
48-
#define TOTP_FONT_PIXELFLAG (10)
49-
50-
// End of list
51-
52-
// Active font for TOTP codes
53-
#ifndef TOTP_FONT
54-
#define TOTP_FONT TOTP_FONT_MODENINE
55-
#endif
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -931,6 +931,7 @@ const FONT_CHAR_INFO _712Serif_24ptDescriptors[] = {
931931

932932
/* Font information for 7:12 Serif 24pt */
933933
const FONT_INFO _712Serif_24ptFontInfo = {
934+
"712 Serif",
934935
14, /* Character height */
935936
'-', /* Start character */
936937
'Y', /* End character */

lib/fonts/available_fonts.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#include "available_fonts.h"
2+
#include "712serif/712serif.h"
3+
#include "bedstead/bedstead.h"
4+
#include "dpcomic/dpcomic.h"
5+
#include "funclimbing/funclimbing.h"
6+
#include "graph35pix/graph35pix.h"
7+
#include "karma_future/karma_future.h"
8+
#include "mode_nine/mode_nine.h"
9+
#include "pixelflag/pixelflag.h"
10+
#include "redhat_mono/redhat_mono.h"
11+
#include "zector/zector.h"
12+
13+
const FONT_INFO* const available_fonts[AVAILABLE_FONTS_COUNT] = {
14+
&modeNine_15ptFontInfo,
15+
&_712Serif_24ptFontInfo,
16+
&bedstead_17ptFontInfo,
17+
&dPComic_18ptFontInfo,
18+
&funclimbingDemo_18ptFontInfo,
19+
&graph35pix_12ptFontInfo,
20+
&karmaFuture_14ptFontInfo,
21+
&pixelFlag_18ptFontInfo,
22+
&redHatMono_16ptFontInfo,
23+
&zector_18ptFontInfo};

lib/fonts/available_fonts.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#pragma once
2+
3+
#include "font_info.h"
4+
5+
#define AVAILABLE_FONTS_COUNT (10)
6+
7+
extern const FONT_INFO* const available_fonts[AVAILABLE_FONTS_COUNT];
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,7 @@ const FONT_CHAR_INFO bedstead_17ptDescriptors[] = {
10471047

10481048
/* Font information for Bedstead 17pt */
10491049
const FONT_INFO bedstead_17ptFontInfo = {
1050+
"Bedstead",
10501051
16, /* Character height */
10511052
'-', /* Start character */
10521053
'Y', /* End character */
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,7 @@ const FONT_CHAR_INFO dPComic_18ptDescriptors[] = {
11051105

11061106
/* Font information for DPComic 18pt */
11071107
const FONT_INFO dPComic_18ptFontInfo = {
1108+
"DP Comic",
11081109
17, /* Character height */
11091110
'-', /* Start character */
11101111
'Y', /* End character */

0 commit comments

Comments
 (0)