Example #1
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Fills the font list.
 /// </summary>
 /// ------------------------------------------------------------------------------------
 private void FillFontList()
 {
     m_lbFontNames.Items.Clear();
     m_lbFontNames.Items.Add(FdoResources.ResourceString("kstidDefaultFont"));
     m_lbFontNames.Items.Add(FdoResources.ResourceString("kstidDefaultPubFont"));
     m_lbFontNames.Items.Add(FdoResources.ResourceString("kstidDefaultHeadingFont"));
     foreach (FontFamily family in FontFamily.Families)
     {
         m_lbFontNames.Items.Add(family.Name);
     }
 }
Example #2
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Gets the name of the font. If it is a magif font name this will return the UI name
 /// for it.
 /// </summary>
 /// <param name="fontName">Name of the font.</param>
 /// <returns>Name of the font</returns>
 /// ------------------------------------------------------------------------------------
 private string GetUiFontName(string fontName)
 {
     if (fontName == StStyle.DefaultFont)
     {
         return(FdoResources.ResourceString("kstidDefaultFont"));
     }
     else if (fontName == StStyle.DefaultPubFont)
     {
         return(FdoResources.ResourceString("kstidDefaultPubFont"));
     }
     else if (fontName == StStyle.DefaultHeadingFont)
     {
         return(FdoResources.ResourceString("kstidDefaultHeadingFont"));
     }
     return(fontName);
 }
Example #3
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Fills the font names.
 /// </summary>
 /// <param name="fIncludeRealFontNames">if set to <c>true</c> list will include both the
 /// magic font names and real font names; otherwise only the magic font names will be in
 /// the list.</param>
 /// ------------------------------------------------------------------------------------
 private void FillFontNames(bool fIncludeRealFontNames)
 {
     if (m_fFontListIncludesRealNames == fIncludeRealFontNames &&
         m_cboFontNames.Items.Count > 0)
     {
         return;                 // List is already in correct state.
     }
     m_cboFontNames.Items.Clear();
     if (m_cboFontNames.ShowingInheritedProperties)
     {
         m_cboFontNames.Items.Add(FwCoreDlgControls.kstidUnspecified);
     }
     m_cboFontNames.Items.Add(FdoResources.ResourceString("kstidDefaultFont"));
     m_cboFontNames.Items.Add(FdoResources.ResourceString("kstidDefaultPubFont"));
     m_cboFontNames.Items.Add(FdoResources.ResourceString("kstidDefaultHeadingFont"));
     if (fIncludeRealFontNames)
     {
         foreach (FontFamily family in FontFamily.Families)
         {
             m_cboFontNames.Items.Add(family.Name);
         }
     }
     m_fFontListIncludesRealNames = fIncludeRealFontNames;
 }