EvotecIT / OfficeIMO

Fast and easy to use cross-platform .NET library that creates or modifies Microsoft Word (DocX) and later also Excel (XLSX) files without installing any software. Library is based on Open XML SDK
MIT License
279 stars 49 forks source link

FonfFamilyHighAnsi missing for Paragraph #124

Closed PrzemyslawKlys closed 1 year ago

PrzemyslawKlys commented 1 year ago

As reported in issue:

FontFamilyHighAnsi is missing in Paragraph. But while thinking about it, I believe the logic needs to change for FontFamily/FontFamilyHighAnsi.

I will change the logic in OfficeIMO and PSWriteOffice and change the logic:

If you use Settings.FontFamily it will also set HighAnsi If you use Settings.FontFamilyHighAnsi it will set it for HighAnsi and read HighAnsi separately Same for Paragraph FontFamily will set both, and FontFamilyHighAnsi will just set HighAnsi. I believe this is the most common use case where both entries are the same for majority of the people and only in certain languages it will be different so they will have to ensure they run things in proper order.

In 90% of cases both FontFamily/FontFamilyHighAnsi will be the same. In other cases people will need to use correct order to set both.