- edited description
OpenXML Filter: run fonts hint improperly handled
Consequential runs with different meanings of rFonts
hint
attributes are merged into one run:
On the left is the part of the original document and on the right is the output. For more details please refer to the attached files.
Comments (6)
-
reporter -
reporter A bit more information on the issue.
The document default style:
<w:rFonts w:asciiTheme="minorHAnsi" w:eastAsiaTheme="minorEastAsia" w:hAnsiTheme="minorHAnsi" w:cstheme="minorBidi"/>
is substituted by default paragraph style:
<w:rFonts w:ascii="Courier New" w:hAnsi="Courier New" w:cs="Courier New"/>
So, every run without
rFonts
formatting obtains the default.Furthermore, the first run with
w:hint="eastAsia"
attribute (a symbol beforeΩ
) get the following:<w:rFonts w:ascii="SimSun" w:eastAsia="SimSun" w:hAnsi="Far East" w:cs="Courier New" w:hint="eastAsia"/>
And the consequential run (
Ω
) with the defaultrStyle
property is merged with the previous one with the very samehint
attribute value:<w:rFonts w:ascii="Courier New" w:eastAsia="SimSun" w:hint="eastAsia"/>
The spec says that
hint
specifies the font type which shall be used to format any ambiguous characters, which are not explicitly stored in the document, and may be mapped into multiple categories of the four available, in the current run. This is primarily used to handle the formatting on the paragraph mark glyph, and other “special” characters.And the following table values can be used to select one or another category:
<cs>
(Complex Script Font): Specifies that the font hint for this text run shall be to use the Complex Script font defined on the run via the style hierarchy.<default>
(High ANSI Font): Specifies that the font hint for this text run shall be to use the High ANSI font defined on the run via the style hierarchy.<eastAsia>
(East Asian Font): Specifies that the font hint for this text run shall be to use the East Asian font defined on the run via the style hierarchy.That is great, but there is nothing said about the
<ascii>
category which is selected when there is nohint
attribute provided! Hence, when the “special” characters are present in the document content,hint
attributes and thenrFonts
properties and then runs mustn’t be merged if their (hint
) values are different. -
reporter - changed title to OpenXML Filter: run fonts hint improperly handled
- changed milestone to M39
A more precise aim for this issue is set.
-
reporter A related pull request #361 was opened.
-
reporter - changed status to resolved
The pull request #361 has been merged.
-
- changed milestone to 1.39.0
- Log in to comment