Re: Re: Bordered Text in Pango
- From: Parth Kanungo <parth k samsung com>
- To: Alex Kerr <alexkerr usa net>
- Cc: "gtk-i18n-list gnome org" <gtk-i18n-list gnome org>
- Subject: Re: Re: Bordered Text in Pango
- Date: Wed, 03 Jul 2013 14:36:22 +0000 (GMT)
Title: Samsung Enterprise Portal mySingle
Hello,
Thank you Behdad and Alex for your inputs.
But, unfortunately, I cannot use Cairo or PangoCairo for my application.
I need to implement border text through pango/pangoft2/pangofc.
I know that this is a bit challenging. But, after searching for various methods, I found the following link: http://www.freetype.org/freetype2/docs/tutorial/example2.cpp
Now, if I can replicate this inside pangoft2, then implementation of border text (with user defined border thickness) might be possible.
Please tell, if you have any suggestions for this approach,
And, do tell, if you have some other approach.
Thanks and regards,
Parth Kanungo
------- Original Message -------
Sender : Alex Kerr<alexkerr usa net>
Date : Jul 03, 2013 18:21 (GMT+05:30)
Title : Re: Bordered Text in Pango
There's a great little tutorial on that here:
http://x11.gp2x.de/personal/google/
see the last section (Cairo Tricks) and example at the bottom
You'll want the Cairo manual for the API details, here:
http://www.cairographics.org/manual/index.html
You can search in your browser page for the specific function you're
interested on the index page (as there's no search function on the
site): http://www.cairographics.org/manual/index-all.html
E.g. to get cairo_stroke_preserve()
http://www.cairographics.org/manual/cairo-cairo-t.html#cairo-stroke-preserve
Hope this helps.
Alex
On 03/07/2013 13:00, gtk-i18n-list-request gnome org wrote:
> On 13-06-14 06:00 AM, Parth Kanungo wrote:
>> Hello,
>>
>>
>>
>> I have a requirement to implement bordered text in Pango.
>>
>> I also need the flexibility of being able to change the thickness of the
>> bordered text.
>>
>> What do you think would be the right approach ?
>>
>>
>>
>> According to me the only way out is to use FT_GlyphSlot_Embolden or a related
>> variant while laying out the text. That will ensure correct itemization and
>> line-break.
>>
>> Once that is done, I can render the text using 2 colors, one for the text ,
>> another for border. But, I am not sure how to do that inside
>> pango_ft2_render_layout_line. Can you tell me how this can be done?
> This can't really be done directly with Pango. How about getting the text
> path from pangocairo and stroking it?
>
>
>> Thanks and regards,
>>
>> Parth Kanungo
>>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]