InDesign allows a setting of "optical margin". This puts some text into the margin area to make a smoother margin. Opening quote, serif of cap were two places that I saw that it made a difference. Please check into adding this as an option for CSS and Prince.
I love your positive responses. That is one of the big reasons that I am pushing for a publishing path using Prince.
Is there any tool to help build the CSS?
I am sitting in a class right now where someone built a custom interface that exposes all of the settings that we want to use for publishing scripture using InDesign.
What I envision is creating a menu/choices creating tool that takes an XML file for input and displays the menu/choices available.
When you run the menu program and make choices the output is the CSS.
Since all of the text that is actually displayed is in the XML file, changing languages of the interface will be easy. Also because the menu options are created from the XML source file adding and deleting the options displayed in menu/choices is also easy.
These values may be suitable for common seriffed fonts like Times New Roman, Palatino, or Garamond. Other fonts may need different values. Characters Value " “ ” ' ‘ ’, . 100% hyphen 75% en-dash 50% em-dash 25% A T V W Y 20% C O 10%
There are OpenType features opbd, lfbd, rtbd, defined by Adobe which I think are intended for use with optical justification. But I'm not sure if any common fonts actually provide these features.
I have checked a collection of >120,000 quality commercial and open-source OpenType fonts from practically all relevant font vendors, and not a single font contains the opbd feature, because that feature is a bit stupid. I mean, it shouldn’t exist. The lfbd and rtbd features are sufficient. The layout engine should just apply the lfbd feature on the left margin and the rtbd feature on the right margin. opbd has no practical use, and I think that feature has been registered in OpenType prematurely.
Only a very small number of fonts include the lfbd and rtbd features. The reason for it is two-fold: no type design app offers a sensible user interface for type designers to implement these, and no app (except, I believe, XeTeX) supports it at this point.
The only font family that includes lfbd and rtbd that I’m aware (and quite well-designed, too) of is EB Garamond, the wonderful, rich open-source Garamond design: https://bitbucket.org/georgd/eb-garamond/downloads
I think these two may be the only two families that include the optical margins features. The situation may perhaps change in future as I’m aware of at least one font editor that is getting a nice GUI for devising optical margins features.
Will Prince's "optical-margin", when available, accommodate hanging punctuation within paragraphs (i.e. blocks) as well as at the start and end? Is there an interim solution for lines within blocks that anyone here might know about, using JavaScript or otherwise?
It occured to me that I might use <q> tags (despite this not being perfectly semantic) for DOM access, but would like to know if this has been or is being addressed in other ways.
In the event there's no better, current solution: if anyone else here is looking to do this, I've found a somewhat heavy-handed method using JavaScript to split lines and insert <span> tags (that can then be manipulated to hang any punctuation with CSS): http://stackoverflow.com/a/27925305
Would still like to know about Prince's upcoming "optical-margin" property, though…
Thanks for including the Safari note. I was disappointed when my firefox view didn't work. Then I remembered your note. Here is hoping that others get there too. When I was typesetting Bibles my graphic artist really wanted this feature.
These posts are very interesting! I didn't know about the OT features opbd (depracated!), lfbd, rtbd! Exciting!
But since most of our template layouts are styled in InDesign, this feature would be really good to have in princeXML either! So I clearly second this feature request!
I can think of an improvement: Analogous to the feature -prince-text-replace you should be able to define your own character behaviour for the left and/or right border. Let's say we get a -prince-optical-margins, than one could define: