[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [ft-devel] FT_LOAD_VERTICAL_LAYOUT?
From: |
Ronen Ghoshal |
Subject: |
RE: [ft-devel] FT_LOAD_VERTICAL_LAYOUT? |
Date: |
Tue, 25 May 2010 11:45:59 -0400 |
The QL Suites offer no way I can see to detect this.
-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of David Bevan
Sent: 25 May 2010 16:26
To: address@hidden
Cc: Stephen Brazier
Subject: RE: [ft-devel] FT_LOAD_VERTICAL_LAYOUT?
Thanks for the feedback on this.
Does anyone have access to any PDF files which contain vertical writing mode
text? If so, would it be possible to send some to me off-line?
Thanks.
David %^>
-----Original Message-----
From: Behdad Esfahbod [mailto:address@hidden On Behalf Of Behdad Esfahbod
Sent: 05 May 2010 20:40
To: David Bevan
Cc: address@hidden; Antony Bush; Stephen Brazier; Houjie Tu
Subject: Re: [ft-devel] FT_LOAD_VERTICAL_LAYOUT?
On 05/05/2010 08:55 AM, David Bevan wrote:
> And how /should/ FreeType be used for vertical writing mode?
This is how cairo handles it:
/*
* Translate glyph to match its vertical metrics.
*/
static void
_cairo_ft_scaled_glyph_vertical_layout_bearing_fix (void *abstract_font,
FT_GlyphSlot glyph)
{
cairo_ft_scaled_font_t *scaled_font = abstract_font;
FT_Vector vector;
vector.x = glyph->metrics.vertBearingX - glyph->metrics.horiBearingX;
vector.y = -glyph->metrics.vertBearingY - glyph->metrics.horiBearingY;
if (glyph->format == FT_GLYPH_FORMAT_OUTLINE) {
FT_Vector_Transform (&vector, &scaled_font->unscaled->Current_Shape);
FT_Outline_Translate(&glyph->outline, vector.x, vector.y);
} else if (glyph->format == FT_GLYPH_FORMAT_BITMAP) {
glyph->bitmap_left += vector.x / 64;
glyph->bitmap_top += vector.y / 64;
}
}
behdad
_______________________________________________
Freetype-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/freetype-devel