use `prince-text-justify: prince-cjk;`, but the `text-justify` style is poor.
Forum › Feature requests
Support CSS `text-spacing-trim`
This CJK justification and punctuation trimming is really important for reading experience. The current `prince-text-justify: prince-cjk` result looks awkward, and it hurts the visual quality of books. Vivliostyle and Microsoft Office already handle this perfectly, hope you can prioritize supporting `text-spacing-trim`.
Edited by xuggux
Yes I am taking a look now, it looks like we will need to support the OpenType 'halt' feature for alternate half-widths to make this work.
Thanks for the update! Just to clarify: the `halt` feature substitutes punctuation with half-width glyphs, while `text-spacing-trim` adjusts spacing dynamically on top of full-width punctuation. These two approaches are different. Will you still implement `text-spacing-trim` later?
I think the implementation of text-spacing-trim will use 'halt' to perform the adjustment? It will just apply it dynamically on a case by case basis, e.g. at the end of a line, or two adjacent parentheses.
Got it. So it will dynamically switch glyphs via halt instead of adjusting spacing between full-width glyphs. That means fonts without halt alternates won’t be able to get punctuation trimming, right?
Got it. So it will dynamically switch glyphs via halt instead of adjusting spacing between full-width glyphs. That means fonts without halt alternates won’t be able to get punctuation trimming, right?
I think we could measure the glyph extent to emulate 'halt' for fonts that don't have it, but it looks like browsers do not do this, correct? Anyway, we can start with 'halt' support and then review.
Thanks for clarifying. I’m hoping to get the same punctuation trimming effect as Chrome and Office. I understand Blink’s current `text-spacing-trim` implementation relies on the `halt` font feature, so this approach makes sense. Looking forward to the initial `halt` support and hope it can be released soon!
