Esempio n. 1
0
 protected internal virtual void SetBold(bool isBold)
 {
     if (isBold)
     {
         fontNames.SetMacStyle(fontNames.GetMacStyle() | FontMacStyleFlags.BOLD);
     }
     else
     {
         fontNames.SetMacStyle(fontNames.GetMacStyle() & (~FontMacStyleFlags.BOLD));
     }
 }
Esempio n. 2
0
        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);
        }