We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

MS Mincho Font Name

Hi,

I have a document with Japanese characters and the asian font used to display these characters is MS Mincho. However, if I query the name of the font on the runs, the name is MS 明朝. I guess this is the translated Japanese name of the font.

Is it possible to query the font name in such a manner that it is language-independent, e.g. I would always get the MS Mincho font name or an equivalent id?

Hope this make sense…

Thanks,

Christophe

Hi Christophe,


Thanks for your inquiry. Could you please attach your input Word document and piece of code you are using here for testing? We will investigate the issue on our end and provide you more information.

Best regards,

Hi Awais,

I have attached a test project and made a screencast that demonstrates the problem. In the screencast, you can see that the font far east name appears with asian characters, howeve I’d like to be able to retrieve the asian font name in latin characters, the same name I see in Winword’s font dialog (MS Mincho).

Is this possible?

http://www.screencast.com/t/4WwmcPDRDPM

Hi Christophe,


Thanks for your inquiry. After an initial test with Aspose.Words 16.12.0, we were unable to reproduce this issue on our end (see attached sample console app). We would suggest you please upgrade to the latest version of Aspose.Words. You can download it from the following link:
http://downloads.aspose.com/words/net

Best regards,

Hi Awais,

I’ve installed Aspose.Words 16.12 and still experience the same problem. One thing that could explain that I have a different behavior than you is that I have three languages installed on my Windows:

http://www.screencast.com/t/TOjyygkTPt

I need to have these three languages because we now have to process Japanese and Arabic documents.

My OS is Windows 8.1 Pro 64Bit

Thanks,

Christophe

Hi Christophe,


The problem occurs on your end because you’re using Aspose.Words in evaluation mode (without applying license).

Please try using the following code with and without applying license to see the difference in Run nodes:

string MyDir = @“D:\Temp”;

Aspose.Words.License license = new Aspose.Words.License();

//license.SetLicense(MyDir + @"Aspose.Total.lic");

Document doc = new Document(MyDir + @"Hello World.docx");

var firstRun = doc.Sections[0].Body.Paragraphs[0].Runs[0];

Console.WriteLine(firstRun.Text);

Console.WriteLine(firstRun.Font.NameAscii);

Console.WriteLine(firstRun.Font.NameFarEast);

Console.WriteLine(firstRun.Font.NameBi);

Console.Read();


Best regards,

Hi Awais,

Thanks that was the problem, it now also works on my side. Odd thing is, in our production application where the license is applied, I’d swear that I had seen the font name using Asian characters, but I just tested it now and the font name also appears correctly in Latin characters…

Thanks,

Christophe

Hi Christophe,

It is great you were able to resolve this issue on your end. If we can help you with anything else, please feel free to ask.

Best regards,