Image saving failed. Custom Bitmap font

I made a bitmap font, but the program does not want to export a file with this font. I installed a folder with them, imported them, but the error does not disappear.

Aspose.PSD.CoreExceptions.ImageSaveException: Image saving failed.
—> Aspose.PSD.CoreExceptions.ImageSaveException: Image export failed.
—> System.ArgumentException: Parameter is not valid.
at System.Drawing.SafeNativeMethods.Gdip.CheckStatus(Int32 status)
at System.Drawing.Drawing2D.GraphicsPath.get_PathPoints()
at Aspose.PSD.Graphics.:slight_smile:(Font :slight_smile:, String :heart:)
at :heart: .:slight_smile:(String :slight_smile:, Font :heart:, Color :clubs:, SizeF)
at :heart: .:slight_smile:(Int32 :slight_smile:, :slight_smile: :heart:, :slight_smile: :clubs:)
at :heart: .:slight_smile:(:slight_smile: :slight_smile:, Single :heart:, Int32 :clubs:, )
at :heart: .:slight_smile:(:slight_smile: :slight_smile:, :spades:? :heart:, Rectangle :clubs:)
at :heart: .:slight_smile:(:slight_smile: :slight_smile:, :spades:? :heart:)
at :heart: .:slight_smile:(ITextPortion :slight_smile:, Int32 :heart:, :spades:? :clubs:)
at :heart: .:heart:()
at :heart: .:slight_smile:()
at :heart: .:slight_smile:(Boolean :slight_smile:)
at :slight_smile: .:slight_smile:(Rectangle :slight_smile:, RasterImage :heart:, Point :clubs:, Point)
at :slight_smile: .:spades: ?:slight_smile:(Rectangle :slight_smile:, RasterImage :heart:, Point :clubs:, Point)
at :slight_smile: .:slight_smile:(Int32 :slight_smile:, :spades: :heart:, RasterImage :clubs:, Rectangle, Point :spades:, Point ♫)
at :slight_smile: .Process(Rectangle :slight_smile:, Int32[] :heart:, Point :clubs:, Point)
at :slight_smile: . ?:slight_smile:(Rectangle :slight_smile:)
at ☼ . :slight_smile:, IList1 ♥, ♠ ♣) at ☼ .☻(Rectangle ☻, ♥, ☻ ♣, Int32, Int32 ♠, ♠ ♫) at ☻ .♥.LoadPartialArgb32Pixels(Rectangle ☻, IPartialArgb32PixelLoader ♥) at ♠ ?☻(Rectangle ☻) at ☼ .☻ ☻, IList1 :heart:, :spades: :clubs:)
at ☼ .:slight_smile:(Rectangle :slight_smile:, :heart:, :slight_smile: :clubs:, Int32, Int32 :spades:, :spades: ♫)
at ☼ .:slight_smile:(Rectangle :slight_smile: :heart:, :spades: :clubs:)
at .:heart: ?:slight_smile:(Rectangle :slight_smile:, IPartialArgb32PixelLoader :heart:)
at ♫ ?.:slight_smile:(RasterImage :slight_smile:, JpegOptions :heart:, :heart: ? :clubs:, Rectangle)
at ♫ ?.:slight_smile:(RasterImage :slight_smile:, Stream :heart:, JFIFData :clubs:, JpegExifData, XmpPacketWrapper :spades:, JpegOptions ♫, Rectangle ☼
)
at :clubs: .:spades: ?:slight_smile:(:slight_smile: :slight_smile:, RasterImage :heart:, Stream :clubs:, ImageOptionsBase, Rectangle :spades:)
at :spades: ?:slight_smile:(:slight_smile: :slight_smile:, Image :heart:, Stream :clubs:, ImageOptionsBase, Rectangle :spades:, Rectangle ♫)
at .Export(Image :slight_smile:, Stream :heart:, ImageOptionsBase :clubs:, Rectangle)
at Aspose.PSD.Image.Save(Stream stream, ImageOptionsBase optionsBase, Rectangle boundsRectangle)
— End of inner exception stack trace —
at Aspose.PSD.Image.Save(Stream stream, ImageOptionsBase optionsBase, Rectangle boundsRectangle)
at Aspose.PSD.RasterImage.Save(Stream stream, ImageOptionsBase optionsBase, Rectangle boundsRectangle)
at Aspose.PSD.Image.Save(String filePath, ImageOptionsBase options, Rectangle boundsRectangle)

@fortrane could you please provide the files and the source code you used for this.

I used default code for changing text layer:

    using (var psdImage = (PsdImage)Image.Load(documentFile))
        {
            var length = psdImage.Layers.Length;
            for (int i = 0; i < length; i++)
            {
                FontSettings.SetFontsFolder(fontsFolder);

                if (psdImage.Layers[i] is TextLayer {Name: "TEXT"} textLayer1)
                {
                    var textData = textLayer1.TextData;
                    textData.Items[0].Text = "Hello";
                }
            }
         }

In fact, the main thing for me is that it works. I used Fontself maker to generate a bitmap svg font. It is supported in Photoshop CC 2017+. It works if they write with their hands in Photoshop, but in general it does not work through c#.
CustomHandFont.7z (362.8 KB)

@DmitriySorokin, can you help me, please?