arcusmaximus / VNTranslationTools

Tools for translating visual novels
MIT License
295 stars 44 forks source link

VNTextProxy, How can I use Custom font in kirikiri game? #27

Closed nineria closed 2 years ago

nineria commented 2 years ago

Hello, arcusmaximus

I'm trying to translate Moto Yankee Tsuma Hinako to Thai language.

I'm using VNTextPatch to translate and wondering how to use VNTextProxy

After I translated some text into Thai and put the file in the game folder to test and this happened

I wondering how can I add a custom font Cordia New in to the game?

Cosetto commented 2 years ago

Hello, arcusmaximus

I'm trying to translate Moto Yankee Tsuma Hinako to Thai language.

I'm using VNTextPatch to translate and wondering how to use VNTextProxy

After I translated some text into Thai and put the file in the game folder to test and this happened

I wondering how can I add a custom font Cordia New in to the game?

You can change the font name in Config.tjs, backlog's font should be in there too. It should be Userface if I'm not wrong, after changing put Config.tjs in the patch too

nineria commented 2 years ago

Hello, arcusmaximus I'm trying to translate Moto Yankee Tsuma Hinako to Thai language. I'm using VNTextPatch to translate and wondering how to use VNTextProxy After I translated some text into Thai and put the file in the game folder to test and this happened I wondering how can I add a custom font Cordia New in to the game?

You can change the font name in Config.tjs, backlog's font should be in there too. It should be Userface if I'm not wrong, after changing put Config.tjs in the patch too

I changed the Userface but nothing happened The game still uses built-in fonts or game engine font (not sure). Can I import my Cordia New font and set it to a variable or something else? Like ;userFace = Cordia.ttf; // deffont タグの face 属性に相当

Cosetto commented 2 years ago

Hello, arcusmaximus I'm trying to translate Moto Yankee Tsuma Hinako to Thai language. I'm using VNTextPatch to translate and wondering how to use VNTextProxy After I translated some text into Thai and put the file in the game folder to test and this happened I wondering how can I add a custom font Cordia New in to the game?

You can change the font name in Config.tjs, backlog's font should be in there too. It should be Userface if I'm not wrong, after changing put Config.tjs in the patch too

I changed the Userface but nothing happened The game still uses built-in fonts or game engine font (not sure). Can I import my Cordia New font and set it to a variable or something else?

The should be a place to change font in menu bar, try it

nineria commented 2 years ago

Hello, arcusmaximus I'm trying to translate Moto Yankee Tsuma Hinako to Thai language. I'm using VNTextPatch to translate and wondering how to use VNTextProxy After I translated some text into Thai and put the file in the game folder to test and this happened I wondering how can I add a custom font Cordia New in to the game?

You can change the font name in Config.tjs, backlog's font should be in there too. It should be Userface if I'm not wrong, after changing put Config.tjs in the patch too

I changed the Userface but nothing happened The game still uses built-in fonts or game engine font (not sure). Can I import my Cordia New font and set it to a variable or something else?

The should be a place to change font in menu bar, try it

I see only default fonts

Maybe I can't just changed the Userface.

Cosetto commented 2 years ago

I think you need to custom the font in order to make the game accepts it base on MS Gothic font, you will need to add glyphs for Thai's letters or wait for arc_ to help you with the proxy. If you want this is a font you can use Genshin.zip You need an app like FontForge to custom, add glyphs and outline for Thai's letters

nineria commented 2 years ago

I think you need to custom the font in order to make the game accepts it base on MS Gothic font, you will need to add glyphs for Thai's letters or wait for arc_ to help you with the proxy. If you want this is a font you can use Genshin.zip You need an app like FontForge to custom, add glyphs and outline for Thai's letters

Hey, Cosetto I think, I'm on the right way

I added thai alphabet to Malgun Gothic by using FontForge

The font looks weird, but I think I can fix it myself.

Thank you very much Cosetto for your information and guide. It helped me a lot!

arcusmaximus commented 2 years ago

Inside VNTextProxy, you can change the font over here: https://github.com/arcusmaximus/VNTranslationTools/blob/main/VNTextProxy/Proportionalizer.cpp#L9

(Just change the line to FontName = L"Cordia New";) That way, you don't need to create a custom font file.