Is LOVE being able to use only 1byte font?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
ta_katsu
Prole
Posts: 2
Joined: Sun Feb 15, 2009 6:08 am

Is LOVE being able to use only 1byte font?

Post by ta_katsu »

Hi,
My name is Katsu. I accesses from Japan.
LOVE is a wonderful development tool.

I want to wirite Japanese text on screen.
but I don't wirite Japanese text on screen.
The Japanese text characters are garbled.

Is LOVE being able to use only 1byte font?
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Is LOVE being able to use only 1byte font?

Post by rude »

Yeah, I'm afraid so. If you need kanji/kana, you have to fake it with ImageFont. (Example image seems to be removed. Will fix it ASAP.)
ta_katsu
Prole
Posts: 2
Joined: Sun Feb 15, 2009 6:08 am

Re: Is LOVE being able to use only 1byte font?

Post by ta_katsu »

Hi,rude.
Thank you for getting the answer from you.
Moreover, we wish to express our gratitude for your support.

In the next version, two byte font is expected to be able to be used.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Is LOVE being able to use only 1byte font?

Post by rude »

ta_katsu wrote:In the next version, two byte font is expected to be able to be used.
I'm afraid that won't happen. Font works by send each glyph to the GPU as a texture. There are way too many japanese characters for load-times to be feasible.
osuf oboys
Party member
Posts: 215
Joined: Sun Jan 18, 2009 8:03 pm

Re: Is LOVE being able to use only 1byte font?

Post by osuf oboys »

How about sending the respective character the first time the it is needed and/or supporting only the basic character set?
If I haven't written anything else, you may assume that my work is released under the LPC License - the LÖVE Community. See http://love2d.org/wiki/index.php?title=LPC_License.
User avatar
Sardtok
Party member
Posts: 108
Joined: Thu Feb 21, 2008 2:37 pm
Location: Norway/Norge/諾威/挪威 (Yes, I'm teh back!)
Contact:

Re: Is LOVE being able to use only 1byte font?

Post by Sardtok »

You might want to look at FreeType, which supports rendering of unicode fonts, it dynamically generates glyph bitmaps as needed, like osuf oboys suggestion.
So only the glyphs that are actually used are ever put into memory, not sure what it does if a huge number of characters is used.
Anyway, you might want to handle it the same way, or change to FreeType for font rendering.
Just be aware that there are some patent issues if you want perfect rendering. Some fonts might get garbled if the patented Apple rendering algorithms are not used.
Take off every Zigg for great rapist.
Now, outgay that!
User avatar
appleide
Party member
Posts: 323
Joined: Fri Jun 27, 2008 2:50 pm

Re: Is LOVE being able to use only 1byte font?

Post by appleide »

Sardtok: Don't we use FreeType already?
User avatar
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

Re: Is LOVE being able to use only 1byte font?

Post by mike »

appleide wrote:Sardtok: Don't we use FreeType already?
Yes, we do. I was a little puzzled by what he said since it seems like we could use FreeType to render fonts as well as read them. Then again, the font handling is OLD AND BROKEN and will be replaced with epicness when we get around to it.
Now posting IN STEREO (where available)
User avatar
Sardtok
Party member
Posts: 108
Joined: Thu Feb 21, 2008 2:37 pm
Location: Norway/Norge/諾威/挪威 (Yes, I'm teh back!)
Contact:

Re: Is LOVE being able to use only 1byte font?

Post by Sardtok »

It's not like I pay attention to what libraries you use, and which you don't.

If you render glyphs to some texture in memory, you could just use a simple discard system when a the number of glyphs gets too big and overwrite the old glyph.
It would require that you set up some kind of collection to keep an eye on what glyph is in what opengl texture and order it by usage, moving a glyph to the front/top whenever it is used and shifting all the others back, might be slower than the current version, but it could be turned on/off to avoid all the shifting in apps that don't need a lot of glyphs.
Take off every Zigg for great rapist.
Now, outgay that!
User avatar
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

Re: Is LOVE being able to use only 1byte font?

Post by mike »

Ok, let me try to understand what you're saying:
  1. Read a massive font-file for massive glyph usage (like Japanese characters or every variaton of OØÖÓ...)
  2. Make OpenGL textures of some of the glyphs, but not all
  3. Change which glyphs are textured in real-time, based on the history of usage of those glyphs
Yeah, that seems only slightly slower than the current version
Now posting IN STEREO (where available)
Post Reply

Who is online

Users browsing this forum: No registered users and 54 guests