public static BMFont FontFromSize(Text.FontSize font) { switch (font) { case Text.FontSize._12pt: return(BMFont.LoadFont("fonts/font12.fnt")); case Text.FontSize._14pt: return(BMFont.LoadFont("fonts/font14.fnt")); case Text.FontSize._16pt: return(BMFont.LoadFont("fonts/font16.fnt")); case Text.FontSize._24pt: return(BMFont.LoadFont("fonts/font24.fnt")); case Text.FontSize._32pt: return(BMFont.LoadFont("fonts/font32.fnt")); case Text.FontSize._48pt: return(BMFont.LoadFont("fonts/font48.fnt")); default: return(BMFont.LoadFont("fonts/font12.fnt")); } }
public static BMFont FontFromSize(FontSize font) { switch (font) { case FontSize._12pt: return(BMFont.LoadFont("fonts/font12.fnt")); case FontSize._14pt: return(BMFont.LoadFont("fonts/font14.fnt")); case FontSize._16pt: return(BMFont.LoadFont("fonts/font16.fnt")); case FontSize._24pt: return(BMFont.LoadFont("fonts/font24.fnt")); case FontSize._32pt: return(BMFont.LoadFont("fonts/font32.fnt")); case FontSize._48pt: return(BMFont.LoadFont("fonts/font48.fnt")); default: //Logger.Instance.WriteLine("Unknown font " + font + " requested."); return(BMFont.LoadFont("fonts/font12.fnt")); } }