字体相关参数与数据集合
2023-09-27 14:21:29 时间
项目中,需要实现字体相关操作,收集了一些相关参数,可以引用的。
using System.Collections.Generic; using System.Drawing; using System.Drawing.Text; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; namespace Insus.NET.APIs { public class FontController : ApiController { [HttpPost] public IEnumerable<string> FontFamilys() { InstalledFontCollection fonts = new InstalledFontCollection(); foreach (FontFamily font in fonts.Families) { yield return font.Name; } } [HttpPost] public IEnumerable<string> FontStyles() { return new List<string>() { "normal", "italic", "oblique", "inherit", "initial", "unset" }; } [HttpPost] public IEnumerable<string> FontSizes() { return new List<string>() { "larger", "smaller", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "inherit", "initial", "unset" }; } [HttpPost] public IEnumerable<string> FontWeights() { return new List<string>() { "normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "inherit", "initial", "unset" }; } [HttpPost] public IEnumerable<string> FontVariants() { return new List<string>() { "normal", "small-caps", "inherit", "initial", "unset" }; } [HttpPost] public IEnumerable<string> LineHeights() { return new List<string>() { "normal", "inherit", "initial", "unset" }; } [HttpPost] public IEnumerable<string> FontUnits() { return new List<string>() { "%", "in", "cm", "mm", "em", "rem", "ex", "pt", "pc", "px" }; } } }
相关文章
- ASP.NET MVC之表单集合数据自动绑定到对象属性(集合)中
- 【Java集合源代码剖析】TreeMap源代码剖析
- MVC传递数据-传递对象或对象集合
- Google Earth Engine(GEE)——矢量集合中获取随机的样本点!
- Google Earth Engine ——MACAv2-METDATA 数据集涵盖美国本土的 20 个全球气候模型的集合
- 在Paddle中利用AlexNet测试CIFAR10数据集合
- MNIST数据集合在PaddlePaddle环境下使用简单神经网络识别效果
- java 有哪些常用容器(集合)?
- 【BZOJ4547】Hdu5171 小奇的集合 矩阵乘法
- 《Python数据科学指南》——1.5 使用集合
- 《Python高性能编程》——2.3 计算完整的Julia集合
- 实现List集合中数据逆序排列
- 结构化查询:结构化-结构化数据集合查询语言
- 求集合数据的均方差
- EF获取当天的数据集合
- arcgis地图数据集合
- 【Unity3D数据集合】(八)点阵列BitArray学习
- 【Unity3D数据集合】(三)字典Dictionary和哈希表Hashtable学习
- Java集合篇:LinkedList源码分析
- 大数据框架命令集合(Linux、Shell、Hadoop、Zookeeper、Kafka、Hive、Redis、Flink)
- postman(七):运行集合,看所有请求执行结果
- C# 合并两个不同类型集合数据
- 【bzoj4547】Hdu5171 小奇的集合 矩阵乘法
- Mybatis Collection查询集合只出现一条数据
- 算法2.1 假设利用两个线性表LA和LB分别表示两个集合A和B(即线性表中的数据元素即为集合中的成员),现要求一个新的集合A=AUB。这就要求对线性表作如下操作:扩大线性表LA。。。
- Java的集合排序:Collections.sort、list.sort和list.stream().sorted方法详解