Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for optical alignment in text blocks #1264

Open
odrotbohm opened this issue Apr 26, 2022 · 3 comments
Open

Support for optical alignment in text blocks #1264

odrotbohm opened this issue Apr 26, 2022 · 3 comments

Comments

@odrotbohm
Copy link

Optical alignment is a type setting approach that lets punctuation characters bleed into the text's margins. This might occur at the beginning of a line, in which quotation marks might be shifted a bit left or – and significant if you're using justify alignment and hyphenation – on the end of a line to produce a more homogenous right border.

It would be cool if Prawn supported that. The manual layouting tools I've seen so far (Affinity Publisher et al.) use some default settings (see below) for certain characters.

Screenshot 2022-04-26 at 12 31 09

@gettalong
Copy link
Member

This is some rather advanced type of layouting and not seen in many tools. Pull requests for such a feature are definitely welcome but, just to set expectations right, the core team probably won't have time to implement this.

@odrotbohm
Copy link
Author

Thanks for the swift feedback. I had hoped you'd answer something different, but was afraid that we're reaching the limits of what can be achieved with a reasonable amount of effort.

@gettalong
Copy link
Member

Prawn is not designed to provide high-quality text output out of the box. It provides basic kerning and that's about it. However, since Prawn is quite extendable, one could provide an extension gem that provides all that functionality, probably using information found in the OpenType fonts themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants