首页 > 其他分享 >fp 字体

fp 字体

时间:2022-11-26 14:01:14浏览次数:44  
标签:fp Arial Sans ++ Lucida 字体 MS var

 

 

var l = ["monospace", "sans-serif", "serif"];

var u = ["Andale Mono", "Arial", "Arial Black", "Arial Hebrew", "Arial MT", "Arial Narrow", "Arial Rounded MT Bold", "Arial Unicode MS", "Bitstream Vera Sans Mono", "Book Antiqua", "Bookman Old Style", "Calibri", "Cambria", "Cambria Math", "Century", "Century Gothic", "Century Schoolbook", "Comic Sans", "Comic Sans MS", "Consolas", "Courier", "Courier New", "Garamond", "Geneva", "Georgia", "Helvetica", "Helvetica Neue", "Impact", "Lucida Bright", "Lucida Calligraphy", "Lucida Console", "Lucida Fax", "LUCIDA GRANDE", "Lucida Handwriting", "Lucida Sans", "Lucida Sans Typewriter", "Lucida Sans Unicode", "Microsoft Sans Serif", "Monaco", "Monotype Corsiva", "MS Gothic", "MS Outlook", "MS PGothic", "MS Reference Sans Serif", "MS Sans Serif", "MS Serif", "MYRIAD", "MYRIAD PRO", "Palatino", "Palatino Linotype", "Segoe Print", "Segoe Script", "Segoe UI", "Segoe UI Light", "Segoe UI Semibold", "Segoe UI Symbol", "Tahoma", "Times", "Times New Roman", "Times New Roman PS", "Trebuchet MS", "Verdana", "Wingdings", "Wingdings 2", "Wingdings 3"];

var e = document.getElementsByTagName('body')[0];

var o = document.createElement('div');
var p = document.createElement('div');

var r = {}
  , i = {};

function h() {
    var e = document.createElement('span');
    e.style.position = 'absolute';
    e.style.left = '-9999px';
    e.style.fontSize = '72px';
    e.innerHTML = 'mmmmmmmmmmlli';
    return e;
}

var n = function() {

    for (var e = [], t = 0, n = l.length; t < n; t++) {
        var r = h();
        r.style.fontFamily = l[t],
        o.appendChild(r),
        e.push(r);
    }
    return e;

}();

e.appendChild(o);

for (var s = 0, a = l.length; s < a; s++)
    r[l[s]] = n[s]['offsetWidth'],
    i[l[s]] = n[s]['offsetHeight'];

function t(e) {
    for (var t = !1, n = 0; n < l['length']; n++)
        if (t = e[n]['offsetWidth'] !== r[l[n]] || e[n]['offsetHeight'] !== i[l[n]])
            return t;
    return t;
}
;
var c = function() {

    for (var e, t, n, r = {}, o = 0, i = u['length']; o < i; o++) {
        for (var s = [], a = 0, c = l['length']; a < c; a++) {
            var _ = (e = u[o],
            t = l[a],
            n = void 0,
            (n = h())['style']['fontFamily'] = "'" + e + "'," + t,
            n);
            p['appendChild'](_),
            s['push'](_);
        }
        r[u[o]] = s;
    }
    return r;
}();
e['appendChild'](p);

for (var _ = [], f = 0, g = u['length']; f < g; f++)
    t(c[u[f]]) && _['push'](u[f]['replace'](/\s/g, ''));
var d = _['join'](',');

console.log(d);

 

标签:fp,Arial,Sans,++,Lucida,字体,MS,var
From: https://www.cnblogs.com/angdh/p/16927325.html

相关文章

  • matplotlib 字体
    linux平台matplotlib字体报错如下:Fontfamily['TimesNewRoman']notfound.解决步骤:step1condainstall-cconda-forge-ymscorefontsstep2importm......
  • FPGA+MPU+MCU三芯合一!米尔全自动血细胞分析仪解决方案
    全自动血细胞分析仪是医院临床检验应用非常广泛的仪器之一,用来检测红细胞、血红蛋白、白细胞、血小板等项目。是基于电子技术和自动化技术的全自动智能设备,功能齐全,操作简单......
  • 深入了解PHP-FPM
    PHP-FPM(PHPFastCGIProcessManager)意:PHPFastCGI进程管理器,用于管理PHP进程池的软件,用于接受web服务器的请求。PHP-FPM提供了更好的PHP进程管理方式,可以有效控制内存......
  • DFP 数据转发协议应用实例 7.使用 DLS1x 与 VSxxx 设备的 LoRA 匹配
    DFP数据转发协议应用实例7.使用DLS1x与VSxxx设备的LoRA匹配 DFP是什么?稳控科技编写的一套数据转发规则,取自“自由转发协议FFP(FreeForwardProtocol)”,或者......
  • vue中引入字体
    前言:做大屏项目需要引入字体做个记录一、先看看效果   二、实现1、下载字体文件分享一个下载开源字体网站:https://www.dafont.com/theme.php2、文件放到项目中可......
  • android改变按下和放开组件时字体的颜色
    <?xmlversion="1.0"encoding="utf-8"?><selectorxmlns:android="http://schemas.android.com/apk/res/android"><itemandroid:state_pressed="true"android:color=......
  • 修改textinputlayout hiit 字体大小
    <stylename="textinput_layout_style_black_deep"parent="Theme.MyApplication.App.NoActionBar"><itemname="boxStrokeWidth">1dp</item><itemname="h......
  • DFP 数据转发协议应用实例 5.与其它厂商 LoRA 设备匹配
    DFP数据转发协议应用实例5.与其它厂商LoRA设备匹配DFP是什么?稳控科技编写的一套数据转发规则,取自“自由转发协议FFP(FreeForwardProtocol)”,或者DFP(DoubleFProt......
  • DFP 数据转发协议应用实例 5.与其它厂商 LoRA 设备匹配
    DFP数据转发协议应用实例5.与其它厂商LoRA设备匹配 DFP是什么?稳控科技编写的一套数据转发规则,取自“自由转发协议FFP(FreeForwardProtocol)”,或者DFP(DoubleF......
  • 【FPGA & Verilog】手把手教你实现一个DDS信号发生器
    信号发⽣器的设计与实现1.输出波形:⽅波(占空⽐50%)、锯⻮波、三⻆波、脉冲信号(占空⽐连续可调)、正弦波、任意波等2.输出频率:100KHz3.波形选择:使⽤拨码开关选择 思路......