字体文件和C#winform [英] Font file and C# winform

查看:230
本文介绍了字体文件和C#winform的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我尝试开始这个项目之前,我想知道是否可能。



我希望能够在单独的列表框中列出特定字体文件的内容,包括该文件的附带字符映射符号。例如,一个框中的所有数字,另一个框中的所有字母以及最后一个中的符号。



用户将能够从每个列表框中选择项目,并且将他们选择的组合显示在标签或文本框中,他们可以将其复制并粘贴到其他程序中。



我尝试了什么:



重复上述说明。



在我尝试开始这个项目之前,我我想知道是否有可能。



我希望能够在单独的列表框中列出特定字体文件的内容,包括该文件的附带字符映射符号。例如,一个框中的所有数字,另一个框中的所有字母以及最后一个中的符号。



用户将能够从每个列表框中选择项目,并且让他们选择的组合出现在标签或文本框中,他们可以复制并粘贴到不同的程序中。

解决方案

也许这些会让你开始:

WPF中的字符映射 [ ^ ]

GitHub - SixLabors / Fonts:字体加载和绘图库。 [ ^ ]


Quote:

例如,一个框中的所有数字,另一个框中的所有字母,最后是另一个中的符号。

嗯...没有。

问题是字体与0到9的意义上并没有特别的字符相关是数字,'A'到'Z'和'a'到'z'是字母等等。

字体只描述将使用a显示的字符的形状该特定字体中的特定ASCII或Unicode值。因此,如果以Wingdings为例,'!',''','4'和'5'将显示为符号'',' ',' 4 '和' 5 '



更糟糕的是,在某些字体中你会发现数字的几个不同的形状 - 我们习惯的0-9,波斯数字0-9,依此类推。



字体中没有任何东西可以告诉你这些是数字。


Before I even attempt to begin this project, I'd like to know if it's possible.

I would like to be able to list the contents of a specific font file, including the accompanying character map symbols for that file, in separate listboxes. For example, all numbers in one box, all letters in another and finally, symbols in another.

The user will then be able to select items from each listbox, and have the combination they selected appear in a label or textbox that they can copy and paste into a different program.

What I have tried:

Just a repeat of the above explanation.

Before I even attempt to begin this project, I'd like to know if it's possible.

I would like to be able to list the contents of a specific font file, including the accompanying character map symbols for that file, in separate listboxes. For example, all numbers in one box, all letters in another and finally, symbols in another.

The user will then be able to select items from each listbox, and have the combination they selected appear in a label or textbox that they can copy and paste into a different program.

解决方案

Maybe these will get you started:
Character Map in WPF[^]
GitHub - SixLabors/Fonts: Font loading and drawing library.[^]


Quote:

For example, all numbers in one box, all letters in another and finally, symbols in another.


Well ... no.
The problem is that fonts aren't specifically "character" related, in the sense that "'0' to '9' are numbers", "'A' to 'Z' and 'a' to 'z' are letters" and so on.
A font just describes the shape of a character that will be displayed using a specific ASCII or Unicode value in that particular font. So if you look at Wingdings for example, '!', '"', '4', and '5' will display as symbols '!', '"', '4', and '5'

Worse, in some fonts you will find several different "Shapes" for numbers - 0-9 as we are used to, ٠-٩ for Persian numbers, and so on.

And there isn't anything in the font to tell you "these are numbers".


这篇关于字体文件和C#winform的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆