Hello,
In the latest version, the symbol "ij" is displayed, but you should pay attention to some nuances.
This symbol is not available in standard encodings described in the PDF specification, therefore, it cannot be displayed with standard fonts. In order to show it, we need to use some unicode font. And here the question arises, which font to choose.
Since the user can type absolutely any of the characters possible in Unicode, including hieroglyphs, this task is not trivial.
Currently an algorithm is implemented to search for a glyph of a specific character in the following fonts depending on a code page : Helvetica, SimSun, MingLiU, MS Gothic, Batang, Arial and Tahoma. If the glyph for the character is not found in these fonts, then Arial Unicode MS is used. If the glyph is also not found in latest font, then it will not be displayed. If these fonts are not present in the system, then the character will not be displayed.
In addition, even if a glyph was found, the corresponding font will still not be embedded in the PDF, and the "link" only will be indicated. And this means that on another machine, if this font is missing, the symbol will not be displayed (unless a third-party viewer replaces the missing font).
Thus, if you want to provide support for maximum number of languages, then you need to
1. Find a font that contains glyphs for all the languages you want to support.
2. Embed this font into the PDF document
3. Indicate to acroforms that they should use this font.
If you follow these steps, you will solve all the problems described above.
You can use code2000.ttf as a font - it can be downloaded here:
https://forum.patagames.com/posts/t682-How-to-generate-multilingual-content-Pdf This font contains, if I am not mistaken, more than 60 thousand. glyphs and covers almost all languages, well, maybe, except extremely rare. It also has a small size - when embedded about 3Mb, against 20Mb for, for example, Arial Unicode MS, in which there are fewer glyphs, by the way.
To embed and use it is necessary to write the following code:
Code:pdfViewer1.DocumentLoaded += (s, e) =>
{
var data = System.IO.File.ReadAllBytes(@"e:\45\code2000.ttf");
var font = PdfFont.CreateEmbeddedFont(pdfViewer1.Document, data, FontCharSet.UNICODE_CHARSET, false);
Pdfium.FPDFDOC_SetSubstitutionFont(pdfViewer1.Document.Handle, font.Handle);
};
Edited by user Wednesday, March 4, 2020 6:21:40 AM(UTC)
| Reason: Not specified