|
#1
|
||||
|
||||
|
Hi fellow devs!
(Though, I guess it's just pretty much jbob, bret and me left here...) Today during a 2h train ride I scripted something which I call "Easy Clock". I encountered an issue though, as I try to use the characters Å, Ä and Ö. As previously described in this thread those are either not displayed at all, or Ö is displayed as a Kanji sign. Did anyone ever figure out a fix for this? I couldn't dig anything up by searching the forums. ~Hab
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
|
|||
|
|
|
#2
|
||||
|
||||
|
I will test if the player can handle those characters in 1 easy line of code.
-------------------------------------------------------------------------- The player does in-fact know that character, it has a byte value of 197 so try using text.draw("Font test: " .. string.char(197)) Its the character: Å ------------------------------------------------------------------------------------------------------------------- After further testing, the font does not have that character, if you would like to help me, then we can make a custom font engine. I just need a program that will give me the offsets, width, and height of letters. Though it will not support font size.
__________________
Tools: Playlist Manager , Document to RSS , Notepad++ Instellisense Games/Apps: Asteroids, ZenFrame, Graphing Calculator, Pingus X-Fi2, Boxwars, SkiFree, Jezzball Last edited by jbob182; 12-10-2011 at 03:21 PM. |
|
#3
|
||||
|
||||
|
I can try to help, but tomorrow evening when I have more time. What exactly is it you'd need help with? I didn't quite follow you with that sparse specification.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#4
|
|||
|
|||
|
the player is UTF-8
and it's happy about what. for the rest of the world...well... |
|
#5
|
||||
|
||||
|
Sorry about that, I need a file like this:
times new roman.font char(157);offset(5,3);rect(157,93,20,20);advance(7 );image("numbers.png"); ect char: the byte number ( use string.byte("some character") to get the number) of a character offset: the number of pixel you have to add to the glyph coordinates so that the glyph properly aligns with the rest of the characters (empty space isn't present in the glyphs, thus offset is needed) rect: is the position of the glyph in the image advance: the number of pixel to move forward for the next char image: the image which the character is located on, there will have to be several since there is a height limit of images, or we can use one long image with only one row of characters I will also need a transparent image of all of the characters that the .font file will refer to. If you would like some help, refer to the original Pingus, they use a similar setup in fonts ( I just copied most of the explanation on the line with a few edits from a conversation about fonts with one of the original developers of Pingus) Here is a link to a newer version of Pingus with source, (they state somewhere what tool they use for the font): http://code.google.com/p/pingus/downloads/list
__________________
Tools: Playlist Manager , Document to RSS , Notepad++ Instellisense Games/Apps: Asteroids, ZenFrame, Graphing Calculator, Pingus X-Fi2, Boxwars, SkiFree, Jezzball Last edited by jbob182; 12-10-2011 at 04:30 PM. |
|
#6
|
||||
|
||||
|
Here is the proper link:
http://code.google.com/p/pingus/sour...ac240d65650231 view the readme to get a link to the tools used.
__________________
Tools: Playlist Manager , Document to RSS , Notepad++ Instellisense Games/Apps: Asteroids, ZenFrame, Graphing Calculator, Pingus X-Fi2, Boxwars, SkiFree, Jezzball |
|
#7
|
||||
|
||||
|
Hm okay.. I think I get it, only the offset(5,3) I'm not quite grasping what it represents. Problem is I had intended to make this translated into as many languages as I could, meaning lots of custom font things. And also needing to have them at different size, since you said that engine of yours didn't support font sizes.
Sorry if I seem slow to understand right now, but I got some personal issues, which are also the reason for me needing to develop this app, so my mind is kind of elsewhere at the moment. EDIT: Also, I can't open the .png's to get a look on what they look like. Windows photo viewer claim corrupt files, and photoshop also complained about something... And YIKES, that's a lot of rows in the .font file... That'd take some time to type up.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ Last edited by Habhome; 12-10-2011 at 06:35 PM. |
|
#8
|
||||
|
||||
|
Hmm, ok. I can simplify all of this for you, all i need is a picture of those characters in the player's font, and they can even be in a row: ie: fonts 1-25 of Å in one image.
If you can do that, then the lua code should not take to long. As for the offset, let me explain. When you type two Å ie: Å Å, I need to know how far away to space them apart to represent a space between characters. So it should really be offset(3) for 3 pixels. Also, sorry if my thoughts seemed mixed up and misleading, I am concentrating mostly on Pingus. The lua code is so close to completion, and only has a few things left. As you can imagine, this is quite exciting; finishing a project that I started over a year ago, and it was thought to be impossible, even by myself at times.
__________________
Tools: Playlist Manager , Document to RSS , Notepad++ Instellisense Games/Apps: Asteroids, ZenFrame, Graphing Calculator, Pingus X-Fi2, Boxwars, SkiFree, Jezzball |
|
#9
|
||||
|
||||
|
Quote:
ååååääääööööÅÅÅÅÄÄÄÄÖÖÖÖ But placed so that they are directly adjacent? And the rectangle in the .font file should specify exactly a square around the corresponding character? X = "å"-Bytecode char(X);offset(3);rect(0,15,10,10);advance(10);ima ge("font.png"); --Size 10 "å" char(X);offset(3);rect(10,10,15,15);advance(15);im age("font.png"); --Size 15 "å" I'm not entirely sure how that "advance" one specifies either. If you have a char in the specified rect, then why do you need to know how far to the next one? Doesn't the rect already specify the character's width? And do you happen to know which font is used by default? Or do I have to try and match them up? From memory I believe it looks like Arial though...
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#10
|
||||
|
||||
|
I am not sure which font it is, so I would suggest:
http://www.identifont.com/ As for the .font file, just include the byte code, the rect value, and a new value called size ie: size(12) referring to the font size. And that is the correct layout for the png you provided.
__________________
Tools: Playlist Manager , Document to RSS , Notepad++ Instellisense Games/Apps: Asteroids, ZenFrame, Graphing Calculator, Pingus X-Fi2, Boxwars, SkiFree, Jezzball |
![]() |
| Tags |
| character, character set, font, issue, problem, set, trouble |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 12:38 PM.













Linear Mode
