zoukankan      html  css  js  c++  java
  • 获取系统文字字体

    InstalledFontCollection ifc = new InstalledFontCollection();
                    FontFamily[] ff = ifc.Families;
                    int i = 0;
                    foreach (FontFamily f in ff)
                    {

                        ListItem lt = new ListItem(f.Name.ToString(), f.Name.ToString());
                        if (System.Text.Encoding.GetEncoding("gb2312").GetBytes(lt.Value.Remove(1)).Length == 2)
                        {
                            i++;
                            if (lt.ToString() == Convert.ToString(dt_watermark.Rows[0]["WatermarkFonts"]))
                            {
                                builder.Append("<option value=\"" + lt + "\"  selected='selected'>" + lt + "</option>");
                            }
                            else
                            {
                                builder.Append("<option value=\"" + lt + "\">" + lt + "</option>");
                            }                      
                        }
                    }

  • 相关阅读:
    秒杀应用的MySQL数据库优化
    mongodb三种存储引擎高并发更新性能专题测试
    一次项目实践中DBCP数据库连接池性能优化
    初识中间件之消息队列
    Android性能测试--内存
    JVM源码分析之栈溢出完全解读
    case when then end
    工厂模式
    单例模式
    隐藏响应的server,X-Powered-By
  • 原文地址:https://www.cnblogs.com/caishuowen/p/2071178.html
Copyright © 2011-2022 走看看