First line spacing in paragraph is small than othr lines

if i change the line spacing in a paragraph to smaller than single line: the first line spacing is smaller than others.
this is an example:
test1.odt (15.7 KB)

LO: Version: 24.2.2.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 4; OS: Linux 6.9; UI render: default; VCL: kf6 (cairo+wayland)
Locale: ar-DZ (en_US.UTF-8); UI: en-US
24.2.2-3
Calc: threaded
OS: Manjaro

I assume you’re speaking about Body TExt in your sample file. It would have been contributor-friendly if you had mentioned it.

First line height is not smaller than others. The visual confusion comes from your selected font face.

When you force line spacing below its “natural” height, i.e below the definition in the font properties, glyphs do not change. They keep their original height.

In your case, your font face makes use of many (Arabic) “diacritics” above and below. If you don’t leave enough room (spacing) for them, they’ll be rendered anyway above the “line”. Here, superscript diacritics either miw in the previous line or go into the top margin for the first line.

The visual effect is aggravated by your choice of 0 spacing above and below paragraph.

Note your font is not installed on my system and LO substituted for another. I experimented a bit and found I needed at least 120%-125% proportional line spacing at 15pt to avoid line mixing. Figure may be different with your custom font. If you need a more compact layout, perhaps choose another face with different geometric properties.

1 Like

the problem is not just in the diacritics even the text have no diacritics the height of the first line is smaller than others. i tried with “Noto Sans Arabic” font and i have the same result.

To be accurate: you’re talking of the distance between first and second lines compared to second-third and following. Your screenshot shows no formatting marks. So is this limited to 1st-2nd lines? It does not show in your previous sample. Attach the document corresponding to your latest image.

1 Like

this is exactly what i meant. and this problem occurs is any file i have. the first file attached in the thread also have this problem.

" So is this limited to 1st-2nd lines?" yes

test1.odt (52.4 KB)
this is another example

Congratulations! You found a subtle bug.
This happens as soon as line spacing is below 100%. It does not happen in Western script. I did not test for Asian script.
I let you file a bug on TDF Bugzilla. Report the bug number as “tdf#1234” where 1234 is the number assigned by the bug engine.

1 Like

i have added it: tdf#161053