在C#中更改字符串的字体 [英] change font of a string in C#

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

问题描述

我正在读取一个txt文件,并将其内容写入另一个txt文件.在将内容写入新文件之前,我必须更改字符串的字体(从另一个文件读取的字符串).我应该怎么做.请帮忙.

I am reading a txt file and writing it's content to another txt file. Before writing the content to new file i have to change the font of the string (string that is read from another file). How should i do this. Please help.

推荐答案

字符串本质上没有拥有字体.如果字符串表示RTF或类似的名称,那是另一回事-它可以有效地更改RTF格式内的字体.

Strings don't inherently have fonts. If the string represents RTF or something like that, then that's a different matter - it's effectively changing the font within the RTF format.

但是,如果您只是编写纯文本文件,则完全取决于显示客户端使用的字体.

However, if you're just writing a plain text file, it's entirely up to the display client which font it uses.

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

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