Skip to content

Commit

Permalink
✨ feat: 完全外挂汉化字库
Browse files Browse the repository at this point in the history
  • Loading branch information
kalicyh committed Sep 30, 2024
1 parent ace5988 commit 65a9181
Show file tree
Hide file tree
Showing 20 changed files with 1,936 additions and 457 deletions.
3 changes: 1 addition & 2 deletions applications/main/momentum_app/momentum_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ bool momentum_app_apply(MomentumApp* app) {
if(!flipper_format_file_open_always(file, "/ext/subghz/assets/extend_range.txt"))
break;
if(!flipper_format_write_header_cstr(file, "Flipper SubGhz 设置文件", 1)) break;
if(!flipper_format_write_comment_cstr(
file, "是否允许扩展范围,可能会损坏你的设备"))
if(!flipper_format_write_comment_cstr(file, "是否允许扩展范围,可能会损坏你的设备"))
break;
if(!flipper_format_write_bool(
file, "use_ext_range_at_own_risk", &app->subghz_extend, 1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void momentum_app_scene_interface_graphics_pack_on_enter(void* context) {
app);
}

submenu_set_header(submenu, "选择资产包:");
submenu_set_header(submenu, "选择资源包:");

submenu_set_selected_item(submenu, app->asset_pack_index);

Expand Down
3 changes: 1 addition & 2 deletions applications/main/u2f/views/u2f_view.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ static void u2f_view_draw_callback(Canvas* canvas, void* _model) {
U2fModel* model = _model;

canvas_draw_icon(canvas, 8, 14, &I_Drive_112x35);
// canvas_set_font(canvas, FontSecondary);
canvas_set_custom_u8g2_font(canvas, kalicyh);
canvas_set_font(canvas, FontSecondary);

if(model->display_msg == U2fMsgNotConnected) {
canvas_draw_icon(canvas, 22, 15, &I_Connect_me_62x31);
Expand Down
17 changes: 5 additions & 12 deletions applications/services/gui/canvas.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <u8g2_glue.h>
#include <momentum/asset_packs_i.h>
#include <momentum/settings.h>
#include "kalicyh_font.h"

const CanvasFontParameters canvas_font_params[FontTotalNumber] = {
[FontPrimary] = {.leading_default = 12, .leading_min = 11, .height = 8, .descender = 2},
Expand Down Expand Up @@ -191,24 +190,19 @@ void canvas_set_font(Canvas* canvas, Font font) {
}
switch(font) {
case FontPrimary:
// u8g2_SetFont(&canvas->fb, u8g2_font_helvB08_tr);
canvas_set_custom_u8g2_font(canvas, kalicyh);
u8g2_SetFont(&canvas->fb, u8g2_font_helvB08_tr);
break;
case FontSecondary:
// u8g2_SetFont(&canvas->fb, u8g2_font_haxrcorp4089_tr);
canvas_set_custom_u8g2_font(canvas, kalicyh);
u8g2_SetFont(&canvas->fb, u8g2_font_haxrcorp4089_tr);
break;
case FontKeyboard:
// u8g2_SetFont(&canvas->fb, u8g2_font_profont11_mr);
canvas_set_custom_u8g2_font(canvas, kalicyh);
u8g2_SetFont(&canvas->fb, u8g2_font_profont11_mr);
break;
case FontBigNumbers:
// u8g2_SetFont(&canvas->fb, u8g2_font_profont22_tn);
canvas_set_custom_u8g2_font(canvas, kalicyh);
u8g2_SetFont(&canvas->fb, u8g2_font_profont22_tn);
break;
case FontBatteryPercent:
// u8g2_SetFont(&canvas->fb, u8g2_font_5x7_tr); //u8g2_font_micro_tr);
canvas_set_custom_u8g2_font(canvas, kalicyh);
u8g2_SetFont(&canvas->fb, u8g2_font_5x7_tr); //u8g2_font_micro_tr);
break;
default:
furi_crash();
Expand All @@ -223,7 +217,6 @@ void canvas_set_custom_u8g2_font(Canvas* canvas, const uint8_t* font) {
}

void canvas_draw_str(Canvas* canvas, int32_t x, int32_t y, const char* str) {
canvas_set_custom_u8g2_font(canvas, kalicyh);
furi_check(canvas);
if(!str) return;
x += canvas->offset_x;
Expand Down
1 change: 0 additions & 1 deletion applications/services/gui/elements.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <stdint.h>
#include <furi.h>
#include "canvas.h"
#include "kalicyh_font.h"

#ifdef __cplusplus
extern "C" {
Expand Down
422 changes: 0 additions & 422 deletions applications/services/gui/kalicyh_font.c

This file was deleted.

13 changes: 0 additions & 13 deletions applications/services/gui/kalicyh_font.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ static void power_unplug_usb_draw_callback(Canvas* canvas, void* _model) {
canvas_draw_icon(canvas, 0, (64 - 10), &I_Unplug_bg_bottom_128x10);

canvas_set_color(canvas, ColorWhite);
// canvas_set_font(canvas, FontPrimary);
canvas_set_custom_u8g2_font(canvas, kalicyh);
canvas_set_font(canvas, FontPrimary);
elements_multiline_text_aligned(
canvas, 64, 32, AlignCenter, AlignCenter, "现在可以安全地拔掉USB线了");
}
Expand Down
34 changes: 34 additions & 0 deletions assets/packs/Ikun/Fonts/BatteryPercent.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
Fontname: -Misc-Fixed-Medium-R-Normal--7-70-75-75-C-50-ISO10646-1
Copyright: Public domain font. Share and enjoy.
Glyphs: 95/1848
BBX Build Mode: 0
*/
const uint8_t u8g2_font_5x7_tr[841] U8G2_FONT_SECTION("u8g2_font_5x7_tr") =
"_\0\2\2\3\3\3\4\4\5\7\0\377\6\377\6\0\1\22\2/\3, \5\0\275\1!\6\261\261"
"\31)\42\7[\267IV\0#\12-\261\253\206\252\206\252\0$\12-\261[\65\330 \245\5%\11\64"
"\261\311 \366\6\1&\11,\261\213)V\61\5'\5\231\267\31(\7r\261S\315\0)\10r\261\211"
"\251R\0*\7k\261I\325j+\12-\261\315(\16\231Q\4,\7[\257S%\0-\6\14\265\31"
"\1.\6R\261\31\1/\7$\263\7\261\15\60\10s\261\253\134\25\0\61\7s\261K\262\65\62\12\64"
"\261S\61\203X\216\0\63\13\64\261\31\31$\215dR\0\64\12\64\261\215\252\32\61\203\4\65\12\64\261"
"\31\32l$\223\2\66\12\64\261S\31\254(\223\2\67\13\64\261\31\31\304\14b\6\21\70\12\64\261S"
"\61\251(\223\2\71\12\64\261SQ\246\15\222\2:\7j\261\31q\4;\10\63\257\263\221*\1<\10"
"k\261M\65\310 =\10\34\263\31\31\215\0>\11k\261\311 \203T\2\77\11s\261k\246\14\23\0"
"@\11\64\261SQ\335H\1A\11\64\261SQ\216)\3B\12\64\261Yq\244(G\2C\13\64\261"
"SQ\203\14bR\0D\11\64\261Y\321\71\22\0E\13\64\261\31\32\254\14\62\30\1F\13\64\261\31"
"\32\254\14\62\310\0G\12\64\261SQ\203\64\323\0H\10\64\261\211rL\63I\7s\261Y\261\65J"
"\13\64\261\7\31d\220\201L\12K\12\64\261\211*I\231\312\0L\14\64\261\311 \203\14\62\310`\4"
"M\11\64\261\211\343\210f\0N\10\64\261\211k\251\63O\11\64\261S\321\231\24\0P\12\64\261YQ"
"\216\224A\6Q\12<\257S\321\134I\243\0R\11\64\261YQ\216\324\14S\12\64\261S\61eT&"
"\5T\7s\261Y\261\13U\10\64\261\211\236I\1V\11\64\261\211\316$\25\0W\11\64\261\211\346\70"
"b\0X\12\64\261\211\62I\25e\0Y\10s\261IVY\1Z\12\64\261\31\31\304\66\30\1[\7"
"s\261\31\261\71\134\11$\263\311(\243\214\2]\7s\261\231\315\21^\5S\271k_\6\14\261\31\1"
"`\6R\271\211\1a\10$\261\33Q\251\2b\13\64\261\311 \203\25\345H\0c\7#\261\233\31\10"
"d\12\64\261\7\31\244\21e\32e\11$\261Sid\240\0f\11\64\261\255\312\231A\4g\11,\257"
"\33\61\251\214\6h\12\64\261\311 \203\25\315\0i\10s\261\313HV\3j\11{\257\315\260T\25\0"
"k\13\64\261\311 \203\224d*\3l\7s\261\221]\3m\10$\261IiH\31n\7$\261Y\321"
"\14o\10$\261SQ&\5p\11,\257YQ\216\224\1q\11,\257\33Q\246\15\2r\10$\261Y"
"Q\203\14s\10$\261\33\32\15\5t\12\64\261\313 \316\14\62\22u\7$\261\211f\32v\7c\261"
"IV\5w\7$\261\211r\34x\10$\261\211I\252\30y\11,\257\211\62\225%\0z\10$\261\31"
"\261\34\1{\10s\261MI\326 |\5\261\261\71}\12s\261\311 \252\230\42\0~\7\24\271K*"
"\1\0\0\0\4\377\377\0";
18 changes: 18 additions & 0 deletions assets/packs/Ikun/Fonts/BigNumbers.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
Fontname: ProFont22
Copyright: ProFont Distribution 2.2 - Generated by Fontographer 4.1.5
Glyphs: 18/256
BBX Build Mode: 0
*/
const uint8_t u8g2_font_profont22_tn[345] U8G2_FONT_SECTION("u8g2_font_profont22_tn") =
"\22\0\4\4\4\5\3\4\5\13\24\0\374\16\374\20\376\0\0\0\0\1< \5\0\210\34*\23\252\310"
"\234\4\12\22\42\204\211!#L$\22(\10\0+\15\252\250\234\4\312\350A!\201\62\2,\17\225L"
"\134\204\220 \62F\310\210i\302\0-\6&\354\34\30.\12D\236<D\240\20\1\0/\34KI<"
"%\24)P\244@\221\2E\12\24)P\244@\221\2E\12\24)\22\0\60\31\352\210\134\314\240\30T"
"\252\220\231##H\14\71c\250T\241\21h\214\0\61\15\352\210\234\4\212\252P\376\350A\1\62\21\352"
"\210\134\314\240\30TL\240\270a\363\331\203\2\63\27\352\210\134\314\240\30TL\240\70Q\304\12\16$V"
"h\4\32#\0\64\31\352\210\334\304\15#Uh\204\230!B\306\10\21$\344A\61\201\302\14\31\65\24"
"\352\210\34\36\34\24\210$\341@\11\211\25\32\201\306\10\0\66\25\352\210\134\314\34\31'\20I\12Q\305"
"hVh\4\32#\0\67\17\352\210\34\36\24\224\335\260\331\11\224#\0\70\31\352\210\134\314\240\30T\214"
"\230\10Ab\314\240\30T\214X\241\21h\214\0\71\25\352\210\134\314\240\30T\214f\245D$A(n"
"\310\31#\0:\15\244\236<D\240\20*\2\205\10\0\0\0\0\4\377\377\0";
45 changes: 45 additions & 0 deletions assets/packs/Ikun/Fonts/Keyboard.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
Fontname: ProFont11
Copyright: ProFont Distribution 2.2 - Generated by Fontographer 4.1.5
Glyphs: 96/256
BBX Build Mode: 2
*/
const uint8_t u8g2_font_profont11_mr[1203] U8G2_FONT_SECTION("u8g2_font_profont11_mr") =
"`\2\3\2\3\4\1\2\4\6\13\0\376\7\376\10\377\1{\3\42\4\226 \7\336\370\371\67\0!\12"
"\336\370\11iw\60\247\0\42\14\336\370\201$K\262$\347\23\0#\16\336\370\341$\32\244$\32\244$"
"g\5$\16\336\370\221pJ:\216I\247\61\207\0%\15\336\370\341!\351\242%\231\322SN&\16\336"
"\370a-\252\204\225\246L\311a\0'\11\336\370\221\264\316\67\0(\12\336\370\241\260\332\271\216\0)\12"
"\336\370\201\270\332\261\216\1*\14\336\370\11YR\232\222Z\316\14+\13\336\370\311i\66hi\316\0,"
"\11\336\370\371\42\252a\10-\10\336\370\271\355\34\1.\10\336\370\371$\352\4/\15\336\370\261\64L\303"
"\64L\303\64\5\60\16\336\370\341)K\42\245EJ\262h'\61\13\336\370\11\331\332m\320a\0\62\14"
"\336\370\341)K\303\306A\207\1\63\15\336\370\341)K\63\71\311\242\235\0\64\15\336\370)\241\226D\245"
"A\14w\30\65\15\336\370\321AI\207\70M\262h'\66\16\336\370\341)\35\242,\311\222,\332\11\67"
"\13\336\370\321A-V\353\24\0\70\16\336\370\341)K\262h\312\222,\332\11\71\16\336\370\341)K\262"
"$\213\206\64\332\11:\12\336\370YE\35\23u\2;\13\336\370\31\355\230\250\206!\0<\11\336\370I"
"as;\14=\13\336\370\331\6\35\30tF\0>\11\336\370\341\216\355$\0\77\14\336\370\341)K\303"
":\230S\0@\16\336\370\341)K\222\245\313\22\17\71\14A\20\336\370\11a\222%Q\226\14J\226d"
"\71\14B\20\336\370\321!\312\222,\31\242,\311\222!'C\13\336\370\341)K\322\266h'D\20\336"
"\370\321!\312\222,\311\222,\311\222!'E\16\336\370\321AI\323!J\323A\207\1F\15\336\370\321"
"AI\323!J\353\64\0G\16\336\370\341)K\322H\311\222,\332\11H\21\336\370\321,\311\222,\31"
"\224,\311\222,\207\1I\13\336\370\321AK\273\15:\14J\13\336\370IiK\226d\321NK\17\336"
"\370\321,\211*\231\230dQ-\207\1L\11\336\370\321\276\16:\14M\16\336\370\321,\261\364[\222%"
"Y\16\3N\20\336\370\321,\221\222NJ\226dI\226\303\0O\17\336\370\341)K\262$K\262$\213"
"v\2P\16\336\370\321!\312\222,\31\242\264N\3Q\17\336\370\341)K\262$K\262\244i\316\1R"
"\21\336\370\321!\312\222,\31\242,\311\222,\207\1S\15\336\370\341)K\342\71\311\242\235\0T\12\336"
"\370\321AK{\247\0U\20\336\370\321,\311\222,\311\222,\311\242\235\0V\20\336\370\321,\311\222,"
"J\262$Ls\12\0W\17\336\370\321,\311\222,\351\213%\313a\0X\20\336\370\321,\311\242$\254"
"DY\222\345\60\0Y\16\336\370\321,\311\222,J\302\264N\1Z\13\336\370\321A\15\273\16:\14["
"\12\336\370\21\61\355\253\216\0\134\14\336\370\201\64N\343\64N\343\64]\11\336\370\1\265\37u\10^\13"
"\336\370\11a\22e\71O\0_\7\336\370\371\343\60`\11\336\370\201\70\347'\0a\16\336\370\31\207$"
"K\262$\262\344\60\0b\16\336\370\321\352\20eI\226d\311\220\23c\14\336\370\31\247,I\343!\207"
"\1d\20\336\370Ii\64$Y\222%Y\64\344\60\0e\15\336\370\31\247,\31\224x\310a\0f\13"
"\336\370)Z\70\246\355\24\0g\17\336\370\31\207$K\262$\213\206\64\232\0h\17\336\370\321\352\20e"
"I\226dI\226\303\0i\12\336\370\11\71\246\66\356\4j\12\336\370\11\71\246\366&\2k\14\336\370\321"
"\246J\266E\265\34\6l\11\336\370a\265\307\235\0m\13\336\370\331\206(\351\177\207\1n\16\336\370\331"
"\22IJ\262$K\262\34\6o\14\336\370\31\247,\311\222,\332\11p\17\336\370\331\206(K\262$K"
"\206(M\1q\16\336\370\31\207$K\262$\213\206\264\2r\13\336\370\331\22IJ\322:\15s\13\336"
"\370\31\207$\236\223!'t\13\336\370\11i\70\246e\35\6u\15\336\370\331*Y\222%\221%\207\1"
"v\15\336\370\331*Y\224dI\230S\0w\12\336\370\331\222\376\247$'x\14\336\370\331JIX\211"
"\262\34\6y\16\336\370\331*Y\222%Y\64\244\321\4z\13\336\370\331\6\261q\320a\0{\13\336\370"
"\302\264\61N\233#\0|\11\336\370\221\264\277C\0}\13\336x\342\264\71L\33C\0~\11\336\370\31"
"\225\212\316\21\177\7\336\370\371\67\0\0\0\0\4\377\377\0";
Loading

0 comments on commit 65a9181

Please sign in to comment.