Please improve and increase slots from preview font pane [Solved]

Started by Mehrdad, Fri 10/03/2017 15:57:02

Previous topic - Next topic

Mehrdad

Hi

I finally success to solved TTF Persian fonts for AGS . It works perfect now . All slots is OK but i need more slot after red oval in below picture for add other symbols . How can I increase slot ?


My official site: http://www.pershaland.com/

Gurok

#1
AFAIK, you can't, Mehrdad.

Perhaps you could write a print function that combined glyphs from two fonts.

Other than that, you might try limiting your use of Persian to < 127 glyphs.


Ignore this. I forgot about the sprite font plugin.
[img]http://7d4iqnx.gif;rWRLUuw.gi

Mehrdad

Hi Gurok

127 symbol is enough for Persian fonts but font page in AGS show less than this . It's 10X10 = 100 and show 95 slot only. Doesn't it?
My official site: http://www.pershaland.com/

Gurok

#3
Oh, I'm sorry. My mistake. < 95 characters then.

Thinking about this, you could use a sprite font, which would remove this restriction.

http://www.adventuregamestudio.co.uk/forums/index.php?topic=44359.0
[img]http://7d4iqnx.gif;rWRLUuw.gi

Crimson Wizard

#4
TBH I do not quite understand what the problem is. Is it that you cannot edit these letters, or they don't show up in the game, or they do not show up in the Editor's preview panel?

AGS is supposed to support all 256 letters in TTF font since 3.0 and in WFN font too since 3.4.0.

But for some reason Editor does not show all letters of the font in that window. Probably it is programmed that way. So the question is, do the missing letters show up in game.

EDIT: I just looked into the Editor code, and it literally tells to draw only first 96 letters of the font on that preview.

Mehrdad

Quote from: Crimson Wizard on Fri 10/03/2017 19:00:07
TBH I do not quite understand what the problem is. Is it that you cannot edit these letters, or they don't show up in the game, or they do not show up in the Editor's preview panel?

AGS is supposed to support all 256 letters in TTF font since 3.0 and in WFN font too since 3.4.0.

But for some reason Editor does not show all letters of the font in that window. Probably it is programmed that way. So the question is, do the missing letters show up in game.

EDIT: I just looked into the Editor code, and it literally tells to draw only first 96 letters of the font on that preview.

Letters didn't show in the game and window font . It only show until red oval that I showed it in picture.
When I import TTF fonts It only show 95 item in window font an miss other words and into the game is show this 95 letters only.

I can only use TTF font for Persian letters and can't use any WFN , SCI , PNG,.. or others . Because our alphabet is not separate like yours. They stick together sometimes . 127 letters is enough and 256 is great . 

Can you increase it ? I was glad that I can solved Farsi font for AGS after a long time but now I have this problem .  It's so important for me . Otherwise I can't make my native language for my game.
My official site: http://www.pershaland.com/

Crimson Wizard

#6
There are two different and unrelated problems:

1) Letters not showing in the game
2) Letters not showing in the preview pane.

Increasing number of letters in preview may not be difficult, but I doubt it has anything to do with letters not showing in game.
So the question is, why do not they show in the game.

Can you tell:
- Which version of AGS are you using;
- How do you type strings in your game that are supposed to be printed with your font;
- Can you upload your TTF font;

Mehrdad




- Latest version 3.4.0.15

- I typed all of them in the separate program and paste in AGS . Into the AGS showed like this :  player.Say ("Svàâ,¬ Æ'Ho† "); And into the game is OK. All of characters that you see in preview pane supported into the game even rectangles is same (That seems don't support by AGS) . Preview pane is complete equal with show game . It have 95 slot ready and missed others . AFAIK 110 it's enough for Farsi font .

- Here You are:
https://www.dropbox.com/s/lpa90uykzj895b1/LMN%20Sam.ttf?dl=0
My official site: http://www.pershaland.com/

Crimson Wizard

Can you tell how could I get some text that has letters over 95th slot?

Mehrdad

#9
Quote from: Crimson Wizard on Sat 11/03/2017 13:40:37
Can you tell how could I get some text that has letters over 95th slot?

OK 95th slot is  ﺻ
Some other missed letters is       Ã˜Â¸ Ø· ع غ ف Ù‚ Ú© ....

I ready all persian letters with unicode numbers .Please get it here:
https://www.dropbox.com/s/l7m7nvt7yfb5419/PersianAndUnicode.rar?dl=0

My official site: http://www.pershaland.com/

Crimson Wizard

#10
Hmm... actually I was wrong. That editor preview shows 96 letters but not slots 0-95, it shows slots 32-127. It does not show first 32 slots, because these are special non-printable symbols.
Although this makes preview more logical, this does not explain why characters do not work in game, since AGS is supposed to support up to 256 characters.



EDIT: I opened your font in the FontForge editor, and what I can see there:

The last letter from preview is at the slot 126.
After that you have NO LETTERS until slot 160.

Mehrdad

Oh wait ... Sorry  . It show some other missed letters into the game that aren't in preview pane . Did you want  all missed letters ? And does it help to you for fix it ?
My official site: http://www.pershaland.com/

Crimson Wizard

#12
Quote from: Mehrdad on Sat 11/03/2017 15:21:16
Oh wait ... Sorry  . It show some other missed letters into the game that aren't in preview pane . Did you want  all missed letters ? And does it help to you for fix it ?

Merhdad, you are asking me to fix something, but I cannot understand what exactly.

Is it just the preview pane that you need to get fixed? Or letters displayed in game?
As I said, the preview pane is simply limited to slots 32-127. But it does not mean that other letters do not exist, it simply does not show them.
So, the question is, are those letters shown in game?
If they are shown, then it is just the preview pane that needs to be expanded.

Mehrdad

#13
Quote from: Crimson Wizard on Sat 11/03/2017 15:28:47
Merhdad, you are asking me to fix something, but I cannot understand what exactly.

Is it just the preview pane that you need to get fixed? Or letters displayed in game?
As I said, the preview pane is simply limited to slots 32-127. But it does not mean that other letters do not exist, it simply does not show them.
So, the question is, are those letters shown in game?
If they are shown, then it is just the preview pane that needs to be expanded.

Actually I want letters displayed in game.

Quote
So, the question is, are those letters shown in game?
Some letters show in the game

Maybe  expand preview pane is will be good for start and even fix . Because i can see which letters are rectangle and unknown for AGS .
My official site: http://www.pershaland.com/

Crimson Wizard

Quote from: Mehrdad on Sat 11/03/2017 15:40:09Actually I want letters displayed in game.
Maybe  expand preview pane is will be good for start and even fix . Because i can see which letters are rectangle and unknown for AGS .

Alright, that's good point.

I made a very quick fix just to resize the preview box, and here is what I see with your font:


I noticed that some letters look weird, like only small piece of them is visible. I cannot tell if this is how they are supposed to be, but I guess you know better.


Mehrdad

Great . Thanks a lot . Please let me find them ... It takes a some minutes....
My official site: http://www.pershaland.com/

Crimson Wizard

Also, I do not know why, but this font looks more "blocky" on my computer than on your screenshot... :/

Mehrdad

There is missed 25 letters :
https://www.dropbox.com/s/01ztse8pdf3tdv1/PersianMissedAGS.docx?dl=0

I know fix it is difficult for you .  If slots was editable I could fix it manually .
CW , can you send for me this version of AGS as expand preview fonts ? I want test other ttf Persian fonts and see result.

My official site: http://www.pershaland.com/

Crimson Wizard

Ok, this preview issue is an annoying one, so I decided to fix it properly. Now it displays all supported slots (0-255), uses all available window space and has vertical scrollbar if the font does not fit in visible area.

http://www.mediafire.com/file/wiht24y0231kd4t/AGS.Editor.3.4.0.15--improv-font-pane.zip

Mehrdad

Sorry for answer late

Thanks a lot for patch . I'm glad that you want fix it. I'm appreciate too much.
I'll try more than 40 fonts and result was same .Exactly Same slots is unknown for AGS . I think best solution is slot editable . So we can replace rectangle with letters as copy / paste .
My official site: http://www.pershaland.com/

SMF spam blocked by CleanTalk