SynPDF icon indicating copy to clipboard operation
SynPDF copied to clipboard

Diacritical Thai characters not displayed correctly

Open dirk-qualisys opened this issue 1 year ago • 2 comments

The term ชื่อบุคคลติดต่อ (copied from the software, so same UTF8 representation) looks correct on screen and prints correctly to a PDF when I use Microsoft PrintToPDF, but when using SynPDF, its PDF result is ชื􀀀อบุคคลติดต่อ on screen and on paper. Another example is

การบ่งชี้สารเดี่ยวหรือสารผสม -> การบ่งชี􀀀สารเดี􀀀ยวหรือสารผสม

So I am quite sure it is not a font issue. Any ideas how I can get correct results?

dirk-qualisys avatar Feb 23 '24 14:02 dirk-qualisys

DId you enable Uniscribe rendering in SynPDF?

synopse avatar Feb 23 '24 15:02 synopse

Yes - this is the initializaton code:

  FPdf := TPdfDocumentGDI.Create(True, 0, True);
  FPdf.GeneratePDF15File := False;
  FPdf.CompressionMethod := cmFlateDecode;
  FPdf.EmbeddedTTF := True;
  FPdf.EmbeddedWholeTTF := False;
  FPdf.StandardFontsReplace := False;
  FPdf.UseUniscribe := True;  // http://blog.synopse.info/post/2010/05/06/Synopse-FPdf-engine-1.7.2
  FPdf.ScreenLogPixels := Screen.PixelsPerInch;

dirk-qualisys avatar Feb 23 '24 17:02 dirk-qualisys