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

Prepare

  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, 'space' symbol should also be present), you can put this in txt file. For example:

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

Patching a .Font files

  • 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{|}~ €„ˆ‹Œ‘’“”–—˜™›œ¡¢£¨©ª«­®°²³´¹º»¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜßàáâãäåæçèéêëìíîïñòóôõöøùúûüýÝ¥§Ÿ…АБВГҐДЕЄЖЗИІЇЙКЛМНОПРСТУФХЦЧШЩЬЮЯабвгґдеєжзиіїйклмнопрстуфхцчшщьюя"

It will move patched files to _DYpatched folder.

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

Notice

If your font is too big/small change a fontHeight value in _DYextracted/<package>/_<font>/fontInfo.json (_DYextracted/UI_Loading_SF_LOC_INT/_ChaletComprime-CologneEighty.0.Font/fontInfo.json)

Clone this wiki locally