corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kelly <>
Subject Re: ODF styles
Date Thu, 02 Jul 2015 16:36:51 GMT
> On 28 Jun 2015, at 5:39 pm, Ian C <> wrote:
> When processing ODF styles there are a number of attributes for which
> there are no CSS equivalents. eg font-size-asian
> I have not seen a document where this is not equal to the general
> font-size value.
> I plan to put a crosscheck in to confirm this and so when translating
> from CSS to ODF will default the value to be the same.
> If there is a difference I guess we can create a -cor-font-size-asian
> property to hold the value.
> This should just be quietly ignored by a browser?
> Same thing for any other properties I find that have no equivalent. Seem ok?

Sorry for such a delayed response...

There’s quite a few of these attributes in both OOXML and ODF. What I suggest we do (and
what I’ve previously done for OOXML) is to just to ignore these attributes when converting
to HTML. With bidirectional transformation, the update process is supposed to only touch parts
of the document that have actually been changed. If a font-size-asian attribute is present
it will remain unchanged.

Personally I don’t understand why this particular attribute is in either spec; it seems
pointless as I would expect if one wanted a different font size for certain characters then
a better way would be to have spans that wrap the relevant characters, and only have a single
“font size” attribute. I’d be interested to know the origin of this attribute - I can’t
think of why it’s needed, but presumably there’s a story behind it.

To see how it’s handled for OOXML, have a look at the WordPutRPr function in WordRPr.c (towards
the end of the function where it deals with the font-size CSS attribute). Word documents have
a normal font size and a “complex script” font size. The code here checks to see if the
font-size from the HTML/CSS file differs from what was previously there, and if so, it sets
both attributes to the same value. The same is done when creating a new document. If the font
size was previously specified and is no longer set (i.e. the CSS property has been removed),
then both the normal and complex script font size attributes are cleared.

Dr Peter M. Kelly

PGP key: <>
(fingerprint 5435 6718 59F0 DD1F BFA0 5E46 2523 BAA1 44AE 2966)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message