Is LOVE being able to use only 1byte font?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
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 »

I think http://www.pango.org/ is worth taking a look at.
User avatar
Skofo
Party member
Posts: 146
Joined: Mon Dec 22, 2008 10:55 pm

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

Post by Skofo »

appleide wrote:I think http://www.pango.org/ is worth taking a look at.
That is quite interesting. :ultrashocked::
Working on: Viator
Need a 64-bit Debian package for LÖVE? Here it is!
User avatar
subrime
Citizen
Posts: 76
Joined: Thu Nov 13, 2008 6:18 pm
Location: Australia

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

Post by subrime »

Interesting... except it depends on all the gnome filth.
AirPump
Prole
Posts: 12
Joined: Tue Mar 24, 2009 7:55 pm

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

Post by AirPump »

mike wrote: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
Excluding the English alphabet and a couple of other symbols, there are just over 100 non-kanji symbols in Japanese. While kana-only text can have ambiguous meanings, Super Mario World ROM hacks do this frequently.
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 »

mike wrote: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

Would it be hard to implement a feature that allows loading only the characters you're going to use?
It would work like:

Code: Select all

local f=love.graphics.loadFont(love.default_font, "o", "ha", "yo", "go", "za", "i", "ma", "su" ....);
IIRC we could do something like that now but only via proxy characters, which isn't ideal...
How does pango do it? we could rebuild a project from scratch without copying their code, except there seems to be so much this would be infeasible.
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 »

That would be "ohayou gozaimasu",
but it would be simple enough to just use an int as an index for a bitmap font.
Although if Löve only takes bytes you'd probably use the range from 128-255 for the kana.
Problem is if you don't do combining diacritics, you end up with too many characters if you want support for both hiragana and katakana (79 characters for each, unless you want support for old kana we/ye(often used for ye in modern Japanese like yebisu beer) and wi(I've never seen it used) and kana repetition symbols).
If you can do combining diacritics (that is a single ten-ten character that combines with other characters) then you only need 45 + 8 small characters for each alphabet.
Of course, you could just make multiple bitmap fonts, and change between the fonts when needed, for instance by adding some string parsing.

Edit: 45+10, forgot about small wa, wo and tsu (or wa, wi, we, wo if you want all of them). And 82 each with voiced for each voiced character.
Take off every Zigg for great rapist.
Now, outgay that!
Post Reply

Who is online

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