Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Charset Persian font #1

Open
yooni126 opened this issue Dec 24, 2017 · 5 comments
Open

Charset Persian font #1

yooni126 opened this issue Dec 24, 2017 · 5 comments

Comments

@yooni126
Copy link

yooni126 commented Dec 24, 2017

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
Copy link

PrimaryFeather commented Dec 28, 2017

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
Copy link
Owner

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
Copy link

soimy commented Dec 30, 2017

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
Copy link

soimy commented Jan 7, 2018

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
Copy link
Author

yooni126 commented Jan 8, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants