Closed ronnybremer closed 1 year ago
Just looking at the return from position_words, I still get the field _number_ofwords, not the field _number_of_shapedwords. So the build of the version from cradle.io seems to be several years old. Maybe the current code already fixes the issue, so I will get a git clone and check it again.
The latest code no longer shows that issue.
Description
I have been trying to use the workaround outlined here: PrintPDF Issue 39, however, it looks to me that the above mentioned function is missing words at the end of the passed in text. For debugging reasons I added a few printlns after calling the following functions:
The output is:
As you can see, inline_text_layout only contains a single line of text.
Here is the output from tripling the text:
I cannot figure out, why the remaining lines are not returned. Is there something I can change in my code?
Version / OS
azul version: 1.0.0-alpha4
Operating system: Linux CentOS 7
Windowing system (X11 or Wayland, Linux only): X11
Steps to Reproduce
Looking at the code from Issue 39, the "lorem ipsum" text has actually 135 words, but the PDF attached as an example only shows 63. I built the code myself and passed in "A-Remarkable-Long-And-Even-Longer Text" and with max-width set to only allow the first word to go in, the function returns a single line only, containing the word plus the space, the second line will not be returned. If I use push_str() to have the same text 3 times, I get 3 lines back, line 1 is word 1 and space, line 2 is word 2, line 3 is word 1 and space. Nothing else.
Additional Information
see PrintPDF issue 39 for an example.