Update text for symbol fonts


#1

I’m using Aspose to open the psd file by using the using the following code:

    private void UpdateText(string filePath, string newText)
    {
        using (var image = Image.Load(filePath))
        {
            if (!(image is PsdImage)) return;

            var psdImage = (PsdImage)image;
            var layers = psdImage.Layers;

            for (var index = layers.Length - 1; index >= 0; index--)
            {
                var layer = layers[index];

                if (!(layer is TextLayer)) continue;

                var textLayer = (TextLayer)layer;
                textLayer.UpdateText(newText);
            }

            var imageOptions = new PsdOptions(psdImage);

            var fileName = Path.GetFileName(filePath);
            var outputFilePath = Path.GetDirectoryName(filePath) + "\\target_" + fileName;
            psdImage.Save(outputFilePath, imageOptions);
        }
    }

As input, I used a file which uses symbol fonts like
“Webdings”,
“Wingdings-Regular”,
“Wingdings2”,
“Wingdings3”,
“SymbolMT”,
“MSOutlook”,
“BookshelfSymbolSeven”,
“MSReferenceSpecialty”,
“Marlett”

If I run the code on a machine which has Photoshop installed on it, it works ok.

However, when I ran this code on a machine without Photoshop installed on it, it loses fonts on the target file.


#2

@tividan,

I have observed the information shared by you and request you to please share the source PSD image, along with generated images in both environments with and without Photoshop being installed on your end. I am also assuming that you are using the latest Aspose.Imaging 18.4 for .NET on your end as well.


#3

Here are the files:
Source: https://drive.google.com/open?id=16QbP64DSXDbxIhQBmivY5vlril0tsLWT
Target with Photoshop: https://drive.google.com/open?id=19rHtdgyI8W6q_wRahnMYfk1VBtYAn0xQ
Target no Photoshop: https://drive.google.com/open?id=1xH9ae0sbeon25TwxQZFGZm9yph7XAP3f

The targets are different.


#4

@tividan,

Thank you for sharing the information with us. I have created an issue with ID IMAGINGNET-2994 in our issue tracking system 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.


#6

@tividan,

We have investigated the issue on our end. Can you please explain what do you mean “loses fonts on the target file”. On our side, when we open files generated by you and generated on machine without Photoshop, we are able to see that Photoshop display for each text layer font as in initial file. Can you please clarify this moment what is wrong and if you can please provide some screens for learning this issue.