/// <summary>Sets the PostScript name of the font.</summary> /// <remarks> /// Sets the PostScript name of the font. /// <br /> /// If full name is null, it will be set as well. /// </remarks> /// <param name="fontName">the PostScript name of the font, shall not be null or empty.</param> protected internal virtual void SetFontName(String fontName) { fontNames.SetFontName(fontName); if (fontNames.GetFullName() == null) { fontNames.SetFullName(fontName); } }
public virtual FontNames GetFontNames() { FontNames fontNames = new FontNames(); fontNames.SetAllNames(GetAllNameEntries()); fontNames.SetFontName(GetPsFontName()); fontNames.SetFullName(fontNames.GetNames(4)); String[][] otfFamilyName = fontNames.GetNames(16); if (otfFamilyName != null) { fontNames.SetFamilyName(otfFamilyName); } else { fontNames.SetFamilyName(fontNames.GetNames(1)); } String[][] subfamily = fontNames.GetNames(2); if (subfamily != null) { fontNames.SetStyle(subfamily[0][3]); } String[][] otfSubFamily = fontNames.GetNames(17); if (otfFamilyName != null) { fontNames.SetSubfamily(otfSubFamily); } else { fontNames.SetSubfamily(subfamily); } String[][] cidName = fontNames.GetNames(20); if (cidName != null) { fontNames.SetCidFontName(cidName[0][3]); } fontNames.SetFontWeight(os_2.usWeightClass); fontNames.SetFontStretch(FontStretches.FromOpenTypeWidthClass(os_2.usWidthClass)); fontNames.SetMacStyle(head.macStyle); fontNames.SetAllowEmbedding(os_2.fsType != 2); return(fontNames); }
protected internal virtual void SetFontName(String psFontName) { fontNames.SetFontName(psFontName); }