I seem to have a peculiar issue where with under very specific combinations of font, language, margins and text, the paragraph indentation sometimes stops working. In my actual document this manifests as the presence of a certain word disabling the indentation, but using random (meaningless) words, here is an example minimal(?) document that reproduces this issue: Typst
As you can see, the third and fourth paragraphs are not indented. It seems to be very sensitive to the choice of margins, font etc — I had to generate a lot of random text to reproduce the issue that I’m seeing in my real document. And actually the issue seems to be not just with the indentation but some other things seem wrong with the paragraph as well (like the justification missing some apparent opportunities to fit text onto lines).
Does anyone know what’s going on? Is this a bug?
(Note just to be clear: this question is not about indenting the first paragraph like the rest: the existing all:true as in #set par(first-line-indent: (all: true, amount: 20pt)) (or whatever length) already ready works fine for that, if one wants it.)
Hmm, I get the fourth paragraph indented. Also, after adding spaces somewhere in the third paragraph, it does correctly indent. And if you duplicate the line, it will go outside of the page, clearly indicating that there are no places where the line can be broken into parts.
If text have places where it can be split, then it’s either a bug or the language is not supported, even when explicitly setting it.
#set page(paper: "a5", margin: (right: 25mm))
// #set text(lang: "kn")
#set text(12pt, font: "Noto Serif Kannada", fallback: false)
#set par(justify: true, first-line-indent: 25pt)
// (OK) First paragraph on page, not indented.
ಸತ್ಯ
// (OK) Second paragraph on page, is indented.
ಸತ್ಯ
// (Not OK) Third paragraph on page, not indented.
ಸ್ಮ್ರೋಢ್ಗಾಫ್ಠ್ವೊಧ್ಪ್ಣೄಝೇಛ್ಠೇರ್ಣೌಶೈಸ್ಳೆಜೀಭ್ಘಿಝಿಖ್ಜ್ತೋಢ್ಯ್ಪೌಖೆಠ್ಟ್ಧ
// (Not OK) Fourth paragraph on page, not indented.
ವೄಫೀಳ್ಛೌಲ್ಛ್ಙೆಶ್ಝ್ಕೃ ಡ್ಜ್ಭೆಝ್ಪ್ಠೀ ಚ್ಠೈಞ್ಮೋಧ್ಭ್ಭೄಥ್ಥೄಡ್ತ್ಗೇದ್ದೌಷ್ಶ್ಟುಚಾಝಾ ಡ್ರ್ಸುಗ್ನ್ಥುಧ್ಚ್ವೆಣ್ಙ್ಸಾಥ್ಪೄಥ್ಬೃರ್ಝ್ಚಾಹ್ಭೂಕ್ಭೃಝ್ಗ್ನೄ ಖ್ಯುಖ್ಯ್ವೂಲ್ಢೆಟೂಧೋಭ್ಢ್ದೇಷೌಞ್ಯ್ಞೄಪ್ಣೇಹ್ಹೀ ರ್ಳ್ಮುಮೆಷುಖ್ಧ್ಶೄದ್ಘೂಷೈಶ್ಞಿಜ್ಹ್ಥೊದ್ಮಿ ಣ್ಲ್ಘೊಖ್ಖೌಪೈಥೇದ್ಶೈಕೈದುಶೈಟ್ಡ್ಠೂಛ್ಷ್ಸೊ ವ್ಗೂಜ್ಯ್ಥೈಲೈಝ್ಥೆಛ್ರ್ಚೀಝೈ ನ್ಛ್ಮೋಛ್ಥೀಚ್ಝ್ಧೊಹ್ಗ್ಘೄಷ್ಹ್ಞೀಷೋಛ್ಧುಛ್ಡೄ ಜ್ಛ್ಢೋಚ್ಭಿಞ್ಸ್ಬೂಬೆಚಿಞ್ಣೌಭ್ಮ್ಶೆಧ್ಫೃಳ್ಥೌಢ್ಝೃ ಛ್ಝೄಘ್ಗ್ಭೋಝ್ಪ್ಖಿಖ್ಪ್ಢೊಝ್ಚ್ಳೆವೂನೀ ಚ್ಢ್ರೆಖ್ಣೈಸ್ಮಿಘ್ಡೂಖ್ಘ್ಮಿವ್ಟ್ಥೈ ಯ್ತ್ಖುಚೂಗುಕುಙ್ದ್ಠೋಝ್ಝ್ಪಾನ್ಠ್ಲೇಷ್ನೃ ಟ್ಙ್ಘೇಪ್ಞ್ಮೄಪೄಷಿ ಜ್ಸ್ಢೌಗ್ಞೊಞೄಮೆ ಮ್ಲೋಷ್ಲೊಠ್ಬೂಶಿಶೌಜ್ಘು ಷಿಝ್ನೌಠ್ರ್ಸೋಡಿಡಿವ್ಧ್ಲೊಣ್ಢೂಷ್ಠ್ಬುಹೈ ಹಾಪ್ಲಾಬ್ಚ್ಛಿವ್ಥ್ಧೄಗೀಝ್ಠ್ಧಾತ್ಯಿಢ್ಕುಬ್ಥಾ ದ್ಜುಖ್ಮೈಜೂ ಕೆಬ್ಞೆಗ್ದ್ಡಾಭೇ ಥ್ರೆಛೃರ್ಯಾತ್ಲೆಟ್ಮ್ಲೄಶಾಡ್ತ್ಗೊಥೀಮ್ಪೈಫ್ಘ್ಣೋ ಘ್ಘೂವ್ಬ್ಕುಛೃಲ್ನೆಟ್ಕುಯ್ಢೆಯ್ಳೊಪೄಪ್ಞ್ಯಾಭ್ಥಾ ಟ್ತ್ಕೂಞ್ಬ್ಣೇಯ್ಪೋಹೀಚೀಬ್ಜೄಹ್ಟೀಜ್ಙ್ಜಿಷ್ಡ್ಕೄ ಣ್ಸ್ಲಿತಾಖ್ಗ್ಙಿಛುಠೂ ಛ್ತೌಷ್ಡ್ಫೀಳೋ
Thanks for taking a look. Yes it’s sensitive to slight changes, but the problem is that with the real text I see these issues. I don’t get the fourth paragraph indented in the online compiler at typst.app, which I guess is the latest.
It does seem to be buggy — even apart from indentation, there are many lines where more words can obviously fit, but the line is broken and words are moved to the next line (screenshot below from another example project with simpler/shorter words: Typst )
Thanks, I found an even simpler reproduction of some of the issues above (not the paragraph indentation, but the poor line-breaking), and I’ve posted it as an issue on GitHub here. Thanks for the pointer that it may have to do with font version: using a more recent version of the font does seem to reduce the number of issues. I’ll note also that everything is with hyphenation explicitly turned off, so it’s not about (the likely missing feature of) hyphenation.