Font Type Distinction Is Not Available Between Action Button or Font List

Hi Team,
I will briefly explain my use case.
The code I am using:

  auto fontData = portionFormat->get_LatinFont();
        if (fontData != nullptr)
		{
            fontFamily = fontData->get_FontName().ToUtf8String();
        }
      
		
		if(portionFormat->get_FontBold() && portionFormat->get_FontItalic())
		{
			isBoldItalic = true;
		}
		else if(portionFormat->get_FontBold())
		{
			isBold = true;
		}
		else if(portionFormat->get_FontItalic())
		{
			isItalic = true;
		}
		else
		{
			regular
		}

Now:
case 1: say fontFamily comes as Arial Black and get_FontBold() is true, because bold has been applied from the action button on powerpoint. But There is nothing called Arial Black Bold in the Font Dropdown.

case 2: if fontFamily comes as Arial and get_FontBold() is true, because bold has been applied from the fontFamily dropdown and not from the bold action button.

both cases get_FontBold() is true, But I need to know that get_FontBold() is true from where?
If it is applied from fontFamily dropdown then in draftJS: I will set fontType as bold,
else if it is applied from bold action button, then in draftJS: I will set fontWeight as bold.

Is there a way to know get_FontBold() or get_FontItalic() is set from where? by pressing action button or from fontFamily list?

@pankajku

Aspose.Slides for .NET does not provide a direct API to distinguish whether FontBold or FontItalic properties were set via a font dropdown selection or through action buttons like the Bold button . The portion format properties such as get_FontBold() and get_FontItalic() only indicate the final visual state of the text formatting, not the source of that formatting . There is no documented method in Aspose.Slides to differentiate between formatting applied from a font’s inherent bold/italic styles versus formatting applied via separate formatting actions .

Unfortunately, there is no built-in way in Aspose.Slides to determine whether the bold or italic formatting was applied from a font’s inherent style or via the formatting toolbar buttons. You may need to consider alternative approaches or custom logic based on font names and their typical styling characteristics, though this would not be 100% reliable. A support engineer will follow up in this thread if further investigation is needed.

@pankajku,
I was unable to prepare a presentation to reproduce the issue you described. Could you please share the simplest possible sample file?

bullets.pptx.zip (28.1 KB)

check the first textBox , fontFamily is Arial Black, fontType is Bold from action button
second text box, fontFamily is Arial and fontType is Bold from font list.

@pankajku,
Thank you for the sample presentation file.

Could please also clarify, how we can do this?

Screenshot 2026-01-21 at 5.35.51 PM.jpg (136.2 KB)

picture 1 - see the mouse pointer on Bold action button. The bold has been applied via action button “B”

Screenshot 2026-01-21 at 5.36.22 PM.jpg (145.5 KB)
picture 2 - See the font applied from fontFamily dropdown. Look at the mouse pointer selection.

@andrey.potapov

@pankajku,
Thank you for the clarification. PowerPoint does not distinguish whether bold was applied using the action button or the font family dropdown list. This is the same setting.

You can rename the file “bullets.pptx” to “bullets.zip”, unpack the archive, and open the file “bullets.zip/ppt/slides/slide1.xml”.

Arial black XML node:

Arial XML node:

As you can see, the document does not contain any additional information.