Bug 67735 - Support for complex scripts in XWPFRun
Summary: Support for complex scripts in XWPFRun
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XWPF (show other bugs)
Version: 5.2.2-FINAL
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-14 11:57 UTC by Mohammad Alhaddar
Modified: 2023-10-14 14:37 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mohammad Alhaddar 2023-10-14 11:57:10 UTC
In XWPFRun, there are some properties that must be explicitly set for complex scripts. Mainly:
- Font Size.
- Bold.
- Italic.

If the text within the run is considered a complex script then the regular setter and getters for these properties won't work, because under OOXML specification they must be implemented in their own. See ECMA OOXML Part 1, sections:
- 17.3.2.2
- 17.3.2.17
- 17.3.2.38
- 17.3.2.39

For example, if i have a run with arabic text within and i try to set the font with the current setFontSize method, then the output run would not have the font size affected, since the current implementation is for non-complex scripts only.

This is an enhancement while maintaining the current interfaces to behave the same as before while extending the functionality.