myflashlab / RTL-BitmapFont

RTL Bitmap extension for Starling in Adobe Air
MIT License
6 stars 3 forks source link

Charset Persian font #1

Open yooni126 opened 6 years ago

yooni126 commented 6 years ago

Hi thanks for all that you are doing but i have a issue ... I set charset.txt with these characters : ببب ب تتت ت ضضض ض صصص ص ثثث ث ققق ق ففف ف غغغ غ ععع ع ههه ه خخخ خ ححح ح ججج ج چچچ چ ششش ش سسس س ییی ئ ی ي ببب ب للل ل اآ ننن ن ممم م ککک ک گگگ گ ظظظ ظ ططط ط زرژ و ذد پپپ پ َُِّ ":><؟{}|+_()&*!@#$%×÷÷`|;'[].,/\،-= 12345567890 but my export png is very small : nazanin 0

Did i make a mistake? can u help me?

with the best wishes in new year Younes

PrimaryFeather commented 6 years ago

You should probably post this report on the issue tracker of msdf-bmfont-xml, Younes!

Maybe Hadi has an idea about what the problem is, but the author of msdf-bmfont-xm can probably look into it more thoroughly. Either way, I recommend you post the font name and the exact command line arguments you used to create that font texture.

myflashlab commented 6 years ago

I really don't know what is happening behind the scene with fonts but in my experience, I noticed that even some Persian characters with exactly the same look have two or sometimes more charcodes! And when their alternatives are missing, texts won't show correctly.

The best option I could think of was to use glyphdesigner and exported my target font completely. Then I used the exported .fnt file as the charset.txt input in the msdf-bmfont-xml.

FYI: When exporting with glyphdesigner, it gives you the texture and the .fnt file which you can use in your Starling project. but the .fnt file includes ALL the characters available in your target font file. feeding msdf-bmfont-xml with that file will assure you that you are including all the characters found in your target font file.

But still, some characters (mainly used in Arabic not Persian) are missing as I described in the README.md page. which seems to be something that msdf-bmfont-xml could fix. unfortunately I don't know how to explain them to msdf-bmfont-xml 😆

soimy commented 6 years ago

I'm currently searching a solution of this. I highly suspect the problem lies in the node.js opentype.js module. @myflashlab Also the RTL font problem should be a bug in old opentype.js xadvance bug which I described in soimy/msdf-bmfont-xml#9 The opentype.js module in my repo is updated to v7 but bring in a new issue with ttf font, so I haven't published it to npm yet. Will keep u updated.

soimy commented 6 years ago

Update and bumped a version in soimy/msdf-bmfont-xml#14 with many bug fixes. Though xadvance issue in RTL language have not been fixed, now you don't need to feed .fnt generated by GlyphDesigner anymore @myflashlab .

yooni126 commented 6 years ago

Thank you @soimy xoffsetproblem Now we don't need to feed .fnt generated by GlyphDesigner , just set charset.txt but as you said xadvance issue in RTL language have not been fixed