Hi all,

I had some mail exchange with Armin. He supports the idea to keep this feature. He has given me a code pointer for the calculation of the text rendering. That part of the specification draft is nearly finished.

But now I am working on the character shadow in the fontwork and there are problems. The current way, in which LibreOffice (inherited from OpenOffice.org) writes it to file is so buggy, that it is not possible to use this as template for a specification.

I see these errors:

1)
The shadow has the types XFormTextShadow = {NONE, Normal, Slant} in core/include/svx/xenum.hxx#26
But in file format
“NONE” becomes draw:fontwork-shadow="normal"
“Normal” becomes draw:fontwork-shadow="slant"
“Slant” becomes draw:fontwork-shadow="none"
The reason is a wrong mapping in pXML_Fontwork_Shadow_Enum[] in core/xmloff/source/draw/sdpropls.cxx#699 Unfortunately this error exists at least since OOo1.1.5, so all documents since about 15 years have this wrong.

2)
In case of type “Slant” the angle and the scaling factor is writing into the draw:fontwork-shadow-offset attributes. For example a shear angle of 30° becomes draw:fontwork-shadow-offset-x="0.3cm" and a scaling factor of 150% becomes draw:fontwork-shadow-offset-y="0.15cm".


The ODF 1.2 specification has currently three types of shadows:

“fo:text-shadow” with a value of data type string, with a reference to XSL §7.16.5, which refers to a non existing section in the CSS specification. It is used for shadow, that is set in character styles.

“style:shadow” with a value of data type string, with same references. It is used for shadow, that is in the border-dialog. It is explicitly mentioned, that it is not usable for text.

“draw:shadow” and the connected attributes draw:shadow-color, draw:shadow-offset-x, draw:shadow-offset-y and draw:shadow-opacity. That is used in the area dialog of shapes and produces a shadow of the entire shape.

Taking the new draft CSS3, the string can contain a shadow offset in x and y direction, a shadow color and a blur radius. An angle and a scaling factor, needed for type “Slant”, are not included.

I see these solutions
A)
Add for each needed, but now not available property a new draw:shadow-* attribute. Evaluate the draw:shadow for characters in fontwork in case of type “normal” and “slant” or for the entire shape in case of fontwork type “NONE”.

B)
Make for fontwork own attributes draw:fontwork-shadow-*, (or better draw:textonpath-shadow-*, see below).

C)
Make an own definition of the meaning of the string so that it contains shear angle and scaling factors. Use fo:text-shadow then.

D)
Keep the string as close as possible to CSS3 and add an attribute style:character-shadow-transform or draw:character-shadow-transform, which can take descriptions for linear transformations. Use fo:text-shadow and new character-shadow-transform attribute for the characters in the fontwork.

Remark: I’m going to use draw:textonpath-* instead of draw:fontwork-*, because that avoids conflicts with the existing draw:fontwork-* attributes and the term “text-on-path” is common. Mapping to our implementation would happen in xmloff.

It would be nice to get some comments from you, before I bring it to the ODF TC.

Kind regards
Regina
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to