LaTeX forum ⇒ GeneralOwn text rendering

LaTeX specific issues not fitting into one of the other forums of this category.
Posts: 1
Joined: Tue Apr 23, 2019 5:53 pm

Own text rendering

Postby malkol » Tue Apr 23, 2019 5:59 pm

is it possible to write own text rendering?
It would be very useful for me in my project. I would like to make word spacing dynamically using own algorithm. It should be another algorithm for making text justifying. On which level tex stack is it possible?

Posts: 2
Joined: Thu Jan 24, 2019 9:50 pm

Postby zauguin » Thu Apr 25, 2019 9:06 am


If you want to customize the word spacing and the justification, you can use Lua(La)TeX: There you can overwrite the `linebreak_filter` callback. This callback replaces the built-in logic for breaking paragraphs into lines. You get a list of nodes, representing the text of the paragraph, passed and you can implement your own algorithm for converting this into a list of lines.

This allows a lot of customization about the text layout, but if you want to modify the rendering of the vector glyphs into actual screen or printer output, you are out of luck: This is handled (at least for Type 1/OpenType/TrueType fonts) by the PDF viewer, so TeX can change their implementation.

Best regards

Return to “General”

Who is online

Users browsing this forum: No registered users and 8 guests