GNOME Bugzilla – Bug 323172
Support rendering of vertical text
Last modified: 2006-08-21 04:39:45 UTC
Splitting bug 99523. First step should be adding simple, unidirectional, no mixed anything rendering support for vertical text. That is, native Japanese run should render correctly in vertical. To do that, we need: 1) Rotated cooridnates support (check) 2) Fixing characters with strong vertical orientation into correct position (that is, undoing step 1 on per-character basis) 3) Add some extra logic here and there to flow lines RTL or LTR instead of TTB (should be fairly trivial)
Interesting in this feature, add my self into cc list, so that got the recent status
The following paragraph is from the 5-year old pango/TODO.xml. The last sentence was new to me, so copying here: One reason why vertical text has not been implemented in Pango-1.0 is that the target rendering system, X, has week facilities for handling text in other than a horizontal location. The obvious, though not the only, way of treating vertical writing is to keep the logic in <code>PangoLayout</code> the same, but to have an implicit transformation of the coordinate system. Doing it this way, the only extra code in Pango that is needed is to transform glyph metrics as appropriate. (some characters will rotate, some not), and also to handle selecting appropriate glyph variants when a font has separate variants for vertical and horizontal text. (CJK punctuation being a common example of this.)
Humm, just noticed that this paragraph was the opener of the parent bug of this bug, bug #99523.
Created attachment 68976 [details] [review] Post-GUADEC copy of current patch This is the first patch as it stands currently, including the compile break on a recent commit which removed logical_rect, to track the work and allow some review of the approach taken.
Just about formatting of future patches you submit, please follow Pango's coding style. Function call spaces are particularly missing ;). Also, please use -p option for your diffs (can put it in ~/.cvsrc, oops, whatever it is in svn)
Created attachment 71255 [details] [review] Patch 2, adding per-item gravity resolution
Created attachment 71257 [details] [review] new patch, update on script change properly
Closing this as I've implemented the base for vertical now. One can choose a vertical layout by calling pango_context_set_gravity() and a matrix rotation on the layout. What is not working though is non-trivial vertical shaping.
Bug #323173 is the followup of this bug and where the rest of the discussion should go.
Created attachment 71271 [details] [review] Add data tables for script properties
Created attachment 71272 [details] Script properties table