internal FontProgramDescriptor(FontNames fontNames, float italicAngle, bool isMonospace) { this.fontName = fontNames.GetFontName(); this.fontNameLowerCase = this.fontName.ToLowerInvariant(); this.fullNameLowerCase = fontNames.GetFullName()[0][3].ToLowerInvariant(); this.familyNameLowerCase = fontNames.GetFamilyName() != null && fontNames.GetFamilyName()[0][3] != null? fontNames.GetFamilyName()[0][3].ToLowerInvariant() : null; this.style = fontNames.GetStyle(); this.weight = fontNames.GetFontWeight(); this.macStyle = fontNames.GetMacStyle(); this.italicAngle = italicAngle; this.isMonospace = isMonospace; }
internal FontProgramDescriptor(FontNames fontNames, float italicAngle, bool isMonospace) { // Initially needed for open type fonts only. // The following sequence represents four triplets. // In each triplet items sequentially stand for platformID encodingID languageID (see open type naming table spec). // Each triplet is used further to determine whether the font name item is represented in English this.fontName = fontNames.GetFontName(); this.fontNameLowerCase = this.fontName.ToLowerInvariant(); this.fullNameLowerCase = fontNames.GetFullName()[0][3].ToLowerInvariant(); this.familyNameLowerCase = fontNames.GetFamilyName() != null && fontNames.GetFamilyName()[0][3] != null? fontNames.GetFamilyName()[0][3].ToLowerInvariant() : null; this.style = fontNames.GetStyle(); this.weight = fontNames.GetFontWeight(); this.macStyle = fontNames.GetMacStyle(); this.italicAngle = italicAngle; this.isMonospace = isMonospace; this.familyNameEnglishOpenType = ExtractFamilyNameEnglishOpenType(fontNames); this.fullNamesAllLangs = ExtractFullFontNames(fontNames); this.fullNamesEnglishOpenType = ExtractFullNamesEnglishOpenType(fontNames); }
internal CidFont(String fontName, ICollection <String> cmaps) { compatibleCmaps = cmaps; fontNames = new FontNames(); InitializeCidFontNameAndStyle(fontName); IDictionary <String, Object> fontDesc = CidFontProperties.GetAllFonts().Get(fontNames.GetFontName()); if (fontDesc == null) { throw new iText.IO.IOException("There is no such predefined font: {0}").SetMessageParams(fontName); } InitializeCidFontProperties(fontDesc); }