15.09.2020, 12:44
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
15.09.2020, 13:40
igrik, it can't be done as bigfont2.fnt does not include Chinese characters (neither smalfont, medfont and bigfont.fnt from the Chinese pack).
Chinese characters use a different mechanism to display in the game. It uses both .fnt and also hzk files (character library, can be found from here in dir WoG CN\Release\EraPlugins ).
Replacing hzk24 (character library meant to be used when bigfont.fnt is loaded) with hzk12 (use when medfont is loaded) also does not work. It does not makes the characters smaller, instead it just make all characters display incorrectly.
I'm not familiar with the Chinese plugin, unfortunately. The author of it has gone for long and not possible to tweak it again.
If the font definition only exists in bigfont2.fnt and Chinese plugin, then it seems nothing can be done now, sadly...
Spoiler (Click to View)
All characters from Chinese bigfont.fnt. Chinese are not here

medfont.fnt from Chinese pack


medfont.fnt from Chinese pack

Chinese characters use a different mechanism to display in the game. It uses both .fnt and also hzk files (character library, can be found from here in dir WoG CN\Release\EraPlugins ).
Replacing hzk24 (character library meant to be used when bigfont.fnt is loaded) with hzk12 (use when medfont is loaded) also does not work. It does not makes the characters smaller, instead it just make all characters display incorrectly.
Spoiler (Click to View)
hz12 (character library for medfont) replaced hzk24 (character for bigfont), can't display correctly.
From this it can also found that hzk files has nothing to do with font size since font here is still big.

From this it can also found that hzk files has nothing to do with font size since font here is still big.

I'm not familiar with the Chinese plugin, unfortunately. The author of it has gone for long and not possible to tweak it again.
If the font definition only exists in bigfont2.fnt and Chinese plugin, then it seems nothing can be done now, sadly...

15.09.2020, 15:32
Archer30, Rose Kavalier already wrote the reason, afair. Chinese plugin detects font by looking at first 3 characters of its name. So for "big" it loads hzk24.
Possible sizes: 28x25, 14x16, 11x11. It seems like big font should also be 24px height in English.Something is wrong?
igrik, what's is bigfont2.fnt width/height?
Possible sizes: 28x25, 14x16, 11x11. It seems like big font should also be 24px height in English.Something is wrong?
igrik, what's is bigfont2.fnt width/height?
15.09.2020, 16:14
Berserker, I was not aware of this conclusion. I don't quite get it though.
For example, I have smaller fonts including medfont.fnt and hzk12, by replacing bigfont.fnt, bigfont2.fnt and hzk24, all big should look like med right?
That's what I tried, but it didn't work. Fonts in home page of wog menu is always the same size.
For example, I have smaller fonts including medfont.fnt and hzk12, by replacing bigfont.fnt, bigfont2.fnt and hzk24, all big should look like med right?
That's what I tried, but it didn't work. Fonts in home page of wog menu is always the same size.
15.09.2020, 16:46
(15.09.2020 15:32)Berserker Wrote: [ -> ]igrik, what's is bigfont2.fnt width/height?Мои шрифты, которые имеют суффикс "2".
Высота шрифта bigfont2.fnt - 24 px
Archer30-у нужно просто отредактировать шрифты, потому что в сейчас высота его шрифта bigfont.fnt в английской раскладке (который он скидывает по ссылке на китайскую локализацию) составляет 32 px.
Я попробовал заменить bigfont2.fnt, подменив его на medfont.fnt, и у меня сработало. Почему не сработало у него - потому что он видимо что-то не правильно сделал.
15.09.2020, 17:07
igrik, китайские шрифты грузятся из папки с плагином WoG Chinese. Они имеют свой формат. Там три шрифта: 28x25, 14x16, 11x11.
Автор плагина так определяет, каким шрифтом рисовать символ: обратимся r текущему Герои 3 шрифту, поле name.
Если big*, то используем шрифт 28х25, если med*, то используем шрифт 14х16, иначе 11х11.
Вот эта топорная привязка к именам и срабатывает. Но автор решил, что для шрифта 24х подойдёт китайский 28х25, который выглядит громоздко. Я ничего не упустил?
Плагин я могу пересобрать, но альтернативного китайского шрифта кроме этого на 28х25 может не найтись.
Автор плагина так определяет, каким шрифтом рисовать символ: обратимся r текущему Герои 3 шрифту, поле name.
Если big*, то используем шрифт 28х25, если med*, то используем шрифт 14х16, иначе 11х11.
Вот эта топорная привязка к именам и срабатывает. Но автор решил, что для шрифта 24х подойдёт китайский 28х25, который выглядит громоздко. Я ничего не упустил?
Code:
Font24Width:integer=28;
Font24Height:integer=25;
Font12Width:integer=14;
Font12Height:integer=16;
FontTinyWidth:integer=11;
FontTinyHeight:integer=11;
procedure SetFont(hfont:integer;var Width,Height:integer);stdcall;
begin
if pInteger(hfont+4)^=1718053218 then
begin
Width:=Font24Width;
Height:=Font24Height;
end else
if pInteger(hfont+4)^=2037279092 then
begin
Width:=FontTinyWidth;
Height:=FontTinyHeight;
end else
begin
Width:=Font12Width;
Height:=Font12Height;
end;
end;
Плагин я могу пересобрать, но альтернативного китайского шрифта кроме этого на 28х25 может не найтись.
15.09.2020, 17:55
За объяснение проблемы - спасибо, я этого не знал.
Возникает вопрос: чем именно в данном случае я могу помочь?
Возникает вопрос: чем именно в данном случае я могу помочь?
15.09.2020, 18:22
Ну это же просто! Сделай нам другие файлы китайских шрифтов!
Желательно 16x12, 18x14, 20x16 и т.д. На всякий случай всех размеров.
Archer30, please translate wogcnconfig.ini contents.
Желательно 16x12, 18x14, 20x16 и т.д. На всякий случай всех размеров.

Archer30, please translate wogcnconfig.ini contents.
15.09.2020, 19:31
Thank you igrik and Berserker, now I understand how the Chinese plugin work much more clearly.
Berserker, I somewhat know that why the author choose 28x25 and 14x16. it's becoz they are the original fonts extracted from the official Chinese Heroes 3 (While 11x11 seems to be original).
Translation of wogcnconfig.ini
Note that there are two versions of wogcn existing (I have no idea which the source code belongs to). The old release uses config mainly for switching between GB and GBK font, while the new one does not read from config, it just loads hz** files (GB), which is what we are using. For now we have no idea why the new one remove ini support, the history was erased completely.
dlls for these two versions can be found from here.
So my request is to shrink the font size of home page, ideally to make it look like the font without WoG Native Dialogs.
How about this, an extra plugin to appoint the Chinese font in the red square to blue?
This should be the easiest way for everyone.
Berserker, I somewhat know that why the author choose 28x25 and 14x16. it's becoz they are the original fonts extracted from the official Chinese Heroes 3 (While 11x11 seems to be original).
Translation of wogcnconfig.ini
Spoiler (Click to View)
[Path]
H3FileName=
[Font]
;FontType=1 usues GB, FontType=2 uses GBK
FontType=2
;Files with filename hzk** are GB chracter library.
;Files with filename hzk**_GBK are GBK character library.
;FntMode are basically how Chinese characters rendered I guess...no idea what it means here even in Chinese.
;PS:If Using GB library, your modes should be 2 1 2
; If Using GBK library, your modes should be 2 2 2
Fnt10=hzk10_GBK
Fnt10Mode=2
Fnt12=hzk12_GBK
Fnt12Mode=2
Fnt24=hzk24_GBK
Fnt24Mode=2
H3FileName=
[Font]
;FontType=1 usues GB, FontType=2 uses GBK
FontType=2
;Files with filename hzk** are GB chracter library.
;Files with filename hzk**_GBK are GBK character library.
;FntMode are basically how Chinese characters rendered I guess...no idea what it means here even in Chinese.
;PS:If Using GB library, your modes should be 2 1 2
; If Using GBK library, your modes should be 2 2 2
Fnt10=hzk10_GBK
Fnt10Mode=2
Fnt12=hzk12_GBK
Fnt12Mode=2
Fnt24=hzk24_GBK
Fnt24Mode=2
Note that there are two versions of wogcn existing (I have no idea which the source code belongs to). The old release uses config mainly for switching between GB and GBK font, while the new one does not read from config, it just loads hz** files (GB), which is what we are using. For now we have no idea why the new one remove ini support, the history was erased completely.

dlls for these two versions can be found from here.
So my request is to shrink the font size of home page, ideally to make it look like the font without WoG Native Dialogs.
How about this, an extra plugin to appoint the Chinese font in the red square to blue?
Spoiler (Click to View)

15.09.2020, 19:44
Archer30, then you'll lose 28x25 font support at all, only 14x16 will be used in all dialogs. Is it ok? You never need huge font?
15.09.2020, 19:55

Strange, I don't get it. Why the home page of wog menu has to use 28x25 otherwise lose 28x25 in other dialogs?
15.09.2020, 22:19
Archer30, because wog home page will always load big font. It should not be language or plugin specific.
English "W" letter is 33 px at my pc in the same dialog.
English "W" letter is 33 px at my pc in the same dialog.
15.09.2020, 22:42
Thanks Berserker, but that does not explain that with wog native dialog disabled, the font looks just fit. Or is it a completely different mechanism in this case?

Spoiler (Click to View)

15.09.2020, 23:23
Archer30, and what's with wog native dialogs, but without HD mod?
16.09.2020, 06:56
Berserker, let me show you below.
By comparing with all my previous screenshots which are taken with HD, we have the
Conclusion: HD does not affect the font size of Chinese characters in wog menu home page.
Spoiler (Click to View)
Without HD with WoG Native Dialogs

Without HD without WoG Native Dialogs


Without HD without WoG Native Dialogs

By comparing with all my previous screenshots which are taken with HD, we have the
Conclusion: HD does not affect the font size of Chinese characters in wog menu home page.