|
From: Jun T. <tak...@kb...> - 2015-01-15 13:57:21
|
On 2015/01/09, at 10:36, sfeam <sf...@us...> wrote:
> On Wednesday, 07 January 2015 04:08:50 PM Philipp K. Janert wrote:
>>
>> I seem to have observed three minor bugs in gp5:
>>
>> 2) Enhanced text, key, and cairo
>
> That odd, because wxt _is_ one of the cairo terminals.
(I know a patch is already in CVS)
In cairotrm_put_text(), enhanced_recursion() is used only if the string
contains mark-up characters "{}^_@&~"; otherwise gp_cairo_draw_text() is used.
When drawing "{/:Bold Hello}",
enhanced_recursion() calls gp_cairo_enhanced_open(),
which calls gp_cairo_set_font(),
which sets plot->fontweight (gp_cairo.cpp:line 324):
plot->fontweight = PANGO_WEIGHT_BOLD;
But this fontweight is not reset to the original value after drawing
the string.
When drawing "World",
gp_cairo_draw_text() uses the plot->fontweight (gp_cairo.cpp:line 867),
which still has the value PANGO_WEIGHT_BOLD:
pango_font_description_set_weight (desc, plot->fontweight);
In wxt_put_text() (wxt_gui.cpp), on the other hand, enhanced_recursion()
is used always; thus wxt does not have this problem.
Jun
|