ReloadData() public method

Reloads this Fonts internal data and rasterizes its glyphs.
public ReloadData ( ) : void
return void
コード例 #1
0
ファイル: FontFileImporter.cs プロジェクト: gitMaxim/duality
 public void ImportFile(string srcFile, string targetName, string targetDir)
 {
     string[] output = this.GetOutputFiles(srcFile, targetName, targetDir);
     Font res = new Font();
     res.LoadCustomFamilyData(srcFile);
     res.ReloadData();
     res.Save(output[0]);
 }
コード例 #2
0
ファイル: Font.cs プロジェクト: undue/duality
		internal static void InitDefaultContent()
		{
			const string VirtualContentPath				= ContentProvider.VirtualContentPath + "Font:";
			const string ContentPath_GenericMonospace10	= VirtualContentPath + "GenericMonospace10";
			const string ContentPath_GenericMonospace8	= VirtualContentPath + "GenericMonospace8";
			const string ContentPath_GenericSerif12		= VirtualContentPath + "GenericSerif12";
			const string ContentPath_GenericSansSerif12	= VirtualContentPath + "GenericSansSerif12";

			Font tmp;
			
			tmp = new Font();
			tmp.Family = FontFamily.GenericMonospace.Name;
			tmp.Size = 8;
			tmp.CharSpacing = 0;
			tmp.GlyphRenderMode = RenderMode.MonochromeBitmap;
			tmp.MonoSpace = true;
			tmp.ReloadData();
			ContentProvider.AddContent(ContentPath_GenericMonospace8, tmp);

			tmp = new Font();
			tmp.Family = FontFamily.GenericMonospace.Name;
			tmp.Size = 10;
			tmp.CharSpacing = 0;
			tmp.GlyphRenderMode = RenderMode.MonochromeBitmap;
			tmp.MonoSpace = true;
			tmp.ReloadData();
			ContentProvider.AddContent(ContentPath_GenericMonospace10, tmp);

			tmp = new Font();
			tmp.Family = FontFamily.GenericSerif.Name;
			tmp.Size = 12;
			tmp.GlyphRenderMode = RenderMode.MonochromeBitmap;
			tmp.Kerning = true;
			tmp.MonoSpace = false;
			tmp.ReloadData();
			ContentProvider.AddContent(ContentPath_GenericSerif12, tmp);

			tmp = new Font();
			tmp.Family = FontFamily.GenericSansSerif.Name;
			tmp.Size = 12;
			tmp.GlyphRenderMode = RenderMode.MonochromeBitmap;
			tmp.Kerning = true;
			tmp.MonoSpace = false;
			tmp.ReloadData();
			ContentProvider.AddContent(ContentPath_GenericSansSerif12, tmp);

			GenericMonospace8	= ContentProvider.RequestContent<Font>(ContentPath_GenericMonospace8);
			GenericMonospace10	= ContentProvider.RequestContent<Font>(ContentPath_GenericMonospace10);
			GenericSerif12		= ContentProvider.RequestContent<Font>(ContentPath_GenericSerif12);
			GenericSansSerif12	= ContentProvider.RequestContent<Font>(ContentPath_GenericSansSerif12);
		}
コード例 #3
0
		internal static void InitDefaultContent()
		{
			Font tmp;
			
			tmp = new Font();
			tmp.Family = FontFamily.GenericMonospace.Name;
			tmp.Size = 8;
			tmp.CharSpacing = 0;
			tmp.GlyphRenderHint = RenderHint.Monochrome;
			tmp.MonoSpace = true;
			tmp.ReloadData();
			ContentProvider.RegisterContent(ContentPath_GenericMonospace8, tmp);

			tmp = new Font();
			tmp.Family = FontFamily.GenericMonospace.Name;
			tmp.Size = 10;
			tmp.CharSpacing = 0;
			tmp.GlyphRenderHint = RenderHint.Monochrome;
			tmp.MonoSpace = true;
			tmp.ReloadData();
			ContentProvider.RegisterContent(ContentPath_GenericMonospace10, tmp);

			tmp = new Font();
			tmp.Family = FontFamily.GenericSerif.Name;
			tmp.Size = 12;
			tmp.Kerning = true;
			tmp.GlyphRenderHint = RenderHint.Monochrome;
			tmp.ReloadData();
			ContentProvider.RegisterContent(ContentPath_GenericSerif12, tmp);

			tmp = new Font();
			tmp.Family = FontFamily.GenericSansSerif.Name;
			tmp.Size = 12;
			tmp.Kerning = true;
			tmp.GlyphRenderHint = RenderHint.Monochrome;
			tmp.ReloadData();
			ContentProvider.RegisterContent(ContentPath_GenericSansSerif12, tmp);

			GenericMonospace8	= ContentProvider.RequestContent<Font>(ContentPath_GenericMonospace8);
			GenericMonospace10	= ContentProvider.RequestContent<Font>(ContentPath_GenericMonospace10);
			GenericSerif12		= ContentProvider.RequestContent<Font>(ContentPath_GenericSerif12);
			GenericSansSerif12	= ContentProvider.RequestContent<Font>(ContentPath_GenericSansSerif12);
		}
コード例 #4
0
 private void RetrieveResources()
 {
     if (!this.bigFont.IsAvailable)
     {
         Font bigFontRes = new Font();
         bigFontRes.Family = System.Drawing.FontFamily.GenericSansSerif.Name;
         bigFontRes.Size = 32;
         bigFontRes.Kerning = true;
         bigFontRes.ReloadData();
         ContentProvider.AddContent(bigFont.Path, bigFontRes);
     }
 }
コード例 #5
0
		private void RetrieveResources()
		{
			if (!this.bigFont.IsAvailable)
			{
				Font bigFontRes = new Font();
				bigFontRes.Family = System.Drawing.FontFamily.GenericSansSerif.Name;
				bigFontRes.Size = 32;
				bigFontRes.Kerning = true;
				bigFontRes.GlyphRenderHint = Duality.Resources.Font.RenderHint.AntiAlias;
				bigFontRes.ReloadData();
				ContentProvider.RegisterContent("__editor__bigfont__", bigFontRes);
			}
		}