This commit is contained in:
30
PROMS/Volian.Svg.Library/FontFind.cs
Normal file
30
PROMS/Volian.Svg.Library/FontFind.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace Volian.Svg.Library
|
||||
{
|
||||
//public static class FontFind
|
||||
//{
|
||||
// public static string FileName(string fontName)
|
||||
// {
|
||||
// string baseFont = string.Empty;
|
||||
// Regex find = new Regex(fontName + @".* ?\(.*\)", RegexOptions.IgnoreCase);
|
||||
// RegistryKey regKey = Registry.LocalMachine.CreateSubKey(@"Software\Microsoft\Windows NT\CurrentVersion\Fonts");
|
||||
// string[] values = regKey.GetValueNames();
|
||||
// baseFont = regKey.GetValue(values[0]).ToString();
|
||||
// foreach (string valueName in regKey.GetValueNames())
|
||||
// {
|
||||
// if (find.IsMatch(valueName))
|
||||
// return regKey.GetValue(valueName).ToString();
|
||||
// }
|
||||
// return baseFont;
|
||||
// }
|
||||
// public static string FullFileName(string fontName)
|
||||
// {
|
||||
// return @"c:\windows\fonts\" + FileName(fontName);
|
||||
// }
|
||||
//}
|
||||
}
|
Reference in New Issue
Block a user