[cairo] API Proposal: cairo_font_options_[gs]et_writing_mode()
Behdad Esfahbod
behdad at behdad.org
Mon Jan 29 13:11:24 PST 2007
I want to propose the following new API (for 1.6):
typedef enum _cairo_writing_mode {
CAIRO_WRITING_MODE_DEFAULT,
CAIRO_WRITING_MODE_HORIZONTAL,
CAIRO_WRITING_MODE_VERTICAL
} cairo_writing_mode_t;
cairo_public void
cairo_font_options_set_writing_mode (cairo_font_options_t *options,
cairo_writing_mode_t writing_mode);
cairo_public cairo_writing_t
cairo_font_options_get_writing_mode (const cairo_font_options_t
*options);
When set to DEFAULT, font-system-specific methods may be used to
determine the writing mode to use. For example, with the
FreeType backend, the FC_VERTICAL_LAYOUT pattern element is used.
When in VERTICAL writing mode, the glyph origin is moved for all
show, path, and extents purposes to top center, instead of left
baseline. This can be done by the cairo font backend (or even
the scaled-font layer) if a font system does not support vertical
writing mode.
I will implement this for the FT backend time permitting, so I
can work out the details, but for most part, the FT backend
already supports vertical writing mode through FC_VERTICAL_LAYOUT.
--
behdad
http://behdad.org/
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
More information about the cairo
mailing list