fontforge / designwithfontforge.com

A book about how to design new typefaces with FontForge
designwithfontforge.com
933 stars 165 forks source link

Correction on unicode slots for different forms of Peh #251

Open ahangarha opened 2 months ago

ahangarha commented 2 months ago

In Adding Glyphs to an Arabic Font page, there is a quotation from Khaled Hosny:

https://github.com/fontforge/designwithfontforge.com/blob/efdbd88e0aeb0b7c5ac63d604fda8b8799d61efd/en-US/Adding_Glyphs_to_an_Arabic_Font.md?plain=1#L86-L90

This is not correct. These forms of 'Peh' have their dedicated slot under Arabic Presentation Forms-A in the Unicode since v1.1 (1993). These slots are at: U+fb56, U+fb57, U+fb58, and U+fb59.

I prefer to keep the information in the book since it is useful but the part related to creation of different forms of the letter 'Peh' needs to be updated.

JoesCat commented 2 months ago

Can you provide a solution?

ahangarha commented 2 months ago

I just filed the issue here.

I will consult with other Persian (similar to Arabic) font designers and draft a new document for it.

JoesCat commented 2 months ago

Great. That lets everyone put in a view. Less chance for errors, and hopefully we all benefit from the best results.

ahangarha commented 2 months ago

Please assign this issue to me so that I can find it in future too.

khaledhosny commented 1 month ago

I have no recollection of the quoted text. It is slightly wrong but not so much. Positional glyphs (initial, medial, final) do not need to be encoded as they are activated by GSUB substitutions. However, there does indeed exist encoded code points for a fixed subset of Arabic cracaters in the Arabic Presentation Forms-B bloc (the U+FXXX code points mentioned above), but:

ahangarha commented 1 month ago

Thanks @khaledhosny for responding to this issue.

What is the best approach? I checked several fonts and noticed all of them use the dedicated slot. In my opinion (which is far far less credible than yours), it is better to update the text and suggest using the dedicated slot but also mention that practically, it is not required since they get used by GSUB.

Besides this, I think we need to elaborate the current approach for making glyphs for ligatures since there are more needs for ligatures in Arabic fonts (I think).

khaledhosny commented 1 month ago

Some fonts will use the encoded slots for compatibility with applications that does not support OpenType, especially if the font design is simple enough that is still usable without OpenType support. Other fonts use OpenType intensively and will not work anyway in systems with no OpenType support, so they don’t bother with the encoded slots. Some fonts, especially system fonts, will fill the encoded slots of presentation forms for completeness.

ahangarha commented 1 month ago

Do you think it is good to update the text? For sure, this sentence needs an update:

Th[ey] have no predefined slots.

Then we can propose two approaches and explain the difference.

Is there any harm in using the predefined unicode slots?

khaledhosny commented 1 month ago

Yes, I think this part should be expanded. That sentence is not correct indeed. There is no issue in using the Presentation Forms slots (other than that they might give the impression that the font is working in software that support OpenType, while it might be subtly or not-so-subtly broken in various ways).

I personally advice against using Presentation Forms slots unless one has a good reason for doing so.