We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

TextLayer Issue

Hello team,

I’m trying chage font for textlayer in psd but I have many issues with it.
I use Font Name : Lobster , Caveat ,Satisfy ,Gochi Hand , …

  1. After update textlayer , 2 text not on the same line
  2. Charactor in text is not space or space verry large for each charactor in text.

-> You can replicate the issue if you update textlayer by manually and compare it after run by code.

I also attach file Aspose.rar in link (video to show the issue and psd file to replicate) : https://drive.google.com/file/d/1wlI0RIqyrB_R56dIibE0khVUONPIbqjc/view?usp=sharing

Code :
var fontColor = Color.FromArgb(Ultils.GetArgbColor(fontInfor.ColorCode));

            layer.UpdateText(custom.Value, fontColor);

            foreach(var item in layer.TextData.Items)
                item.Style.FontName = fontInfor.FontName;
                item.Style.FontSize = layer.Font.Size;      


I counted the number of error fonts

image.png (8.3 KB)

Font error make me cannot send product to my customer and It affect the company’s revenue. Please help me to investigate and fix it as soon as posible



I have observed the video as well as requirements from you. In order to further investigate the issues on our end a ticket with ID PSDNET-972 has been created to further investigate and resolve the issue. this thread has been linked with the issue so that you may be notified once the issue will be fixed.

Hi @mudassir.fayyaz,

I really need your help to investigate and resolve it.
My customer is chasing the font issue and it verry important
Could you please help me to fix it as high priority ?



I request for your patience and will share feedback with you as soon as it will be shared.

Hi @mudassir.fayyaz,

Can I get any update ?
Customer is chasing me about text layer issue everyday , I really need you help



We have made some progress in issue although it is not completely fixed yet. I suggest you to please try using following sample code. We have shared the comparison of using existing approach as well as proposed approach.

   string sourceFileName = "fontExamples948.psd";
            string testFontsFoler = "Fonts";
            string outputPng = "output.png";


            using (PsdImage image = (PsdImage)Aspose.PSD.Image.Load(sourceFileName))
                foreach (var layer in image.Layers)
                    var textLayer = layer as TextLayer;
                    if (textLayer != null)
                        ITextPortion textPortion = textLayer.TextData.Items[0];
                        textPortion.Style.FillColor = Color.BlueViolet;


                image.Save(outputPng, new PngOptions());

ComparationWithCurrent.png (30.1 KB)
ComparationWith948.png (27.4 KB)