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

Free Support Forum - aspose.com

IsUnicode='true' is using a differnt font

Hello,

I have attached an example of the same text using the same FontName, but when one of the text items uses IsUnicode='true' the output is using a different font.

Is this an issue with Aspose.PDF or is this an issue with the font not supporting Unicode?

Thanks,

Chris.

Hello Chris, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I have seen the Pdf file, but I am unable to notice the font difference issue. Both the lines seem to be in same font.

One more thing, in XML file I have noticed that you are using both IsUnicode & IsFontEmbedded together. Both of these are used to embed the font information into the resultant Pdf, but the difference is, IsUnicode only embeds the font subset where as IsFontEmbedded property embeds the complete font into the output file, which ultimately increases the resultant file size.

Hello,

Thanks for the info.

I guess this issue is related to a post I posted a couple of years ago: <A href="https://forum.aspose.com/t/134046</A></P> <P>I forgot about having this issue. To get around this issue I'm embedding the font even though it's installed on my machine.</P> <P>Looks like the Unicode is showing up correctly and it's the non-embedded font that's not showing up correctly.</P> <P>I have attached a screen shot of what I see (screenprint.jpg). If you can figure out how to fix this issue great, if not I already how to get around that issue.</P> <P>However this is not the issue I was trying to troubleshoot :( I just got it confused with the issue I'm trying to trouble shoot. I was hoping to use a font installed with Windows to show you the "real" issue I'm having.

The real issue:

I have attached a .zip file with a new PDF output and a new xml file and the font files thatI have used. When I use the IsUnicode='true' the font is changed to bold. If you do not see this, let me know and I'll create another screen print.

Thanks for looking into this. Hopefully I haven't confused you :)

-Chris

Hi Chris,

I have found the reason of this problem. If you use font map you can find the following item in the Aspose.Pdf.TruetypeFontMap.xml:


C:\WINDOWS\fonts\tt0010m_.ttf
Swis721 Cn BT Bold
Swis721 Cn BT Bold
Swis721 Cn BT
Swis721 Cn BT
null

A font has several names. The problem is that some of the name we get form the font file is "Swis721 Cn BT" but not "Swis721 Cn BT Bold". I am afraid we can't resolve this problem in short time. As a workaround please edit the font map file and change all the font names to "Swis721 Cn BT Bold".

Hello,

I just wanted to see if this workaround of modifying the FontMap file is something you can fix or not. Since it looks like I'll have to modify a lot of font settings, I'm thinking of adding a standard FontMap.xml file to be included in the deployement so I can be assured that every system is using the updated font settings. But if this is something that you can fix, then I won't worry about it.

Thanks,

Chris.

FYI, here's a couple of more items I had to change with another font:

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

C:\WINDOWS\fonts\lte50144.ttf

Univers LT 47 Condensed Light

Univers LT 47 Condensed Light

Univers LT 47 CondensedLt

Univers LT 47 CondensedLt

null

To:

C:\WINDOWS\fonts\lte50144.ttf

Univers LT 47 CondensedLt

Univers LT 47 CondensedLt

Univers LT 47 CondensedLt

Univers LT 47 CondensedLt

null

And

C:\WINDOWS\fonts\lte50148.ttf

Univers LT 67 Condensed Bold

Univers LT 67 Condensed Bold

Univers LT 47 CondensedLt

Univers LT 47 CondensedLt

null

To

C:\WINDOWS\fonts\lte50148.ttf

Univers LT 67 Condensed Bold

Univers LT 67 Condensed Bold

Univers LT 47 CondensedLt Bold

Univers LT 47 CondensedLt Bold

null

Hi Chris,

If you want to include the font map in deployment you should make sure all your customers have the same environment (all needed fonts are instilled in the same folder). Otherwise some fonts may can't be found.

We will try to fix this problem from our side but I am afraid we can't fix it in short time.

Thanks for the info.