internal static FontInfo PlatformGetFont(string fontFaceName, float emsize, FontLoadTechnique fontLoadTechnique) { //create gdi font System.Drawing.Font f = new System.Drawing.Font(fontFaceName, emsize); FontInfo fontInfo = fontStore.GetCachedFont(f); if (fontInfo.PlatformSpecificFont == null) { switch (fontLoadTechnique) { case FontLoadTechnique.GdiBitmapFont: { //use gdi font board fontInfo.PlatformSpecificFont = new PixelFarm.Agg.Fonts.GdiTextureFont(800, 200, f, fontInfo); } break; default: { fontInfo.PlatformSpecificFont = PixelFarm.Agg.Fonts.NativeFontStore.LoadFont( "c:\\Windows\\Fonts\\" + fontFaceName + ".ttf", //sample only*** (int)emsize); } break; } } return(fontInfo); }
public static FontInfo GetFontInfo(string fontname, float emsize, FontLoadTechnique fontLoadTechnique) { return(CanvasGLPlatform.PlatformGetFont(fontname, emsize, fontLoadTechnique)); }