Oh, I thought you were both equal "partners" here
Ok, let's wait for the Big Boss and see what he has to say...
Future features
Re: Future features
Are you being condescending? I'll have you know that without me, rude would be stuck without buggy text-rendering! So there!alxs wrote:Oh, I thought you were both equal "partners" here
Now posting IN STEREO (where available)
Re: Future features
Oh, so this was your major contribution to the project!
Users like me, who will spend countless hours trying to find your precious, hidden treasure-bugs will certainly appreciate your effort! Ah, little surprises... Keep it up!
BTW, I guess you didn't use Windows fonts, right? Because of portability?
I also didn't notice where you specify kerning pairs for fonts. The fonts don't look like fixed-width ones, but where are all the values?
Users like me, who will spend countless hours trying to find your precious, hidden treasure-bugs will certainly appreciate your effort! Ah, little surprises... Keep it up!
BTW, I guess you didn't use Windows fonts, right? Because of portability?
I also didn't notice where you specify kerning pairs for fonts. The fonts don't look like fixed-width ones, but where are all the values?
Alex
Re: Future features
Yes. No. Maybe.alxs wrote:Oh, so this was your major contribution to the project!
My snide comment detector is flaring.alxs wrote:Users like me, who will spend countless hours trying to find your precious, hidden treasure-bugs will certainly appreciate your effort! Ah, little surprises... Keep it up!
Not sure.. I think it was something about not being sued by Microsoft for distributing their precious fonts for free.alxs wrote:BTW, I guess you didn't use Windows fonts, right? Because of portability?
Kerning pairs? Fixed-widht? Please elaborate.alxs wrote:I also didn't notice where you specify kerning pairs for fonts. The fonts don't look like fixed-width ones, but where are all the values?
Now posting IN STEREO (where available)
Re: Future features
No, I meant using Windows fonts, like Tahoma, Verdana to draw text...
About kerning pairs - well, to be short - each character in complex fonts has its own width. That's set of values A. Then, some characters change their position, based on combination with another character. That's set of values B. There are even more sets, but these two are the most important. Look at how fonts are done in PopCap framework.
In love I didn't see all the values (OMG, this name is certainly the endless source of puns!). This one is almost poetry
So how did you managed to create a font which doesn't look like fixed-width one (all the characters have the same width) without defining at least two of those sets of values?
And I don't know about Norway, but on my planet it's very, very late. Or very, very early. It depends. So, see you tomorrow... Hopefully I will also have a chance to put some major bugs in love...
About kerning pairs - well, to be short - each character in complex fonts has its own width. That's set of values A. Then, some characters change their position, based on combination with another character. That's set of values B. There are even more sets, but these two are the most important. Look at how fonts are done in PopCap framework.
In love I didn't see all the values (OMG, this name is certainly the endless source of puns!). This one is almost poetry
So how did you managed to create a font which doesn't look like fixed-width one (all the characters have the same width) without defining at least two of those sets of values?
And I don't know about Norway, but on my planet it's very, very late. Or very, very early. It depends. So, see you tomorrow... Hopefully I will also have a chance to put some major bugs in love...
Alex
Re: Future features
I'll post a meaningful answer tomorrow, but for now; sleep time. 8-)
- Sardtok
- Party member
- Posts: 108
- Joined: Thu Feb 21, 2008 2:37 pm
- Location: Norway/Norge/諾威/挪威 (Yes, I'm teh back!)
- Contact:
Re: Future features
I believe the font works like this, please correct me if I'm wrong though:
You have a bitmap, where one colour is specified as the colour separating two characters, so there's a line of that colour.
There are no specified kerning pairs though, nor does it have whatever it's called again when two characters turn into one:
Like et, fi, ti and so on.
You have a bitmap, where one colour is specified as the colour separating two characters, so there's a line of that colour.
There are no specified kerning pairs though, nor does it have whatever it's called again when two characters turn into one:
Like et, fi, ti and so on.
Take off every Zigg for great rapist.
Now, outgay that!
Now, outgay that!
Re: Future features
So what about the quotation mark (")?Sardtok wrote:You have a bitmap, where one colour is specified as the colour separating two characters, so there's a line of that colour.
Will it count as 2 characters? Plus there can be other characters, consisting of two and more parts...
Otherwise - quite clever solution as a rough approximation...
Alex
Re: Future features
This is how ImageFont works, by specifying a color (which isn't transparent and isn't anywhere in the actual font) that separates each character. You could fool the system by having a character that looks like this:Sardtok wrote:I believe the font works like this, please correct me if I'm wrong though:
You have a bitmap, where one colour is specified as the colour separating two characters, so there's a line of that colour.
There are no specified kerning pairs though, nor does it have whatever it's called again when two characters turn into one:
Like et, fi, ti and so on.
"beeeeee" to be the character 'b'.
Even if " is (in essence) two separate symbols, in the bitmap image they are separated from each other by transparent pixels and separated from other characters by a "spacer color" which designates them as a single character, as so:alxs wrote: So what about the quotation mark (")?
Will it count as 2 characters? Plus there can be other characters, consisting of two and more parts...
Otherwise - quite clever solution as a rough approximation...
|A|B|C| ... |"|¨|%|
(the | characters symbolize the spacer color)
I hope this makes a little sense.. ImageFont is not an exact science and the normal (vectorized) fonts are a mystery to me as I just followed instructions from the FreeType website and some tutorials on NeHe.
Now posting IN STEREO (where available)
Re: Future features
Oh, I got it. Even more clever.
For my purposes I wrote a small class that loads fonts, created by PopCap utilities.
Since their tool handles all the trouble of calculating widths and kerning pairs, loading is easy.
And their tool is very flexible - it creates a raster image from vector fonts, installed in Windows, plus a text file with all the values.
For my purposes I wrote a small class that loads fonts, created by PopCap utilities.
Since their tool handles all the trouble of calculating widths and kerning pairs, loading is easy.
And their tool is very flexible - it creates a raster image from vector fonts, installed in Windows, plus a text file with all the values.
Alex
Who is online
Users browsing this forum: Bing [Bot] and 0 guests