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
>>
Â
_______________________________________________
gtk-i18n-list mailing list
gtk-i18n-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-i18n-list