Re: Accented Capital letters getting clipped



On 13-05-23 06:01 AM, Parth Kanungo wrote:
Hello,

I am using Pango/FT2 to render a text that contains accented characters like
0x00C1 (accented A )  and 0x010C (a variety of C used in Czech language). 

From my experiments, I figured that pango does not take into consideration the
accent above the characters while calculating extents
using pango_layout_iter_get_line_extents().  Correct me, if I am wrong.


        pango_layout_iter_get_line_extents(itr, NULL, &lineRect);

Instead of getting the logical rect (last arg), try the ink rect (middle one).

behdad

Here is what I did.

1. I rendered the layout using pango_ft2_render_layout(). The accent got
clipped from the characters in the first line, but were rendered successfully
for the second line.

2. My application requires me to use line-by-line rendering. Thus, I rendered
the second line of the layout using pango_ft2_render_layout_line(). The accent
above the letters gets clipped (See output1.bmp).

3. I adjusted the baseLine by adding 5. I got output2.bmp,

Hence, I have a reason to believe that extents calculated do not take into
consideration the full height of the glyph. 
Is this a known bug? Or, am I doing something wrong here?

Thanks,
-- 
Parth 

-- 
behdad
http://behdad.org/


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