Tutorial Mi Band 4/5 | How to modify Font file

MagicalUnicorn

Moderator
Staff member
Moderator
Developer
Joined
Jul 4, 2018
Messages
4,712
Likes
4,122
Points
248
#61
IMPORTANT
In the decompiled Font folders, edit all pictures you want.
Do NOT add/delete any picture !
★ Do NOT change size of pictures !


so what is edit means?...
Also, what is the filenames stands for?
how can I add hebrew to the font (I think it's already there but I cca't really choose it, band still in English)
"Do NOT add/delete any picture !" is a mistake, only for Resources :).

About filename, it's UTF-8 code, with in more character width in pixel for the big font.

Hebrew is already present in small font (not in big).
With Mi Band 4 you can force language in Arabic and install custom Hebrew Resources.
With Mi Band 5 it will be displayed without any problem using smartband in English (but in LTR).
 

nirh216

New member
Joined
Jun 21, 2020
Messages
16
Likes
1
Points
3
#62
"Do NOT add/delete any picture !" is a mistake, only for Resources :).

About filename, it's UTF-8 code, with in more character width in pixel for the big font.

Hebrew is already present in small font (not in big).
With Mi Band 4 you can force language in Arabic and install custom Hebrew Resources.
With Mi Band 5 it will be displayed without any problem using smartband in English (but in LTR).
The case it showing in Hebrew but LTR.
I have a mi band 5 bracelet, and I want to create a res / font in Hebrew in RTL, I don't know how, and how is the direction can be used (maybe override Arabic) but still I don't know..
I'm an Android dev so I have knowlage.
Can you help on what I need to change, add so I can make a custom Font/Resources matches FW for mi band 5?

Thanks!!!
 

nirh216

New member
Joined
Jun 21, 2020
Messages
16
Likes
1
Points
3
#63
so what is edit means?...

Edit means that we have to edit the images like we do for customizing resources^^.(you will not understand until you know the basics of them;)
-------------
I cca't really choose it, band still in English)

you have to forces language to herbew(or in short on the language file the developer has changed the lang. to herbew:).
Thanks for your reply, I really didn't understand any of what you said.
I want to read some more so I can understand about Mi band 5 and how the RES & Font works..
Already read about packing/unpack font & res, but there's nothing on how to change those..
I'm an Androiddev so I have some knowlage about those things, but really can't understand how it all works..
 

N0K0

New member
Joined
Aug 31, 2020
Messages
4
Likes
0
Points
1
#64
Hello,
I am interested in adding Khmer language font into my mi band 4 but I could not find enough tutorial and instructions how, so I decide to seek some help. Currently, I have done extracting and packing the font without any problem (not yet tested upload into the band) but there is a few thing i need some advise.
  1. How to extract character? Is that I need to manually type each character into Photoshop and then export it one by one into a bitmap format? and which image size it should be?
  2. How to map bitmap image to the character? I found bitmap image inside bmp-mib4 and its name is in some format but I am not sure what it is.
 

chienkd

Active member
Joined
Jul 1, 2018
Messages
129
Likes
56
Points
33
#67
To unpack V2 font, you can use my script... if you also need to pack the font back, then I can prepare it.

mi4font2.py

The main difference between font V1 and V2 is that the "bigger" font (24x18) is fixed-width. The second part of the font file (16x20) is the same as V1.

Anyway the character resolution is effectivelly even smaller... 18x18 and 10x20

View attachment 8058 View attachment 8059
View attachment 8061 View attachment 8062

After unpacknig there will be 2 folders: bmp (24x18) and latin (16x20).
Hi my friend.
I can unpack font, modified character for font v2.
But i can't pack them back.
Please help!
 

He5am2099

Well-known member
Joined
Jan 31, 2020
Messages
560
Likes
530
Points
103
#70
after hours of dealing with XAMPP, I finally converted a ttf font to bmp files, thanks a million for this useful application, (checked out the codes too, amazing job ! )

so now I have one question, in the file "font_array.txt", if we add other characters for other languages and their specific codes, then we can be able to convert any ttf file for any language to bmp files, correct ?
Hello.Sorry to bother you, but can you tell us what you did in xampp that worked? we wanted to also create a custom font and we've already unpacked the font files, but we're stuck in converting our font (ttf) to 1 bit bmp. Can you pease tell us what to do in xampp? thank you
 

vahidgh

New member
Joined
Mar 20, 2021
Messages
11
Likes
5
Points
3
#73
Hi, I wanted to make a very popular Persian font "Iran sans" for this watch amazift mi band 5. Whenever a Persian notification is received, display it on the watch amazift mi band 5 in the font that I created. Thank you for your help.
 

Attachments

dnee

Member
Joined
Aug 20, 2019
Messages
27
Likes
15
Points
8
#75
First you must install
- Visual C runtime (there have link before download WAMP)
- WAMP

after you install you will saw Wamp Icon in the system tray.

Next, Extracted file to: C:/wamp/www/mb4 (create folder mb4 in www)

File: txt.php => Main file of this program
File: font_array.txt => This is UTF-8 code you can copy this from Unicode/UTF-8-character table
Folder: fonts => this will generate bmp font image to replace in mb4 font.

First copy ttf font file to " C:/wamp/www/mb4/ "
Seconds edit txt.php => $font = 'REAL_Font_Path.ttf'; to $font = 'C:/wamp/www/mb4/YOUR_FONT_NAME.ttf';

Third open google chrome: http://localhost/mb4/txt.php
When running completed bmp file font will be generated in fonts folder.
 

Trusted Store

Members online

No members online now.

Our Telegram Channel

Which color of official strap would you like to buy for your Mi Band 3?

  • Black

    Votes: 2,156 52.8%
  • Deep Blue

    Votes: 1,198 29.3%
  • Redish Orange

    Votes: 729 17.9%

Forum statistics

Threads
2,454
Messages
40,621
Members
211,993
Latest member
pepsican100
Top