在记事本中获取Malayalam字体 [英] Getting malayalam font in notepad
本文介绍了在记事本中获取Malayalam字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
我正在C#wibdows应用程序中工作,我正在将一些内容写入位于启动位置的记事本print.txt.写入后,我将使用以下代码将其发送到打印机
Hi
I am working in C# wibdows application , i am writing some content to notepad ,print.txt which is located at start up position .after writing i am sending it to printer using following code
PrintDialog pd = new PrintDialog(); RawPrinterHelper.SendFileToPrinter(pd.PrinterSettings.PrinterName, Application.StartupPath + "\\print.txt");
.但是这样做时,我无法打印出malayalam字体.但是,即使在从记事本直接打印时,malayalam也会进入记事本文件中.
任何人都可以提出解决方案
预先感谢
. But when doing so i am not able to get malayalam font in print. But malayalam getting in the note pad file and even when printing directly from note pad.
Anyone can suggest a solution
Thanks in advance
推荐答案
问题与记事本无关.文本文件是一个文本文件;没有记事本文件"之类的东西.问题显然是在使用RawPrinterHelper
.它告诉我使用Unicode文件及其UTF的内容是什么?是否有BOM?
要打印Unicode文件,可以使用System.Io.StreamReader
(使用BOM表或指定编码)加载它,并使用System.Drawing.Printing.PrintDocument
类打印内容.参见:
http://msdn.microsoft.com/en-us/library/system. drawing.printing.printdocument.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system.io. streamreader.aspx [ ^ ],
http://unicode.org/ [ ^ ],
http://unicode.org/faq/utf_bom.html [
The problem has nothing to do with Notepad. The text file is a text file; there is no such thing as "Notepad file". The problem is usingRawPrinterHelper
, apparently. What does it tell it to use Unicode file and its UTF? If there a BOM?
To print Unicode file, you can load it usingSystem.Io.StreamReader
(use BOM or specify encoding) and print the content using the classSystem.Drawing.Printing.PrintDocument
. See:
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx[^],
http://msdn.microsoft.com/en-us/library/system.io.streamreader.aspx[^],
http://unicode.org/[^],
http://unicode.org/faq/utf_bom.html[^].
—SA
这篇关于在记事本中获取Malayalam字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文