Get Font Name of Portion


#1

Can you tell me how to get the font family name of a portion?


#2

Use Portion.FontIndex as an index in the Presentation.Fonts collection to obtain FontEntity object and get font name using its property FontEntity.FontName

-----------------------------------------------------------------------------------------------------

C#

FontEntity fntEnt1=srcPres.Fonts[port.FontIndex];

string fontName=fntEnt1.FontName;

FontFamily fontFamily=fntEnt.Family;

VB

Dim fntEnt1 as FontEntity=srcPres.Fonts(port.FontIndex)

Dim fontName as String=fntEnt1.FontName

Dim fontFamily as FontFamily=fntEnt1.Family;

JAVA

FontEntity fntEnt1=srcPres.getFonts().get(port.getFontIndex());

string fontName=fntEnt1.getFontName();

FontFamily fontFamily=fntEnt.getFamily();

-----------------------------------------------------------------------------------------------------

This is the FontFamily Enumeration/Interface

DONTCARE

ROMAN

SWISS

MODERN

SCRIPT

DECORATIVE