johanmattssonm / birdfont

A font editor for creating fonts in TTF, EOT, SVG and BIRDFONT format.
https://birdfont.org
462 stars 32 forks source link

Kasra and Sukun Glyphs Guide Spacing problem #136

Open ahmadyousefdev opened 2 years ago

ahmadyousefdev commented 2 years ago

Hello, When I test the font I'm making in the Kerning tab, I get a problem with "Kasra" and "Sukun" Arabic Glyphs; When I add the "Sukun" for example, a space accrues between the characters before and after it:

Screen Shot 2022-06-19 at 17 53 03

I have moved the guides to the middle so there is no gab before or after the glyph, this worked for the other "harakat" like "Fatha" and "Damma" but didn't work for "Kasra" and "Sukun". It also did not work with "Fathatan", "Dammatan" and "Kasratan" but I think that's normal because those glyphs come at the end of the word anyway. See the next image for an example of how I moved the guides to the center.

Screen Shot 2022-06-19 at 17 53 11

Am I doing this right? or is there another way to remove the gabs? because those glyphs are supposed to be floating over the other character glyphs.

johanmattssonm commented 2 years ago

Thank you for using Birdfont. I am no expert when it comes to Arabic writing but I think you don't create zero width glyphs for Kasra (and other characters). You should probably create a ligature instead that places the mark in exactly the right place relative to the base character. Please let me know if I am wrong.

ahmadyousefdev commented 2 years ago

Hello John, The "tashkil" glyphs are marked to base attachments and they are not ligatures. They are divided into two types:

  1. Above the character and they are U+064b U+064c U+064e U+064f U+0651 U+0652
  2. Under the character and they are U+064d U+0650

The weird thing is, I exported the font and tried it on Photoshop, the Kasrah and Sukun glyphs looks normal, see the image below:

Screen Shot 2022-06-20 at 13 20 08

I downloaded a font and opened it with Birdfont, turned out they did the same thing to those glyphs "zero width glyph", I tried writing the Kasra and sukun with this font too in the Kerning tab, but sadly the same thing happened. I think this is a bug in the app itself.

On other note, the font I exported did not work as expected in MS Word, the characters are not connected and the ligatures are ignored, while they work perfectly on adobe photoshop!, please see the image below:

Screen Shot 2022-06-20 at 13 22 23
johanmattssonm commented 2 years ago

Thank you for the followup. Please send me the fonts. I would like to figure out why this happens. You can use email if you don't want them to become public: johan.mattsson.m@gmail.com

johanmattssonm commented 2 years ago

Thank you. This video explains it. I need to implement support for marks in the gsub table.

ahmadyousefdev commented 2 years ago

Thank you, I sent the fonts to your email. I deleted the video comment because I thought it was irrelevant 😥 Maybe it's a Unicode problem ?

johanmattssonm commented 2 years ago

It is a gpos problem. The video was very relevant.

ahmadyousefdev commented 1 year ago

Is there any update regarding this issue?

johanmattssonm commented 1 year ago

I have spent quite some time and made some progress but there is still a number of things to fix. I don't know when the code is ready for release.

johanmattssonm commented 1 year ago

Can you attach a short text here with example letters (in plain text)? I would like to check how things work in a browser but I can't write Arabic.

ahmadyousefdev commented 1 year ago

That's great to hear! here is a sample text of lorem ipsum but in Arabic:

لوريم ايبسوم دولار سيت أميت ,كونسيكتيتور أدايبا يسكينج أليايت,سيت دو أيوسمود تيمبور أنكايديديونتيوت لابوري ات دولار ماجنا أليكيوا . يوت انيم أد مينيم فينايم,كيواس نوستريد أكسير سيتاشن يللأمكو لابورأس نيسي يت أليكيوب أكس أيا كوممودو كونسيكيوات . ديواس أيوتي أريري دولار إن ريبريهينديرأيت فوليوبتاتي فيلايت أيسسي كايلليوم دولار أيو فيجايت نيولا باراياتيور. أيكسسيبتيور ساينت أوككايكات كيوبايداتات نون بروايدينت ,سيونت ان كيولبا كيو أوفيسيا ديسيريونتموليت انيم أيدي ايست لابوريوم.

This paragraph includes a lot of Arabic language word forms.

and here are some sentences with Arabic Glyphs:

رَجَعُوا إلى المَنزِلِ في شوَّالٍ مِن نفسِ السَّنةِ.

وإنَّ كَانَت هُناك إشاراتٌ ودِلالاتٌ.

كَتَب سُليمانَ كِتابًا لِصَدِيقه يُهَنِّئُه بالتٌَخرٌِج.

I wish you good luck and I let me know if I can help you with anything.

johanmattssonm commented 1 year ago

👍👍🌤️

ahmadyousefdev commented 9 months ago

no updates yet @johanmattssonm ?

johanmattssonm commented 9 months ago

Yes, some progress: there is now a mark to base feature that lets you create new glyph with this feature but I have not implemented a parser. I will also add mark to mark as soon as possible.

algometric commented 8 months ago

Forgive me if this isn't the best place to add: will there be support for attaching multiple mark glyphs in series to the prior base glyph, instead of mark-on-mark?

johanmattssonm commented 8 months ago

Hi. I am not sure if that is possible according to the TTF/OTF specification. If you or any else knows if this is possible, please share this info with me.