submission icon indicating copy to clipboard operation
submission copied to clipboard

[Module] MinecraftFont

Open DethByte64 opened this issue 7 months ago • 10 comments

ID

MinecraftFont

Name

Minecraft Font

Description

This is a simple module that replaces the default font with the Minecraft font systemlessly. The fonts were originally otf but i converted them to a single ttf.

Module repository link

https://github.com/DethByte64/Magisk-Minecraft-Font

Source code link (for compiled binaries/APKs)

No response

Anti-Features

No response

DethByte64 avatar May 09 '25 19:05 DethByte64

Why does your module repo have a zip file in it?

Atrate avatar May 25 '25 18:05 Atrate

Why does your module repo have a zip file in it?

Its there in case someone clones the repo and doesnt know how to zip the module but wants to install.

DethByte64 avatar May 25 '25 19:05 DethByte64

If you want this module to be included in MMAR, you'll have to follow the standard Magisk module format. This means no .zip in the repo, as it will get built from the repo automatically by clients.

Atrate avatar May 26 '25 18:05 Atrate

If you want this module to be included in MMAR, you'll have to follow the standard Magisk module format. This means no .zip in the repo, as it will get built from the repo automatically by clients.

The requested changes have been made.

DethByte64 avatar May 26 '25 19:05 DethByte64

# Print to Magisk installer UI
ui_print "Starting Minecraft Font Module installation"

# Module paths
TTF_SRC="$MODPATH/Minecraft.ttf"
FONTDIR="$MODPATH/system/fonts"

# Check if Minecraft.ttf exists
if [ ! -f "$TTF_SRC" ]; then
  ui_print "Error: Minecraft.ttf not found in module root"
  exit 1
fi

# Create fonts directory
mkdir -p "$FONTDIR"
ui_print "Created fonts directory at $FONTDIR"

Why not just put yout font in the repo in ./system/fonts directly?

Atrate avatar May 27 '25 10:05 Atrate

Not all roms have the option to switch fonts, so we use the mount functionality to hijack the current one.

DethByte64 avatar May 27 '25 11:05 DethByte64

Yes. Why create the directory in the script and not just have $MODPATH/system/fonts in the github repo immediately?

Atrate avatar May 27 '25 11:05 Atrate

Why ship with empty dirs when we can just make them when theyre needed?

DethByte64 avatar May 27 '25 11:05 DethByte64

I guess what I meant is why not ship Minecraft.ttf in there, but after reading the code more thoroughly I see why you decided to do it this way.

One more question:

        # Delete GMS' generated fonts
        DEL_GMSF() {
            local GMSFD=com.google.android.gms/files/fonts

            [ -d /data/fonts ] && rm -r /data/fonts

            find /data \
                -type d \
                -path "*$GMSFD*" \
                -exec test -d {} \; -exec rm -r {} \;
        }

Considering that you delete the fonts permanently without keeping backups, how would a user restore everything to the way it was? Will uninstalling the module and waiting for GMSFonts to reinstall itself be enough?

Atrate avatar May 27 '25 12:05 Atrate

The fonts will be reinstalled pretty quick. The sleep 3 hours is there for a reason. Though if this does become an issue, i could try and overlay the GMS fonts with blank files and that should do the trick. Ive been using the module for 3 weeks now and in testing on 2 different devices, i havent had an issue, even when uninstalling. You know how persistent GMS is.

DethByte64 avatar May 27 '25 13:05 DethByte64

You know how persistent GMS is.

Yeah, definiely. Alright, I think everything looks good. Once I have a sec I'll get your repo set up.

Atrate avatar May 28 '25 18:05 Atrate

Bump

DethByte64 avatar Jun 19 '25 12:06 DethByte64

Hey @DethByte64,

your module submission has been approved! The module will likely be available at https://github.com/Magisk-Modules-Alt-Repo/MinecraftFont.

Check your e-mail inbox for an invite to your new repository and remember to 'Watch' your repository on Github to have new issues in it show up in your feed.

Make sure to change your local repository's push URLs or configure 2 parallel push URLs.

Best regards, The MMAR Team

github-actions[bot] avatar Jul 19 '25 11:07 github-actions[bot]