On 05/25/2010 11:26 AM, David Bevan wrote:
> 
> 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?

Not me.  But I'm also interested in receiving those.

behdad

> Thanks.
> 
> David %^>
> 
> 
> -----Original Message-----
> From: Behdad Esfahbod [mailto:behdad.esfah...@gmail.com] On Behalf Of Behdad 
> Esfahbod
> Sent: 05 May 2010 20:40
> To: David Bevan
> Cc: freetype-devel@nongnu.org; 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
> Freetype-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/freetype-devel
> 

_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to