This is explained in the iText(Sharp) documentation. When you have a String with glyphs from different languages, you need to use a FontSelector
as shown in this example.
FontSelector selector = new FontSelector();
selector.AddFont(FontFactory.GetFont(FontFactory.TIMES_ROMAN, 12));
selector.AddFont(FontFactory.GetFont("MSung-Light", "UniCNS-UCS2-H", BaseFont.NOT_EMBEDDED));
Phrase ph = selector.Process(TEXT);
document.Add(new Paragraph(ph));
In this case, I add Times Roman to the font selector first, following by MSung-Light. Now all the English characters in TEXT
will be in Times Roman. The characters you say are missing will be rendered using MSung-Light. If you change the order of MSung-Light and Times Roman, the complete TEXT
will be rendered in MSung-Light, so make sure you choose your fonts wisely. The order matters, and every character in your TEXT
for which you didn't define a font will be missing.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…