XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sun Oct 21, 2018 2:44 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: The Evil Winthin 2
PostPosted: Wed Jun 06, 2018 5:34 pm 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Sat Nov 26, 2016 3:39 pm
Posts: 194
Has thanked: 7 times
Have thanks: 4 times

Problem!
In .xml files; bearingX is advanceX! Not a bX to bring offset to right! Actully you set wrong name

Replace AdvanceX to bearinX, you set worng name...

And also; you must change your source to creat a new 48.dat with added characters, not inject or insert value's...

You can make the ads go away by registering


_________________
Be Good, Even in distressing or defamation and chill, Even Everyone's Called You a Bad Guy Or Lier and Mad


Top
 Profile  
 
 Post subject: Re: The Evil Winthin 2
PostPosted: Sat Jun 09, 2018 3:53 pm 
Offline
n00b

Joined: Tue Dec 16, 2014 5:47 pm
Posts: 12
Has thanked: 0 time
Have thanks: 0 time
And how to edit font files?


Top
 Profile  
 
 Post subject: Re: The Evil Winthin 2
PostPosted: Tue Jul 31, 2018 7:01 pm 
Offline
ultra-n00b

Joined: Wed Nov 19, 2014 9:52 pm
Posts: 5
Location: Ukraine
Has thanked: 0 time
Have thanks: 2 times
As i need recreate fonts (because english letters slight bolder than cyrillic) and You guys have some trouble with that, here detailed example.
There is big topic about Id tech textures, if you are interested - here link.

Before we start, you'll need some hex editor, we will put in and out image data from .bimage files.

Let's go:

1. After extracting pkr data, go to <extracted directory>\generated\textures\fonts and you'll see following folders
Image

If your writting system alphabetical, as mine, you need change next fonts
Image

If not, you might choose other fonts.


2. Go to first directory, fot_newrodinpro_db, and open 48.bimage in hex editor. You will see something like this
Image

2.1. Find Goto function (in some editors Ctrl+G) set offset to 12 (dec) or 0C (hex) and press enter (or "Go" button)
Image

2.2. Here is our image width - 1000 px
Image

2.3. Now find goto function once again and set offset to 16 (dec) or 10 (hex) and press enter (or "Go" button)
Image

2.4. Here is our image height - 2032 px
Image

2.5. Now goto find goto function once again and set offset to 62 (dec) or 3E (hex) and press enter (or "Go" button)
Image

2.6. Press Ctrl+Shift+End and copy (Ctrl+C) selected data (if nothing happened, click on the underscored symbol and press again)
2.7. Create new file (Ctrl+N), paste (Ctrl+V) data and save file (Ctrl+S). I named this file fot_newrodinpro_db.raw
2.8. Now you need create blank dds image, for these purposes I use GIMP. So open GIMP, create a new file with our image size and click OK
Image

2.9. Now click File -> Export as (Ctrl+Shift+E) choose DDS image from dropdown list
2.10. Select compression BC3/DXT5, no mipmaps, no additional options and save file
Image

2.11. Open created dds image in hex editor and goto 128 (dec) or 80 (hex) offset.
Image

2.12. Press Ctrl+Shift+Home and copy selected data (if nothing happened check 2.6)
2.13. Paste this data at the beginning of fot_newrodinpro_db.raw
Image

2.14. Save file as fot_newrodinpro_db.dds

Note: same thing with other files. Here sizes, start at 2.5 step for copy other data
fot_newrodinpro_db - 1000x2032
fot_udkakugo_large_pr6_m - 1112x2264
tng_font_cn - 860x2872
tng_font_ko - 840x1600
tng_font_lang - 368x656
tng_font_zh - 1076x2296
tng_gothic_m - 260x752


3. Now is time for edit image, i'll use Adobe Photoshop with NVIDIA Texture Tools because i'm still don't learned how to use others (GIMP, Paint .NET, Krita). You need any image editor with ability work with image channels.
Little about image. Image splitted by 2 parts, left part placed in red channel, right part - alpha channel. So real width of images are multiplited by 2, remember that, when you'll setting coordinates in xml-like font map file. Real image looks something like this
Image

When you finish save image as DXT5
Image


4. So, when you`ll finish with images, time add them to font map. Open xml-like file <extracted directory>\fonts\fot_newrodinpro_db\48.dat.xml
4.1. First thing what you need to do - update chars count, if you need add 1, 2, 5, 10 etc. chars, add to chars number. In current version fot_newrodinpro_db has 1920 chars, i need add only 8, so for me chars count is 1928.
Image

4.2. Now going to UTF-8 encoding table and Unicode characters resource and choose your range, for me is U+0400 ... U+04FF: Cyrillic. Set "numerical HTML encoding of the Unicode character" param to decimal
4.3. When i added characters to DOOM (2016) weird thing happened. If i added char at the end of list, game don't recognized it, so i recommend add chars by id order. In my case first letter with id 1028
Image

4.4. Copy closest row, paste after and set id
Image

4.5. Now go to our image and get coordinates. In my case letter on the red channel so his X=528, Y=240, width=29, height=35 (if you add chars to alpha channel add to coordinate image width). Keep in mind, in program bearing is advance and advance is bearing. I missnamed params when develop tool. If bearing(advance) value > 127 substract 256, just wrong variable type.
Image
Image


5. Now you need only put in image data to bimage file and import back to pkr.
5.1. Open dds image and goto offset 128
5.2. Press Ctrl+Shift+End and copy selected data (if nothing happened check 2.6)
5.3. Open .bimage file and goto offset 62
5.4. Press Ctrl+Shift+End, paste previously copied data (if nothing happened check 2.6) and save file.

That's all, do same with other fonts, import data to pkr and enjoy your fonts.

Note: on version 1.0 fonts changed only, if you import map and image to p1_loc_01.pkr/ptr file. So if you try import to the other file and nothing change, try import to p1_loc_01.

Sorry for this long text. I would like hide all this in spoiler, but spoiler tag doesn't work.
Oh, and sorry for my english.


_________________
Impossible is nothing.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group