Sfoglia il codice sorgente

ComPDFKit(win) - FreeText传入PostScriptName

weixiangjie 7 mesi fa
parent
commit
deef8d6905

+ 4 - 2
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationControl/CPDFAnnotationControl.xaml.cs

@@ -18,6 +18,7 @@ using ComPDFKit.Tool;
 using ComPDFKit.Tool.Help;
 using ComPDFKit.Tool.SettingParam;
 using ComPDFKit.Import;
+using ComPDFKit.PDFDocument;
 using ComPDFKitViewer.BaseObject;
 using ComPDFKitViewer.Helper;
 using ComPDFKit.Viewer.Helper;
@@ -366,9 +367,10 @@ namespace Compdfkit_Tools.PDFControl
 
                         byte[] FontColor = new byte[] { freeTextData.BorderColor.R, freeTextData.BorderColor.G, freeTextData.BorderColor.B };
                         (annotHandlerEventArgs as FreeTextParam).FontColor = FontColor;
-                        (annotHandlerEventArgs as FreeTextParam).IsBold = freeTextData.IsBold;
-                        (annotHandlerEventArgs as FreeTextParam).IsItalic = freeTextData.IsItalic;
                         (annotHandlerEventArgs as FreeTextParam).FontSize = freeTextData.FontSize;
+                        string postScriptName = string.Empty;
+                        CPDFFont.GetPostScriptName(pdfFreeTextUI.CPDFFontControl.FontFamilyValue, pdfFreeTextUI.CPDFFontControl.FontStyleValue, ref postScriptName);
+                        (annotHandlerEventArgs as FreeTextParam).FontName = postScriptName;
                         switch (freeTextData.TextAlignment)
                         {
                             case TextAlignment.Left: