예제 #1
0
        /// <summary>
        /// Adds the specified font.
        /// </summary>
        /// <param name="font">The font.</param>
        internal void Add(aceFont font)
        {
            if (font == aceFont.none)
            {
                return;
            }

            fontName = font.ToString().imbTitleCamelOperation(true);
            var newFont = SystemFonts.GetFontByName(fontName);

            if (newFont != null)
            {
                if (drawingFont == null)
                {
                    drawingFont = newFont;
                    family      = drawingFont.FontFamily;
                }
                systemFontList.Add(newFont);
            }

            if (_systemFont == null)
            {
                _systemFont = SystemFonts.CaptionFont;
            }
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="styleTheme"/> class.
        /// </summary>
        /// <param name="h1Size">Size of the h1.</param>
        /// <param name="pSize">Size of the p.</param>
        /// <param name="margin">The margin.</param>
        /// <param name="padding">The padding.</param>
        /// <param name="pageFontName">Name of the page font.</param>
        /// <param name="headingFontName">Name of the heading font.</param>
        public styleTheme(aceBaseColorSetEnum colorSet, Int32 h1Size, Int32 pSize, fourSideSetting margin, fourSideSetting padding,
                          aceFont pageFontName, aceFont headingFontName = aceFont.none)
        {
            palletes = new acePaletteProvider(colorSet.getSetOfColors());

            textShotProvider       = new styleTextShotProvider(this);
            styleContainerProvider = new styleContainerShotProvider(this);
            borderProvider         = new styleBorderProvider(this);
            styler = new stylerForRange(this);

            zoneMain = new cursorZone(80, 2, 2);
            cMain    = new cursor(zoneMain, textCursorMode.scroll, textCursorZone.innerZone, "themeCursor");

            body = new stylePage();
            //body.maxSize

            fontForText     = new styleTextFont(pageFontName);
            fontForHeadings = new styleTextFont(headingFontName);
            fontSize        = new styleTextSizeSet(h1Size, pSize, margin, padding);
        }
        /// <summary>
        /// Creation of new theme
        /// </summary>
        /// <param name="name"></param>
        /// <param name="baseColorA"></param>
        /// <param name="baseColorB"></param>
        /// <param name="baseColorC"></param>
        /// <param name="pageFontName"></param>
        /// <param name="headingFontName"></param>
        /// <returns></returns>
        public metaDocumentTheme makeStandardTheme(string name, string baseColorA, string baseColorB, string baseColorC, aceFont pageFontName, aceFont headingFontName)
        {
            styleTheme        stil  = new styleTheme(aceBaseColorSetEnum.aceBrightAndStrong, 28, 12, new fourSideSetting(4), new fourSideSetting(2), pageFontName, headingFontName);
            metaDocumentTheme theme = null; //= new metaDocumentTheme(name, stil);

            // Add(theme);
            return(theme);
        }
예제 #4
0
 /// <summary>
 /// Single-font constructor
 /// </summary>
 /// <param name="font"></param>
 public styleTextFont(aceFont font)
 {
     Add(font);
 }