Free Support Forum - aspose.com

Font properties should be tri-state


#1

Aspose.Words API is missing functionality to identify when font properties are inherited. Currently it’s a boolean, which can be only “true” or “false” Many font properties are tri-state , meaning they can take the values “true” , “false” , and “None” . “true” means the property is “on”, “false” means it is “off”. Conceptually, the “None” value means “inherit”. Because a style exists in an inheritance hierarchy, it is important to have the ability to specify a property at the right place in the hierarchy, generally as far up the hierarchy as possible. For example, if all headings should be in the Arial typeface, it makes more sense to set that property on the Heading 1 style and have Heading 2 inherit from Heading 1.

So if style is setting font bold property to “true”, and run has bold property set to “false” we don’t know it is “false” because user specifically set bold to false, or property was inherited from style and this “run” should “bold”.


#2

@MEDHOK

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Please attach the expected output.
  • Please create a standalone console application (source code without compilation errors) that helps us to reproduce this scenario on our end and attach it here for testing.

We will investigate this issue and log it in our issue tracking system according to your requirement. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.


#3

Please find attached. I have included sample java application which is using aspose words for java and python application, which uses python-docx package, which handles font properties correctly.


#4

aspose-test.zip (7.8 KB)


#5

Also zip file includes document.xml, which is extracted from test.docx file and xml is formatted for readability. It can be seen in xml that when run style is inherited from the parent style font properties are not being set at Run level, unless they are changed.


#6

@MEDHOK,

Thanks for sharing the detail. We have logged this feature request as WORDSNET-17492 in our issue tracking system. You will be notified via this forum thread once this feature is available.

We apologize for your inconvenience.


#7

Any update on this request?


#8

@MEDHOK,

We regret to share with you that the implementation of this feature has been postponed (no estimate is available at the moment). We will inform you via this thread as soon as this feature is available. We apologize for your inconvenience.