Giter Club home page Giter Club logo

lc-fontpatcher's Introduction

LC-FontPatcher

image

Change in-game font to other font asset
Fix chat input bug on IME input

Config

⚠️ Configuration files are generated after launching the game, with the mod installed, at least once.

image

default font assets

  • 00 default: English('$' fixed)
  • 01 kr: Korean (Orbit.ttf / DungGuenMo.ttf)
  • 02 jp: Japanese (Pretendard.ttf / Best-Ten.otf)

Each font is tried in the order of its name.

  • "Hello": in-game(if used) => 00 default
  • "한글": in-game(if used) => 00 default => 01 kr
  • "日本語": in-game(if used) => 00 default => 01 kr => 02 jp

How to create another language's font AssetBundle

image

Create a new project with Unity 2022.3.9

image

Open Window > TextMeshPro > Font Asset Creator

image

Import TMP Essentials

image

Add ttf font file that want to be import

image

Use this font setting

  • Sampling Point Size: 10n (Recommend 90 or 80)
  • Padding: n (if samapling point size is 80, set 8)
  • Render Mode: RASTER

Generate font asset with your language's character set

image

Save with the name below

  • Normal: Default game font
  • Transmit: Signal translator's HUD font

image

Create "Editor" Folder

image

Create script file, then paste below source in file

// https://docs.unity3d.com/Manual/AssetBundles-Workflow.html
using UnityEditor;
using System.IO;

public class CreateAssetBundles
{
    [MenuItem("Assets/Build AssetBundles")]
    static void BuildAllAssetBundles()
    {
        string assetBundleDirectory = "Assets/AssetBundles";
        if (Directory.Exists(assetBundleDirectory))
        {
            Directory.Delete(assetBundleDirectory, true);
        }
        Directory.CreateDirectory(assetBundleDirectory);
        BuildPipeline.BuildAssetBundles(assetBundleDirectory,
                                        BuildAssetBundleOptions.None,
                                        BuildTarget.StandaloneWindows);
    }
}

image

Select Normal.asset, Transmit.asset, add to AssetBundle
Set AssetBundle's name what you want (e.g. "jp", "cn", etc)

image

Build AssetBundles

image

Copy AssetBundles file

image

Browse "fonts" folder of mod folder, then paste AssetBundles file.

lc-fontpatcher's People

Contributors

lekakid avatar xof-elttil avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.