Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Tue Jan 26, 2021 11:39 am

I want to adjust font spacing to adjust text kerning, but I can't find any properties of that.
Can Spire.Presentaion get and set font spacing?

Regards.

junichi.matsunoshita@fujixerox.co.jp
 
Posts: 12
Joined: Thu Jul 04, 2019 3:54 am

Wed Jan 27, 2021 2:37 am

Hello,

Thanks for your inquiry!

Please refer to the following code to get and set the font spacing.
Code: Select all
            foreach(ISlide slide in ppt.Slides)
            {
                foreach (IShape ishape in slide.Shapes)
                {
                    IAutoShape autoShape = ishape as IAutoShape;
                    foreach (TextParagraph textParagraph in autoShape.TextFrame.Paragraphs)
                    {
                        foreach (TextRange textRange in textParagraph.TextRanges)
                        {
                            //set font space
                            textRange.LineSpacing = 5f;
                            //get font space
                            float lineSpace = textRange.LineSpacing;
                        }
                    }
                }
            }


If you encounter any issues related to our product in the future, just feel free to contact us.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Wed Jan 27, 2021 11:12 am

Thank you for quick response, Marcia.
I tried your code and I could get the result.
Thank, again.

junichi.matsunoshita@fujixerox.co.jp
 
Posts: 12
Joined: Thu Jul 04, 2019 3:54 am

Thu Jan 28, 2021 1:10 am

Hello,

You are welcome!

Glad to hear that your issue has been solved.If you encounter any issues related to our product in the future, just feel free to contact us.

Have a nice day!

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.Presentation