Exemple #1
0
        public IFont LoadFont(string fontFamily, float sizeInPoints, AGS.API.FontStyle style)
        {
            if (fontFamily == null)
            {
                return(new DesktopFont(new Font(SystemFonts.DefaultFont.FontFamily.Name, sizeInPoints, style.Convert()), this));
            }
            var family = _familyLoader.SearchByName(fontFamily);

            if (family != null)
            {
                return(new DesktopFont(new Font(family, sizeInPoints, style.Convert()), this));
            }
            return(new DesktopFont(new Font(fontFamily, sizeInPoints, style.Convert()), this));
        }
Exemple #2
0
 public IFont LoadFontFromPath(string path, float sizeInPoints, AGS.API.FontStyle style)
 {
     return(new DesktopFont(new Font(_familyLoader.LoadFontFamily(path), sizeInPoints, style.Convert())));
 }
Exemple #3
0
 public IFont LoadFont(string fontFamily, float sizeInPoints, AGS.API.FontStyle style)
 {
     return(new DesktopFont(new Font(fontFamily ?? SystemFonts.DefaultFont.FontFamily.Name, sizeInPoints, style.Convert())));
 }