Problem with hebrew fonts

hi,

I am having a problem with Hebrew fonts like "David", "Narkisim", "Guttman Yad-Brush" and more. When setting font name to one of those fonts, at the output file the font name seems to be set right at the cell definition toolbox, but the actual visable font in the cell is another default font.

I notice an old post with the same problem (missing charset attribute in the inner styles.xml file) - CELLSNET-42550 and later fixed, but the fix does not solve the problem for other font types like those I am using.

Please help with solving the problem for all font types and not only to the "B Traffic" font.

Arnon


Hi Arnon,

Thanks for your posting and using Aspose.Cells.

Please provide us your Excel file which should contain text with all of your desired fonts and then provide us your MS-Excel generated PDF and Aspose.Cells generated PDF and also provide us your fonts.

Please see the File with Fonts.xlsx attached for your reference. We need a similar file.

We will look into your issue and fix it in our future versions. Thanks for your cooperation.

I noticed that adding a charset attribute tag to the font tag in the styles.xml inner file inside the output xlsx file fixes the problem. For example, this change fixes the problem to the David font:

How Aspose.Cells exports (not good):

After adding charset 177 (works good):

After this change the font is visible and looks good.

For your request, I am attaching:

  1. An excel file generated by aspose .cells with the font problem - fontlist_aspose.xlsx.

  2. A pdf version of the aspose generated file - fontlist_aspose.pdf.

  3. An excel file generated by MS Excel that looks good (all the Hebrew fonts are visible) - fontlist_msExcel.xlsx.

  4. A pdf version of the aspose generated file - fontlist_ msExcel.pdf.

  5. 4 zip files containing all the fonts I used in the example files – fonts_1.zip , fonts_2.zip , fonts_3.zip , fonts_4.zip**.**

This is the source code I use to generate the fontlist_aspose.xlsx file:

IList<string> fontNames = FontFamily.Families.Select(f => f.Name).ToList();

Workbook workbook = new Workbook();

WorksheetCollection sheets = workbook.Worksheets;

Cells cells = sheets[0].Cells;

cells["A1"].PutValue("Font Name");

cells["B1"].PutValue("Latin Text");

cells["C1"].PutValue("Hebrew Text");

int r = 2;

foreach (string fn in fontNames)

{

cells["A" + r.ToString()].PutValue(fn);

cells["B" + r.ToString()].PutValue("Latin Text");

cells["C" + r.ToString()].PutValue("טקסט בעברית");

Style style = cells["C" + r.ToString()].GetStyle();

style.Font.Name = fn;

cells["C" + r.ToString()].SetStyle(style);

style = cells["B" + r.ToString()].GetStyle();

style.Font.Name = fn;

cells["B" + r.ToString()].SetStyle(style);

r++;

}

workbook.Save(@"c:\temp\fontlist_aspose.xlsx", SaveFormat.Xlsx);

Notice that I need a solution not just for a specific font but for all the Hebrew fonts range.

Waiting for your answer,

Arnon

Hi Arnon,


Thank you for providing your detailed analysis of the scenario and the samples for our investigation. We have logged an investigative ticket (CELLSNET-43128) in our bug tracking system after confirming the scenario with David font family. We will soon thoroughly investigate the problem cause on our end while keeping you posted with progress on this matter. Please spare us little time for proper analysis.

Hi Arnon,

Thanks for your using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for .NET v8.2.2.2 and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-43128) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.