Important reminder:
Flashing the machine and flashing the Magisk module may cause the system to fail to start normally. Please consider it carefully before operation and recommend backing up important data. System failures (including card-on-mobile animations, function abnormalities, etc.) or abnormal effects caused by improper operation have nothing to do with the module template author.
This project is a GitHub release project for Magisk font module templates . This template is used to make the Magisk font module, supporting 9 word weights, each word weight is one ttf file. On a phone with Magisk installed, using this template to create a font module and flash it in, changing the font may be easier.
For the introduction and principle of applying templates, please see: Change any favorite font for Android, you can try this Magisk module (Minority)
/system/fonts folder in the module template package and add ttf or otf format font files to it. Naming the font file as directed in step 3.fontwx.ttf (note the extension to ttf !! Of course, you can also enter fonts.xml and change ttf to otf), where x is a digit (1~9) indicating the word weight (font-weight, font thickness attribute) ;x value is 4, that is, the font file name is fontw4.ttf (if it is a single word weight font, it is recommended to name it fontw4.ttf and add it to the /system/fonts directory of the module) ;x value is 7, that is, the font file name is fontw7.ttf ;x , the thinner x word, and the larger the word, the thicker the word;| x value | Font-Weight | Chinese name |
|---|---|---|
| 1 | Thin (100) | Very thin |
| 2 | UltraLight (200) | slim |
| 3 | Light (300) | Fine body |
| 4 | Regular (400) | conventional |
| 5 | Medium (500) | medium |
| 6 | SemiBold (600) | Second thick |
| 7 | Bold (700) | Bold |
| 8 | ExtraBold (800) | Extremely thick |
| 9 | Heavy/Black (900) | Super thick |
module.prop in the root directory of the module is used to store module information, such as the module name, version number, author, etc.id : The code name of the module, which can only include letters, numbers and half-width symbols, and does not include spaces . Magisk modules with the same id cannot coexist.name : module name, can be filled in at will.version : module version, can be filled in at will.versionCode : The module version code must be an integer value. This value is used for version comparison.author : The module author, can be filled in at will.description : module description, can be filled in at will.Click here to enter the word weight test, provided by @YuKongA. (Kuan@YuKongA is cancelled.)
/system/fonts directory is an empty font file, which is the hollowed-out font of the Android default Western font Roboto. It mainly provides measurement and font weight information, so please do not delete it easily. (Inspired by the extreme community RadarNyan, the website is no longer accessible.)/system/product folder are used to override Google Sans fonts built into the class native Android system, and realize global coverage of the replaced fonts on the class native ROM. If you want to retain the built-in Google Sans fonts in the native ROM, please delete the /system/product folder in the module. Because under Shamiko version 0.4.3, the font module made using this template will cause the application checked in the exclude list to crash (Redmi K20 Pro, Evolution X 6.0, Android 12). After troubleshooting as fonts_customization.xml, the file has been deleted, and the old version of the module template blocks Google Sans - directly replace Google Sans with empty fonts./system/etc/fonts.xml is a font configuration file. It has been adjusted to call empty fonts and custom fonts. It can be used normally after the two Android phone tests I hold (Redmi Note 5, Pixel Experience 12.0, Android 12; Redmi K20 Pro, crDroid 7.9, Android 11). It is theoretically compatible with Android 12 and Android 11, but it does not guarantee that all ROMs can be used normally . The configuration files of different ROM call fonts may be different, see "Compatibility Adjustment" below.In order to make this module template more suitable for your phone, you need to adjust the configuration files in the module template:
/system/etc/fonts.xml to /system/system_ext/etc/ (If there is no such folder, please create it first) directory and rename it to fonts_base.xml ./system/etc/fonts.xml to the same folder and rename it to fonts_base.xml。/system/etc/fonts.xml 3 copies to the same folder and rename it to the following 3 files: fonts_flyme.xml , fonts_inter.xml and fonts_slate.xml .Magisk-Modules-Template-ge20.4 based on Petit-Abba (Kotch/formerly known as "Aba Jiang").