示例#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));
        }
示例#2
0
 public IFont LoadFontFromPath(string path, float sizeInPoints, AGS.API.FontStyle style)
 {
     return(new DesktopFont(new Font(_familyLoader.LoadFontFamily(path), sizeInPoints, style.Convert())));
 }
示例#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())));
 }