[]
        
(Showing Draft Content)

IThemeFont

Interface IThemeFont


public interface IThemeFont
Represents a theme font.

A theme font defines the font name and language category used by a workbook theme. It is typically accessed from a workbook's Theme through its IThemeFontScheme and IThemeFonts collections.


 Theme theme = new Theme("CustomTheme", Themes.GetBerlin());
 workbook.setTheme(theme);
 IThemeFont themeFont = workbook.getTheme().getThemeFontScheme().getMajor().get(FontLanguageIndex.Latin);
 themeFont.setName("Aptos");
 String fontName = themeFont.getName();
 
  • Method Details

    • getName

      String getName()
      Gets the name of the theme font.

      Use this method to retrieve the font family name assigned to the current theme font entry.

      
       Theme theme = new Theme("CustomTheme", Themes.GetBerlin());
       workbook.setTheme(theme);
       IThemeFont themeFont = workbook.getTheme().getThemeFontScheme().getMajor().get(FontLanguageIndex.Latin);
       themeFont.setName("Aptos");
       String fontName = themeFont.getName();
       
      Returns:
      The name of the theme font.
    • setName

      void setName(String value)
      Sets the name of the theme font.

      Use this method to set the font family name assigned to the current theme font entry.

      
       Theme theme = new Theme("CustomTheme", Themes.GetBerlin());
       workbook.setTheme(theme);
       IThemeFont themeFont = workbook.getTheme().getThemeFontScheme().getMajor().get(FontLanguageIndex.Latin);
       themeFont.setName("Aptos");
       
      Parameters:
      value - The name of the theme font.
    • getFontLanguageIndex

      FontLanguageIndex getFontLanguageIndex()
      Gets the font language type of the theme font.

      Returns the FontLanguageIndex that identifies this theme font in a theme font collection, such as Latin, EastAsian, or ComplexScript.

      
       IThemeFont themeFont = workbook.getTheme().getThemeFontScheme().getMajor().get(FontLanguageIndex.EastAsian);
       FontLanguageIndex languageIndex = themeFont.getFontLanguageIndex();
       
      Returns:
      The FontLanguageIndex of the theme font.