Pfap
Member
I'm working on localizing a game and most of the foreign text works with my existing code except for the Japanese and Chinese translations. I'm using fonts from Google and they are in .otf file format. Here is the Japanese one: https://fonts.google.com/specimen/Noto+Sans+JP?selection.family=Noto+Sans+JP
For some reason the text is drawn way to the left when using the existing code for English, so the current idea I have is that if Japanese is selected then I will set a variable with the difference that needs to be spanned.
So, global.add_text will be set to 0 for all languages except for Japanese and Chinese. The value for global.add_text for the Japanese font is currently 56.
My question: is there a way to adjust the font, so that it works with other offsets? The font is "off" by 56 and once I add that to the x draw position everything is centered and looks nice.
For some reason the text is drawn way to the left when using the existing code for English, so the current idea I have is that if Japanese is selected then I will set a variable with the difference that needs to be spanned.
Code:
draw_text(x+(sprite_width/2)+global.add_text,y,text);
My question: is there a way to adjust the font, so that it works with other offsets? The font is "off" by 56 and once I add that to the x draw position everything is centered and looks nice.