Closed leesatoh closed 3 months ago
Any code that does not fit into 16 bits (i.e. anything beyond 0xffff) falls in the surrogate pair range. I do not see any code. Difficult for us to reproduce.
Hi @TH-Soft ,
Thanks for your reply.
I provied my code. It simply outputs a word to the PDF file. This program need font file ipamjm.ttf
in fonts directory.
SamplePDFsharp.zip
var data = new Dictionary<string, string>
{
{"MJ054956", char.ConvertFromUtf32(0x29C9C)},
};
Thanks. lee
I'll check it on Monday. The code in question has meanwhile been reworked, but was not yet published (work in progress).
Thanks for your feedback. PDFsharp did not handle the glyph ID returned for 0x29C9C correctly, leading to that exception. Previously, we only tested surrogate pairs with some Emojis, but character 0x29C9C for that font behaves differently.
Will be fixed with 6.1.0-preview-2.
Now works with 6.1.0 preview 2.
Hi,
I attempted to write Japanese Kanji into a PDF using PDFsharp. When I tried to encode the character with the code 0x29C9C, PDFsharp threw an ArgumentOutOfRangeException. This seems incorrect because 0x29C9C is not within the surrogate pair range. The exception message was as follows:
Thanks.