Created attachment 175587 [details] Fontwork examples Open attached document. It has four Fontwork shapes. The style is set by an own style "myFontwork for testing". The font size is so, that the text fits into the width of the shape. Now open the style and set the font size a little bit larger, e.g. to 28pt. Notice, that the text in those shapes, which have two paragraphs, is wrongly rendered. The expected behavior can be seen in the examples with one paragraph. If the font size is so large, that the text block does not fit into the width of the bounding box of the path, then the font size used for rendering is decreased until it fits. The path in these objects are one or two horizontal lines from left to right of the shape. The text-path-scale attribute is set to "shape", which corresponds to "ScaleX=true" in the property "TextPath" in property "CustomShapeGeometry".
Created attachment 175786 [details] Example for wrong rendering The two Fontwork shapes have the same geometry. Only difference is, that one has the long paragraph as first paragraph and the other the short paragraph. I think, the error is in lines #226 to #229 in EnhancedCustomShapeFontWork.cxx. There the value (<1.0) from the first paragraph in fScalingFactor is replaced with the value (>1.0) from the second paragraph. But the "<1.0" value in fScalingFactor needs to be kept, because it indicates, that the rendering font size has to be reduced. I have an idea for a solution, a patch will come.
Regina Henschel committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/3b922eb756d990c16944bbce42ae13142565a835 tdf#144988 correct font size in multiline Fontwork text It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Regina Henschel committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/460af321a84aae07f699e45700c212fcad50c38a tdf#144988 correct font size in multiline Fontwork text It will be available in 7.2.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.