[SOLVED]Text Editor with Japanese Text Support

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Ekamu
Party member
Posts: 178
Joined: Fri Sep 20, 2013 11:06 am

[SOLVED]Text Editor with Japanese Text Support

Post by Ekamu »

Does anyone here know any text editor with Japanese text support?

If I write this in Notepad++
love.graphics.newImageFont("resources/font2.png"," あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをん"
.."がぎぐげござじずぜぞだぢづでどばびぶべぼぱぴぷぺぽ"..'0123456789.,""!?()_/-+:;\\<>'),
I get this
love.graphics.newImageFont("resources/font2.png"," ??????????????????????????????????????????????"
.."?????????????????????????"..'0123456789.,""!?()_/-+:;\\<>'),

(Or does it still store the Unicode even-though it displays ???????)

If any of you are using any free text editor with Japanese text support then could you please post a download link for me. Or even better if their is a way to display Japanese kana in Notepad++.

Thanks
Last edited by Ekamu on Tue Nov 26, 2013 10:18 pm, edited 5 times in total.
User avatar
markgo
Party member
Posts: 189
Joined: Sat Jan 05, 2013 12:21 am
Location: USA

Re: Text Editor with Japanese Text Support

Post by markgo »

Most text editors use the available fonts on your system. If you want Japanese text support, you'll need to download the appropriate font much like LOVE. Even though your text editor shows incorrect characters, it will show up correctly when you have the right font. Also, make sure to enable the correct encoding for your files (e.g. UTF8, ANSI) for proper display.
Ekamu
Party member
Posts: 178
Joined: Fri Sep 20, 2013 11:06 am

Re: Text Editor with Japanese Text Support

Post by Ekamu »

Here's another free font. Its originally from Mother (Earthbound Zero) but I messed it up and made it thicker.
font3.png
font3.png (3.16 KiB) Viewed 9998 times
Last edited by Ekamu on Mon Nov 25, 2013 9:53 pm, edited 2 times in total.
Ekamu
Party member
Posts: 178
Joined: Fri Sep 20, 2013 11:06 am

Re: Text Editor with Japanese Text Support

Post by Ekamu »

EDIT:
It displays font within the Notepad++ text editor but I cannot run my game with LOVE. When I drag and drop it into the LOVE.exe or create a .love file and run that nothing happens. No errors the game just does not start up at all.

I am using UTF-8 encoding for all modules.

Here is the lovefile: https://www.dropbox.com/s/qijoko85hm9mf ... rv0.8.love
Last edited by Ekamu on Tue Nov 26, 2013 7:21 am, edited 1 time in total.
User avatar
ejmr
Party member
Posts: 302
Joined: Fri Jun 01, 2012 7:45 am
Location: South Carolina, U.S.A.
Contact:

Re: Text Editor with Japanese Text Support

Post by ejmr »

Ekamu wrote:Does anyone here know any text editor with Japanese text support?
GNU Emacs has built-in support for typing in Japanese, but I think using it just for that is overkill. BabelPad was an editor I used years ago on Windows; sorry I don’t have a link on hand, but if that’s still out there then that is a good one for working with Unicode in general.

But it really shouldn’t matter what editor you are using if you have the Input-Method Editor setup fine (I’m assuming you’re using Windows). You still need a font that has the characters, e.g. Arial Unicode, but the editor itself shouldn’t affect things.
ejmr :: Programming and Game-Dev Blog, GitHub
南無妙法蓮華經
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: Text Editor with Japanese Text Support

Post by Boolsheet »

I want to make sure you've seen the note on the [wiki]love.graphics.newImageFont[/wiki] wiki page. The encoding issue will be fixed in 0.9.0.

If LÖVE closes on you before it displaying anything, it's possible that an error happened before a window was created. You can redirect the standard output, where LÖVE writes the errors messages to, to a file so you actually see it. Open a terminal or command prompt and execute LÖVE like this.

Code: Select all

path/to/love path/to/game > stdout.txt
This will create a file stdout.txt in the working directory and write everything to it.

An example for Windows.

Code: Select all

"C:\Program Files\LOVE\love.exe" D:\mygame\mygame.love > D:\mygame\stdout.txt
Shallow indentations.
Ekamu
Party member
Posts: 178
Joined: Fri Sep 20, 2013 11:06 am

Re: Text Editor with Japanese Text Support

Post by Ekamu »

Image

unexpected symbol near 'ï' in function <[string "boot.lua"]:227.

LÖVE expects ISO 8859-1 encoding for the glyphs string.

Wikipedia
(ISO/IEC 8859-1 :is the basis for most popular 8-bit character sets, including Windows-1252 and the first block of characters in Unicode.)

the first block of characters in Unicode?

Does this mean I cant use UTF-8 encoding with LOVE0.8. I assume Japanese font is outside the first block of characters in Unicode?
User avatar
slime
Solid Snayke
Posts: 3131
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Text Editor with Japanese Text Support

Post by slime »

Ekamu wrote:Does this mean I cant use UTF-8 encoding with LOVE0.8. I assume Japanese font is outside the first block of characters in Unicode?
That restriction only applies to ImageFont strings in 0.8.0. You can use a TrueType font (.ttf file) and it should work fine, or you can use 0.9.0.
bekey
Party member
Posts: 255
Joined: Tue Sep 03, 2013 6:27 pm

[]

Post by bekey »

-snip-
Last edited by bekey on Fri Jan 24, 2014 2:01 am, edited 1 time in total.
Ekamu
Party member
Posts: 178
Joined: Fri Sep 20, 2013 11:06 am

Re: Text Editor with Japanese Text Support

Post by Ekamu »

O.K now I'm getting decoding error not enough space.I am using ttf fonts.
Encoding is in UTF-8 without BOM

Maybe I should use GNU Emacs/Babblepad. but I also think its unnecessary. The same problem might persist anyway.
Last edited by Ekamu on Tue Nov 26, 2013 2:18 pm, edited 6 times in total.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 47 guests