Hi all,
I would like to use my favourite Chinese fonts for reading in my MIX2S and thus I did the following:
1. Fastboot boot to TWRP 3.2.3
2. Copy fonts from USB-OTG to system/fonts to replace the MIUI*.ttf
3. Chmod MIUI*.ttf to 644
4. Check file size of MIUI*.ttf via terminal to confirm the files are replaced indeed
However after I reboot to system, it is still showing the default fonts from MIUI.
If I install Magisk via ADB sideload, the replacement fonts are showing correctly.
Any idea? Thanks a lot!
up
I found a different solution from when I just copied the folder with the fonts I wanted all renamed by a default to the system / fonts folder, it used to be fine, today in MiUi 10 it does not.
I got an installation of Emoji Unicode via TWRP, I changed NotoColorEmoji to one of my liking and I added my standardized source pack properly renamed with the name of the fonts that MiUi uses and it worked, I'm satisfied, this way is the most efficient to change cell phone fonts
Fonts are specified in the file /system/etc/fonts.xml, Chinese fonts are defined by "zh-Hans"/"zh-Hant" family.
All fonts withohut names are added to the default list. Fonts are chosen based on a match: full BCP-47 language tag including script, then just language, and finally order (the first font containing the glyph).
Order of appearance is also the tiebreaker for weight matching. This is the reason why the 900 weights of Roboto precede the 700 weights - we prefer the former when an 800 weight is requested. Since bold spans effectively add 300 to the weight, this ensures that 900 is the bold paired with the 500 weight, ensuring adequate contrast.
Click to expand...
Click to collapse
So to change how Chinese font looks, you need to update fonts under family lang="zh-Hans"/"zh-Hant", miui family I guess is used by MIUI system wide while normal apps do not use miui family.
Related
This solution uses a font I created by doing a LOT of copy and paste from several different fonts. The following apps are required for best results:
- Emoji Codec Pro (pay app - well worth it)
- MultiLing Keyboard (free app - best keyboard I've used - counterpart to Emoji Codec)
- FontChanger - (free app)
and the attached font.
I'm assuming your phone is rooted and you have a file browser that lets you write to your SDCARD.
Instructions:
- Install apps
- NOTE: a folder called ".fontchanger" will be on your SDCARD
- Copy the attached font to ".fontchanger" folder
- Open FontChanger app and select the new font.
- Reboot and done.
- Use the MultiLing Keyboard to enter emojis. They will be black and white in the text box, but they will be shown in color if your Emoji plugin supports them. I use Handcent, and most of the Emojis show in color. The ones not included in Handcent plugin are in black and white.
NOTE: These emojis are black and white, but at least they are now a part of your operating system.
NOTE: I'm an American user so I didn't copy over all the Arabic, Chinese, Japanese, and Korean symbols (yet). My work came from some of the fonts on this forum, as well as from this site: http://www.alanwood.net/unicode/fonts-east-asian.html#babelstonehan
NOTE: At first I had problems with some of the emoji solutions on this forum. Aside from some characters not showing up, I also noticed that the font in many of my menus was enlarged and cut off on top. I have fixed this as well as adding every emoji used by Emoji Codec Pro.
FINAL NOTE: I've noticed that some of the emojis in Emoji Codec Pro do not correspond with what you see when you type. I've double checked many of the character mappings so I know they are accurate. Please let me know if you find a character mapping that is definitely not accurate. Please include the character code (decimal or hex). Thanks!
I'd be glad to know how this turns out for you all. Please post your results if you get a chance.
I'm rooted and running stock Sammy Rom and want to change the system Font without using an app which hogs memory. I'd like to add new fonts to the existing list under display. I've read this can be done using the system/display folder but I can't find it. What are the technicalities of adding fonts?
It'd also be nice to be able to tweak/scale the font size (in pixels) and with more options than the stand list. Is this also possible?
Edit: Dohhhh, didn't even see the 'Get Fonts Online' option in the settings menu. What a plank......I'd delete the question if I could.
Saying that I'd still like to install Google Now's 'Roboto' italic natively rather than through a font changer. It's not listed in the Play Store as a 'Flipfont'.
About
In this guide I will be telling you about how to create your own device mods like this. This involves using an engine built into Android Nougat. There is no root required.
Prerequisites
- Apktool installed (official guide here)
- The apk of the app you wish to modify (ex: SystemUI.apk) (system dump here; USE WINRAR AS 7z DOESN'T EXTRACT RIGHT)
- Android Studio
- Basic knowledge of apk guts
- Template RRO project
- optional: Finished Example Project (for reference)
Tutorial
The first step is to decompile your target APK so we can see what options we can change. For this tutorial, I am going to be modding SystemUI.apk.
"apktool d SystemUI.apk"
After it finishes, go to "SystemUI/res/values", as this will be where we change most things.
Here we can see files like "bools.xml, strings.xml, integers.xml, etc..."
Let's look in "bools.xml".
I see a line in here that mentions lock screen rotation:
"<item type="bool" name="config_enableLockScreenRotation">@android:bool/config_enableLockScreenTranslucentDecor</item>"
For this tutorial, let's change this value, as it is easy to change, and we can visually see this change.
It looks like this boolean is enabled if "config_enableLockScreenTranslucentDecor" is enabled. To override this, we have to change it to "true" instead.
Now that we know what we are changing, let's open up the "RRO_Template" project in android studio.
First navigate to the Gradle Scripts and select the "build.gradle" for the "(Module: app)"
Here lets change some variables. First is the "theme_name". Let's change it to "Lockscreen Rotation"
Next is "theme_id". Let's make it "com.mod.lockscreen_rotation"
We don't need to mess with "priority"
Last is the "package_id" Since default is the id for the SystemUI, we don't have to change anything. If you need to find this for another app, look in the decompiled APKs AndroidManifest.xml under "package="com.app.id""
Next, navigate to the res folder. If you remember, our "bools.xml" file is under "res/values/bools.xml", so let's add that file.
We can delete the sample "strings.xml" as we don't need to change anything there, and add the "bools.xml" file.
Inside of the newly created XML file, we should see a setup like this (if not add it):
"<?xml version="1.0" encoding="utf-8"?>
<resources></resources>"
Looking back at the setting we want to change, it's "<item type="bool" name="config_enableLockScreenRotation">@android:bool/config_enableLockScreenTranslucentDecor</item>". So let's add that line.
But since we are overriding the value to true, it will now look like this :"<item type="bool" name="config_enableLockScreenRotation">true</item>"
And that's it for the value changing!
Now let's go build the APK. Press "Alt + B" to bring up the Build menu and press "Build APK"
Click "Show In Folder" on the bottom right after it compiles to see the APK.
Put this on your phone and install the APK.
Since we modified the SystemUI.apk, we need to reboot to see the changes.
Now, lets try going to the lock screen and rotating the screen. It should rotate!
Congratulations! You made a mod / theme!
If you have any questions, please ask. I will try to help if I am available. I have classes starting in a few days so I may be busy. Enjoy the guide!
Hello tytydraco,
Not sure if my problem is totally related to your posted thread but it sounds like you are very knowledgeable on Galaxy theming! I have a rooted Galaxy S8 and have merged/moded different themes from the Theme store, such as using another theme’s icon pack or wallpaper by swapping them out of their respective .apk files and implementing them with success!
My problem is with a theme’s "InCallUI" (accept, reject, hangup icons in phone dialer) after adding cool graphic .png icons (then changing to .qmg) it works flawlessly, however every time I restart my phone or a Samsung system app is updated, they revert back to those default Samsung cartoony icons. I then have to apply stock theme then re-apply customized theme to get icons back. This process also changes/breaks 3 or 4 other theming aspects, which are not affected by restarts, that I have to re-adjust!
Not only have I altered the theme’s “base.apk” in /Data/App/MyTheme folder, but also the theme’s InCallUI.apk and placed into; Data/Overlays/Style/Mytheme folder, then changed permissions to "rwx r-- r-w". I use these permissions because all the other apk's in this folder use them. I have even tried using different theme’s InCallUI.apk, whose icons remain after restart, by just changing the icons and renaming to my theme….but to no avail, same problem!
I know this all sounds really OCD, like probably most of us within these forums, but it’s getting to be a real pain in darse to constantly have to change everything back again every restart if I want to maintain my theme!
So if I may poach upon your smart nature, do you know if there is a configuration file/folder that can be edited/altered to make those “InCallUI” icons stick upon a restart?
Any advise or corrections in what I'm doing would be greatly appreciated!
Thanks in advance.
eltoro5 said:
Hello tytydraco,
Not sure if my problem is totally related to your posted thread but it sounds like you are very knowledgeable on Galaxy theming! I have a rooted Galaxy S8 and have merged/moded different themes from the Theme store, such as using another theme’s icon pack or wallpaper by swapping them out of their respective .apk files and implementing them with success!
My problem is with a theme’s "InCallUI" (accept, reject, hangup icons in phone dialer) after adding cool graphic .png icons (then changing to .qmg) it works flawlessly, however every time I restart my phone or a Samsung system app is updated, they revert back to those default Samsung cartoony icons. I then have to apply stock theme then re-apply customized theme to get icons back. This process also changes/breaks 3 or 4 other theming aspects, which are not affected by restarts, that I have to re-adjust!
Not only have I altered the theme’s “base.apk” in /Data/App/MyTheme folder, but also the theme’s InCallUI.apk and placed into; Data/Overlays/Style/Mytheme folder, then changed permissions to "rwx r-- r-w". I use these permissions because all the other apk's in this folder use them. I have even tried using different theme’s InCallUI.apk, whose icons remain after restart, by just changing the icons and renaming to my theme….but to no avail, same problem!
I know this all sounds really OCD, like probably most of us within these forums, but it’s getting to be a real pain in darse to constantly have to change everything back again every restart if I want to maintain my theme!
So if I may poach upon your smart nature, do you know if there is a configuration file/folder that can be edited/altered to make those “InCallUI” icons stick upon a restart?
Any advise or corrections in what I'm doing would be greatly appreciated!
Thanks in advance.
Click to expand...
Click to collapse
Sounds like the apk is reverting back... There may be another QMG file that puts the icon back. Other than that, it may be samsung's themes overriding this. Good luck and thanks for the question!
Couple of quick questions
Thanks for the guide OP!
I had a couple of quick questions.
You mention at the beginning of your guide that your method works because of a built in engine in Nougat and that it doesn't require root. I thought that RRO support was added to the AOSP by Sony in Marshmallow? Is this different, or did it just take until Nougat for Samsung to catch up?
The reason I ask is that I tried to do something very similar on an A5 (2017) running 6.0.1 and had no success. I had full root access so I manually installed my .apk into /system/vendor/overlay and could see that the app was installed in the Application Manager, but the desired changes did not take effect. I based my .apk on a similar guide from tutsplus and they say it should work on a device running Marshmallow or higher, but they emulate a Nexus which is obviously closer to AOSP than a Galaxy.
Is this guide Nougat specific or S8 specific? i.e. will a J5 2017 (released after the S8) running Nougat also work in the same way? Can you still install the app manually to the /system/vendor/overlay folder or do you have to manually install it through the UI?
Thanks again for the guide!
tytydraco said:
Enjoy the guide!
Click to expand...
Click to collapse
Hello, sorry for waking this up, the RRO template links are down. Can you attach them here?
If you use a Custom ROM (e.g. Havoc/Xtended/crDroid etc.) where you can choose the design of the QS tiles, you can change the tile shape in the following way:
Choose a simple tile shape, I take the design "Teardrop" as an example here in the tutorial.
Search under /system/app/ the folder QstileTeardrop with the apk QStileTeardrop.apk. If there are no QStile....-folders in your ROM, you have to search... I was able to work on the following QStiles well (others caused some problems somehow or I didn´t try): Inkdrop, Mountain, Ninja, Pokesign, Squaremedo, Teardrop, Wavey.
Take the QStileTeardrop.apk to the computer and decompile the apk (e.g. with apktool).
Import the file ic_qs_circle.xml as Vector Drawable on this page: https://shapeshifter.design.
This file is in the following folder of the decompiled apk: ...\QstileTeardrop\res\drawable.
Export the image as SVG.
Open the exported SVG (vector.svg in Downloads) with Inkscape/Adobe Illustrator. If you don't see anything the fill color is probably white like the background. As background you now have a document/page in the size you need (this might varies depending on Custom ROM).
Change the path according to your imagination or create a new shape, or import an image that you convert into a path. Adjusts the path to the page so that it does not protrude beyond the document/page. It is best to center the path vertically and horizontally so that the icons (WIFI icon, Bluetooth icon, airplane icon, etc.) are also well centered.
Save your path as SVG (YourCustomTile.svg). Now go back to https://shapeshifter.design and import this SVG. Before that you should delete the old path with File > New. In the preview window at the top you can see if the alignment and size of the tile design on the background is okay. Click on path in the lower left corner and copy everything in the field "pathData".
Open the file ic_qs_circle.xml (in ...\QstileTeardrop\res\drawable) in an editor (e.g. Notepad++). Now insert the path (LettersAndNumbers) from the field "pathData" between the quotation marks:
<path android:fillColor="#ffffffff" android: pathData="Insert_new_path_here" /> (Without spaces between : and p, this results in a ...)
If you have several paths, they just come among one another:
<path android:fillColor="#ffffffff" android: pathData="Path1" />
<path android:fillColor="#ffffffff" android: pathData="Path2" />
<path android:fillColor="#ffffffff" android: pathData="Path3" />
Compile and sign the QstileTeardrop.apk and replace the old one on your mobile phone. The QS-tiles now have your own tile design under the name Teardrop. A restart may be necessary, in my ROM it is enough to switch between the designs.
exactly what i was looking for .
Thank you so much
edit: everything worked great , i made couple and they all worked (a preview attached).
but i'm having a problem now , as i said above , everything worked UNTIL i restarted my phone , they revert back the the default style , so let's say i changed the apk of QstileTeardrop.apk and it worked and showed the one i made , then i restarted my phone , it shows the system default style -not even the old teardrop style- , and when i check in settings it shows that QstileTeardrop is still selected , and if i select a different one -one that i didn't edit- it works , and if i go back and select the QstileTeardrop it shows the default again , it is like as if it is not there , the phone/system is not reading the file . i tried with 3-4 different ones and still the same result .
any help ?
Great tuto thanks. One question I want to change icon of as tiles and stay bar but where is it located ? Frameworks or systemUI ? Is it in XML ?
I'm on havoc Android 10
EgyBob said:
... UNTIL i restarted my phone , they revert back the the default style...
Click to expand...
Click to collapse
oh, sorry. I'm quite out of the loop since I have a new mobile. So I think I can't help you unfortunately, I never had that problem. Do you have maybe any Magisk modules active that might be causing this?
Bradco said:
Great tuto thanks. One question I want to change icon of as tiles and stay bar but where is it located ? Frameworks or systemUI ? Is it in XML ?
I'm on havoc Android 10
Click to expand...
Click to collapse
It may not work under Havoc 10. I think that not all functions (like QS Tiles menu) are implemented in Havoc 10 like in previous versions. But as written above I'm a little out of loop, I don't really know about havoc 10...
C-3OP said:
It may not work under Havoc 10. I think that not all functions (like QS Tiles menu) are implemented in Havoc 10 like in previous versions. But as written above I'm a little out of loop, I don't really know about havoc 10...
Click to expand...
Click to collapse
No problem I confirm no change with havoc 10, anyway thanks for your answer
Hello All,
I've decided that I want to change my font throughout my whole device. I created a magisk module that basically replaced my system fonts. It appeared I only had 3 system fonts.
Roboto, OnePlus Sans, and One Sans.
I have most apps successfully changed but certain fonts are still unaffected such as unread email, browsers, and even my always on display.
I have included what I thought was every variety of these 3 fonts such as Roboto-Italic, roboto-bold - about 30 more variety if you get what I'm saying.
Does anyone have a master list in case I've missed a few? Or a easier way to achieve this?
If it matters the font I'm using is KG Feeling 22.
Thank you.
@BillGoss you helped me with the last module for my custom dpi maybe you have some suggestions?
Thank you so much.
Sorry, but I can't help you with this.
ykjae said:
Hello All,
I've decided that I want to change my font throughout my whole device. I created a magisk module that basically replaced my system fonts. It appeared I only had 3 system fonts.
Roboto, OnePlus Sans, and One Sans.
I have most apps successfully changed but certain fonts are still unaffected such as unread email, browsers, and even my always on display.
I have included what I thought was every variety of these 3 fonts such as Roboto-Italic, roboto-bold - about 30 more variety if you get what I'm saying.
Does anyone have a master list in case I've missed a few? Or a easier way to achieve this?
Thank you so much.
Click to expand...
Click to collapse
I suppose some apps, don't only use system fonts, but also have built-in ones.
Changing built-in app fonts may be difficult. I don't think changing font for all apps is possible, but i may be wrong.
In general system fonts you can replace via magisk modules (but you already know it).