Example #1
0
        /// <summary>
        /// Load custom fonts to be used by renderer htmls
        /// </summary>
        void LoadCustomFonts()
        {
            // load custom font font into private fonts collection

            /*NoNeed
             * var file = Path.GetTempFileName();
             * File.WriteAllBytes(file, HtmlRenderer.Resources.CustomFont);
             * _privateFont.AddFontFile(file);*/
            _privateFont.AddFontStream(HtmlRenderer.Resources.CustomFont);

            // add the fonts to renderer
            foreach (var fontFamily in _privateFont.Families)
            {
                Alt.GUI.HtmlRenderer.HtmlRender.AddFontFamily(fontFamily);
            }
        }