freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] FT_LOAD_VERTICAL_LAYOUT?


From: Behdad Esfahbod
Subject: Re: [ft-devel] FT_LOAD_VERTICAL_LAYOUT?
Date: Tue, 25 May 2010 16:58:24 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4

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: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
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]