Skip to content

Font Editing (Font)

MyNameIsKitsune edited this page Sep 3, 2024 · 6 revisions

Unpack

First, you need to unpack a upk with font files (ex. Dishonored: UI_Loading_SF_LOC_INT.upk)

python unpack.py UI_Loading_SF_LOC_INT.upk --split

--split needed to create a UI_Loading_SF_LOC_INT directory in _DYextracted

Patching a .Font files

  1. You need to make sure that the file is next to the .Texture2D file

    ex. ChaletComprime-CologneEighty.0.Font alongside with ChaletComprime-CologneEighty_PageA.4.Texture2D

  2. Choose your preferred TTF/OTF font

  3. Put your TTF/OTF font to a comfortable place

  4. Prepare a charset(symbols that should be in the game), you can put this in txt file. For example:

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ €„ˆ‹Œ‘’“”–—˜™›œ¡¢£¨©ª«­®°²³´¹º»¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜßàáâãäåæçèéêëìíîïñòóôõöøùúûüýÝ¥§Ÿ…АБВГҐДЕЄЖЗИІЇЙКЛМНОПРСТУФХЦЧШЩЬЮЯабвгґдеєжзиіїйклмнопрстуфхцчшщьюя
  1. Patch a .Font file with a command, it will move patched files to _DYpatched folder:
  • Using a file:
python fontEdit.py -p _DYextracted/UI_Loading_SF_LOC_INT/ChaletComprime-CologneEighty.0.Font SofiaSans.ttf chars.txt
  • Using a string:
python fontEdit.py -p _DYextracted/UI_Loading_SF_LOC_INT/ChaletComprime-CologneEighty.0.Font SofiaSans.ttf " !\"#\$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ €„ˆ‹Œ‘’“”–—˜™›œ¡¢£¨©ª«­®°²³´¹º»¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜßàáâãäåæçèéêëìíîïñòóôõöøùúûüýÝ¥§Ÿ…АБВГҐДЕЄЖЗИІЇЙКЛМНОПРСТУФХЦЧШЩЬЮЯабвгґдеєжзиіїйклмнопрстуфхцчшщьюя"

If no charset has been provided, it will use a default charset inside a .Font file

Patching a upk

After you need to patch your upk file:

python patch.py UI_Loading_SF_LOC_INT.upk --split

--split needed to get files from a UI_Loading_SF_LOC_INT directory in _DYpatched

Clone this wiki locally