GM:S 1.4 Using Japanese characters in Game Maker

Discussion in 'Legacy GameMaker Community Tech Support' started by theg721, Aug 5, 2016.

  1. theg721

    theg721 Member

    Joined:
    Jul 28, 2016
    Posts:
    2
    Hi all,

    I'm trying to implement some localisation in my game, starting with translating it into Japanese, and found that trying to use draw_text with Japanese text (either kana or kanji) wouldn't work; nothing is drawn. After consulting the IRC channel, I found that Game Maker's font system only supports the first 255 Unicode characters, and hence there's no immediately obvious way to make use of characters not within that range when using this font system.

    Whilst I suppose I could just open up Photoshop and make sprites out of every phrase I want to use, this isn't a perfect solution due to images being static, since I need to be able to accept user input and (later) draw it, wrap text and/or use a smaller font depending upon resolution, etc. Additionally, I would imagine that this would increase my memory and/or storage footprint, which isn't desirable on mobile. Thus I was wondering if there was some other way of getting this to work? How did those of you who have already localised games into languages such as Japanese, Chinese, Korean, Russian, etc. which use characters not within the 255 supported by Game Maker go about dealing with this?

    Thanks.
     
  2. Yal

    Yal GMC Memer GMC Elder

    Joined:
    Jun 20, 2016
    Posts:
    3,460
    I'm pretty sure you can add arbitrary (unicode) ranges to a font using the plus and minus buttons; as long as the font itself has those characters it should be possible to draw stuff with them normally. @FrostyCat is the authority on CJK text here, though, and the leading force in the petition to get proper support for it.
     
  3. Mike

    Mike nobody important GMC Elder

    Joined:
    Apr 12, 2016
    Posts:
    2,289
    theg721 likes this.
  4. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    3,359
    I would also recomend you write you localized text in a lang file in the included files. (but im guessing thats quite obvious).

    this reminds me of when i had to hand in my project after having changed my local lang, and all my special charcters got messed up. code still worked, but output formatting was... interesting.
     
  5. theg721

    theg721 Member

    Joined:
    Jul 28, 2016
    Posts:
    2
    This worked, thank you ^.^
     
  6. Tirous

    Tirous Member

    Joined:
    Jun 21, 2016
    Posts:
    73
    i managed to add in hiragana and katakana to my games main font, it uses the default font rather then the one im using tho, as the glyths arent included in by pixelated font, so ya.

    currently i dont need katakana and thus its been left out, however hiragana i managed to find around 12353 - 12438 in unicode, with katakana being stored after that.

    edit: as for kanji, they prove to be case-by-case in nature, picking and choosing the ones needed as to avoid miles of unneeded glyphs filling up the texture page.
     
  7. Dejima

    Dejima Guest

    Hi!

    I am in the exact same situation as the original poster.

    However I am not sure I understand how I can include A TTF font in the game.

    It means adding a .ttf file in the "included files" right?
    And then actually adding it with something like "JapanFont = font_add( working_directory + "JP.tff",24,false,false,32,128)" ?

    Thanks.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice