additional font symbols - bug?

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
Quester

additional font symbols - bug?

Post by Quester »

I add russian symbols in font shape (latin is saved)
in text.flx I translate some words using additional symbols
but then I run game, the russian symbols is not shown, but latin in same words is correctly shown
I think the symbols with number more then 138 is ignored...
It there way to use additional symbols?

[edit - author/subject were in the wrong field]
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: additional font symbols - bug?

Post by artaxerxes »

you must have the equivalent symbols in the fonts.vga file.

Unpack fonts.vga using "expack -x fonts.vga", rename 0.u70 into 0.shp, edit this file with the gimp (+ the plugin) and add the symbol at the appropriate place.

For instance is the number value of the character is 138, then put the symbol at the frame #138.

Once this is done, recreate the file fonts.vga but running "expack -c fonts.vga [list_of_shape_files_in_order]" and copy this file to the static/ directory.

That should do it.

Artaxerxes
Quester

Re: additional font symbols - bug?

Post by Quester »

I add symbols by using exult studio, it different then you say to do?
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: additional font symbols - bug?

Post by artaxerxes »

as long as the symbols are found in the fonts.vga file, all should be ok

Artaxerxes
Quester

Re: additional font symbols - bug?

Post by Quester »

symbols added, I check it trow shpsplit & exult studio, but if symbol have ¹>127 it not shown... maybe exult cut it?
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: additional font symbols - bug?

Post by wjp »

I'll check this out when I get home tonight. I don't think Exult ignores characters above 127, but I'm not sure.
Quester

Re: additional font symbols - bug?

Post by Quester »

I was check source code, and find some code, where numbers more is 127 cutting, example - font_spin(shape, 128);
...
len > 127 ? len = 127 : len++; (or something like this)

For example I make string Fxfx (x - my additional symbol), but I see only Ff...
A replace symbol number 30 with my shape - it was draw correctly...

HEEELP me sombody!!! :) I WANT TRANSLATE IT!!! :))) pleesss
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: additional font symbols - bug?

Post by wjp »

For the record: this is because chars > 127 are negative in a signed char.
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: additional font symbols - bug?

Post by artaxerxes »

why don't you REPLACE fonts 1 to 127 with what you want?!

Does the russian alphabet use more thatn 127 characters? If not, you're all set!

Artaxerxes
Quester

Re: additional font symbols - bug?

Post by Quester »

players, who will use not complitly translate patch must see english & russian texts both.
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: additional font symbols - bug?

Post by artaxerxes »

Then use the uppercase for English (for instance) and the lowercase for Russian.

When you are finished with the project entirely, remove the english and replace with russian uppercase and adjust the translated text also.

Artaxerxes
Locked