I tried to install and use a font in my WPF application, but all I get is like this:
Here is the code I tried to use the font:
richtext1.FontFamily = "SH_Roq'a";
The expected result is: ( snap shot from MS Word )
If I try to add the font file to the project folder, and use it as a resource, like this:
richtext1.FontFamily = "./#SH_Roq'a";
I won't get the square results, but, I won't have the expected font either! What I get is Tahoma font:
which is not the targeted font, please download the targeted font file here for experiments
Any help is appreciated!
EDIT
The plain text for the above captured text is:
تفاح احمر
So for those who are experts with using fonts, they can experiment with.
There are several problems with the font:
it is not Unicode-encoded: it uses a Platform ID 3, Encoding ID 0 cmap subtable, also known as a "Symbol" table. These do not generally work well outside of old-style Windows desktop applications.
there are no OpenType Layout features (GSUB, GPOS, etc.) which are essential for correct shaping (initial, medial, final, isolated forms; lam-alef ligatures, etc.) of Arabic/Urdu/Farsi writing.
it uses a very, very old OS/2 table (version 0). Some Microsoft technologies require version 1 at minimum. There are also reserved bits set in the fsSelection field of this table and a number of other suspect settings.
I stopped looking there. This font appears to have been built with very old tools, using outdated knowledge of font construction. It needs significant updating in order to work correctly in modern environments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With