mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-26 16:32:06 +08:00
行車介面改用NotoSansCJK 字型
This commit is contained in:
Binary file not shown.
Binary file not shown.
+5
-5
@@ -536,9 +536,9 @@ static void ui_init(UIState *s) {
|
||||
assert(s->font_sans_semibold >= 0);
|
||||
s->font_sans_bold = nvgCreateFont(s->vg, "sans-bold", "../assets/fonts/opensans_bold.ttf");
|
||||
assert(s->font_sans_bold >= 0);
|
||||
s->font_miui_regular = nvgCreateFont(s->vg, "miui-regular", "/system/fonts/Miui-Regular.ttf");
|
||||
s->font_miui_regular = nvgCreateFont(s->vg, "miui-regular", "../assets/fonts/NotoSansCJKtc-Regular.otf");
|
||||
assert(s->font_miui_regular >= 0);
|
||||
s->font_miui_bold = nvgCreateFont(s->vg, "miui-bold", "/system/fonts/Miui-Bold.ttf");
|
||||
s->font_miui_bold = nvgCreateFont(s->vg, "miui-bold", "../assets/fonts/NotoSansCJKtc-Bold.otf");
|
||||
assert(s->font_miui_bold >= 0);
|
||||
|
||||
assert(s->img_wheel >= 0);
|
||||
@@ -1542,12 +1542,12 @@ static int bb_ui_draw_measure(UIState *s, const char* bb_value, const char* bb_
|
||||
dx = (int)(bb_uomFontSize*2.5/2);
|
||||
}
|
||||
//print value
|
||||
nvgFontFace(s->vg, "sans-semibold");
|
||||
nvgFontFace(s->vg, "miui-bold");
|
||||
nvgFontSize(s->vg, bb_valueFontSize*2.5);
|
||||
nvgFillColor(s->vg, bb_valueColor);
|
||||
nvgText(s->vg, bb_x-dx/2, bb_y+ (int)(bb_valueFontSize*2.5)+5, bb_value, NULL);
|
||||
//print label
|
||||
nvgFontFace(s->vg, "sans-regular");
|
||||
nvgFontFace(s->vg, "miui-regular");
|
||||
nvgFontSize(s->vg, bb_labelFontSize*2.5);
|
||||
nvgFillColor(s->vg, bb_labelColor);
|
||||
nvgText(s->vg, bb_x, bb_y + (int)(bb_valueFontSize*2.5)+5 + (int)(bb_labelFontSize*2.5)+5, bb_label, NULL);
|
||||
@@ -1558,7 +1558,7 @@ static int bb_ui_draw_measure(UIState *s, const char* bb_value, const char* bb_
|
||||
int ry = bb_y + (int)(bb_valueFontSize*2.5/2)+25;
|
||||
nvgTranslate(s->vg,rx,ry);
|
||||
nvgRotate(s->vg, -1.5708); //-90deg in radians
|
||||
nvgFontFace(s->vg, "sans-regular");
|
||||
nvgFontFace(s->vg, "miui-regular");
|
||||
nvgFontSize(s->vg, (int)(bb_uomFontSize*2.5));
|
||||
nvgFillColor(s->vg, bb_uomColor);
|
||||
nvgText(s->vg, 0, 0, bb_uom, NULL);
|
||||
|
||||
Reference in New Issue
Block a user