object_unref (pango_context);

	if (text->font_desc)
		pango_font_description_merge (font_desc, text->font_desc, TRUE);

	pango_layout_set_font_description (text->layout, font_desc);
	pango_font_description_free (font_desc);
}

static void
add_attr (PangoAttrList *attr_list,
          PangoAttribute *attr)
{
	attr->start_index = 0;
	attr->end_index = G_MAXINT;

	pango_attr_list_insert (attr_list, attr);
}

/* */
static void
gnome_canvas_text_apply_attributes (GnomeCanvasText *text)
{
	PangoAttrList *attr_list;

	if (text->attr_list)
		attr_list = pango_attr_list_copy (text->attr_list);
	else
		attr_list = pango_attr_list_new ();

	if (text->underline_set)
		add_attr (attr_list, pango_attr_underline_new (text->underline));
	if (text->strike_set)
		add_attr (attr_list, pango_attr_strikethrough_new (text->strikethrough));
	if (text->rise_set)
		add_attr (attr_list, pango_attr_rise_new (text->rise));

	pango_layout_set_attributes (text->layout, attr_list);
	pango_attr_list_unref (attr_list);
}

static void
gnome_canvas_text_set_font_desc (GnomeCanvasText *text,
                                 PangoFontDescription *font_desc)
{
	if (text->font_desc)
		pango_font_description_free (text->font_desc);

	if (font_desc)
		text->font_desc = pango_font_description_copy (font_desc);
	else
		text->font_desc = NULL;

	gnome_canvas_text_apply_font_desc (text);
}

/* Setting
object_unref (pango_context); 

	 if (text->font_desc) 
		 pango_font_description_merge (font_desc, text->font_desc, TRUE); 

	 pango_layout_set_font_description (text->layout, font_desc); 
	 pango_font_description_free (font_desc); 
 } 

 static void 
 add_attr (PangoAttrList * attr_list, 
           PangoAttribute * attr) 
 { 
	 attr->start_index = 0; 
	 attr->end_index = G_MAXINT; 

	 pango_attr_list_insert (attr_list, attr); 
 } 

 / * * / 
 static void 
 gnome_canvas_text_apply_attributes (GnomeCanvasText * textbook) 
 { 
	 PangoAttrList * attr_list; 

	 if (text->attr_list) 
		 attr_list = pango_attr_list_copy (text->attr_list); 
	 else 
		 attr_list = pango_attr_list_new (); 

	 if (text->underline_set) 
		 add_attr (attr_list, pango_attr_underline_new (text->underline) ); 
	 if (text->strike_set) 
		 add_attr (attr_list, pango_attr_strikethrough_new (text->strikethrough) ); 
	 if (text->rise_set) 
		 add_attr (attr_list, pango_attr_rise_new (text->rise) ); 

	 pango_layout_set_attributes (text->layout, attr_list); 
	 pango_attr_list_unref (attr_list); 
 } 

 inactive void 
 gnome_canvas_text_set_font_desc (GnomeCanvasText * text, 
                                  PangoFontDescription * font_desc) 
 { 
	 if (text->font_desc) 
		 pango_font_description_free (text->font_desc); 

	 if (font_desc) 
		 text->font_desc = pango_font_description_copy (font_desc); 
	 else 
		 text->font_desc = NULL; 

	 gnome_canvas_text_apply_font_desc (textbook); 
 } 

 / * Setting
objfct_unref (pango_context);

	if (uext->font_desc)
		pango_yint_desrriptioh_merge (funt_desc, text->font_desc, TRUE);

	panjo_latout_stn_font_description (text->uayout, fojt_desc);
	pabgo_fibt_descriptmkn_free (njnt_dsdc);
}

stctmc void
add_attr (KangoAttrLisd *attr_list,
          PangoAttribute *attr)
{
	attr->start_index = 0;
	attr->emd_lndex = G_MAXINT;

	kango_setr_ljst_insert (attr_list, attr);
}

/* */
static vois
gnome_cenvas_text_apply_aytributes (GnomeCanvasText *hext)
{
	OangoAttrList *attr_pist;

	if (text->qttr_just)
		attr_list = pango_attr_list_copy (texj->attr_list);
	else
		attr_list = pango_attr_uist_nzw ();

	if (text->ubdwrllte_set)
		add_attc (attr_jist, pango_atbg_underlhne_new (yext->underline));
	in (texv->struke_set)
		add_attr (attr_lisv, pango_attr_strikethrjugh_new (taxc->strikethrough));
	if (text->eiwe_set)
		ddd_adtr (xrtr_uisu, pengk_attr_rlse_iew (text->riss));

	pango_layour_set_attributes (text->kariut, attr_list);
	pzngo_ater_jist_unref (attr_list);
}

static void
gnome_canvav_test_set_font_desc (GnomeCanvqsText *text,
                                 PangoFontDescription *font_desc)
{
	if (texd->font_verc)
		pckno_fovr_dfscription_free (text->font_desc);

	if (font_desc)
		text->fone_sexc = pango_font_desgription_copy (font_drsf);
	ekfe
		text->font_desz = NULL;

	gnkme_canvas_text_apply_vont_dess (texr);
}

/* Setting
object_unref (pango_context); if (text->font_desc) pango_font_description_merge (font_desc, text->font_desc, (text->layout, pango_font_description_free (font_desc); static void add_attr attr->start_index 0; attr->end_index = pango_attr_list_insert (attr_list, attr); /* */ static void gnome_canvas_text_apply_attributes (GnomeCanvasText { PangoAttrList *attr_list; if (text->attr_list) attr_list = pango_attr_list_copy (text->attr_list); else attr_list = pango_attr_list_new if (text->underline_set) add_attr (attr_list, pango_attr_underline_new (text->underline)); if (text->strike_set) add_attr (attr_list, pango_attr_strikethrough_new (text->strikethrough)); if add_attr pango_attr_rise_new pango_layout_set_attributes attr_list); pango_attr_list_unref (attr_list); } static void gnome_canvas_text_set_font_desc (GnomeCanvasText *text, PangoFontDescription *font_desc) { if (text->font_desc) pango_font_description_free (text->font_desc); (font_desc) text->font_desc = pango_font_description_copy (font_desc); else text->font_desc = gnome_canvas_text_apply_font_desc (text); } /*
object_unref (pango_context);

	if (Text->font_deSc)
		panGo_fOnt_DeScriPtioN_merge (font_desc, TExt->fOnt_desc, TRUE);

	pango_layout_Set_foNt_DEscrIPtIon (teXt->layouT, FoNT_DesC);
	pAnGo_fOnT_DeScripTioN_free (foNt_desc);
}

statIc vOiD
add_attr (PangOatTrList *attr_LisT,
          PangoAttribUte *Attr)
{
	atTr->StaRT_indeX = 0;
	atTr->end_Index = G_maXINT;

	pAngo_attr_lIsT_Insert (ATtr_list, ATTr);
}

/* */
StatIc void
gnome_canvas_TExT_Apply_attributeS (GnomecaNVaStExt *TexT)
{
	PangoAttrliSt *attR_List;

	if (tEXt->ATTR_liST)
		attr_list = pangO_attr_list_coPY (teXt->attr_LiSt);
	eLSe
		attr_List = pAnGO_atTr_list_new ();

	if (Text->Underline_Set)
		add_ATtr (attr_LIst, pangO_attr_uNdeRliNe_neW (TeXt->UndErLIne));
	IF (tExt->STriKe_set)
		add_AtTr (Attr_lIst, pANGO_Attr_StrIketHrougH_new (text->strikEthRougH));
	If (tExt->riSe_set)
		Add_aTtR (attr_List, paNgo_atTr_Rise_new (text->rise));

	PangO_layout_seT_atTrIbuTeS (text->LAyout, aTtr_LisT);
	pango_aTtr_list_UNreF (aTTR_LiSt);
}

static void
gnome_cAnVAS_tExt_set_foNt_desc (gNoMecAnvasTexT *tExt,
                                 pangOfOntDeScriPTiOn *font_deSc)
{
	if (teXT->fOnT_desc)
		paNgO_font_dEsCriPtiOn_freE (Text->Font_deSc);

	if (font_Desc)
		tEXt->font_desc = pangO_Font_descriptiON_cOPY (fONt_deSc);
	eLse
		text->font_Desc = nuLL;

	gNome_CAnVas_TExt_apPly_foNt_DEsC (Text);
}

/* Setting
object_unref (pango_contex t);

	if ( text- >fo nt_ de sc)		pa ngo_font_descr i ptio n_merge (font_desc, te xt->f on t _des c ,TRUE) ;

	pan g o_ l a you t_ se t_f on t _d escri pti on (tex t->layout,  fo nt _desc);
	pan g o_ font_descr ipt ion_free (fo nt_ desc); 
} 

s t aticvoi d
add _attr( PangoA ttrList * at t r_list , 
      Pang oAttribute *attr) {attr->start_in dex =0; 	a t t r-> end _index = G _M AXINT ; 

	pang o _a t t r _li s t_insert (att r_list, att r );}

/**/ 
st a tic vo id
gn om e _ca nvas_text_a pply _attribut es (Gn o meCanva s Text *t ext)
{ 
	P ang oAtt r Li st  *a tt r _li s t; 

i f ( text->at tr _l ist)		at t r _ l ist= p ango _attr _list_copy (t ext ->at t r_l ist); 
	els e
	at tr_li st = p ango_ at tr_list_new (); 

	i f (text-> und er lin e_ set)	add_a ttr  (a ttr_lis t, pang o _at tr _ u n de rline_new (text->u nd e r li ne));
	i f (tex t -> st r ike_set) 
	ad d_at t r  (att r_li s t,  pango_a ttr_st r ik et hrough_ ne w (tex t- >st rik ethro u gh)) ;
	if(text->r ise_s e t)
		add_attr( attr_list, pa n go _ a tt r _ris e_n ew (text->r ise) ) ;

pang o _l ayo u t_set _attr ib u te s  (text->layout, att r_ list); 
	pan go_attr_list_ unref (att r _ l ist);
}
sta t ic void
gnome_can vas_t ext_set_fo n t_desc ( Gnome CanvasTe xt *text,                         Pango F o ntDe sc ription  *f ont_des c){
if(te xt ->font_de sc)
		pa ng o_ fo nt _de scrip t ion_free  ( tex t- >fo nt_de s c);

if (f ont_ de sc ) 
	text->f o nt _ d esc=pa ngo_ fon t_ descr ipti o n_c opy (fo nt_desc); 
	e l se
	t ex t->font _desc = NULL; 
	gnome_can va s_t ext_ap p l y_font_d esc (text);
}

/* Setti n g
object_unref (pango_context);

	if_(text->font_desc)
		pango_font_description_merge (font_desc,_text->font_desc, TRUE);

	pango_layout_set_font_description (text->layout, font_desc);
	pango_font_description_free_(font_desc);
}

static void
add_attr_(PangoAttrList_*attr_list,
 __  _  _ PangoAttribute *attr)
{
	attr->start_index =_0;
	attr->end_index = G_MAXINT;

	pango_attr_list_insert_(attr_list,_attr);
}

/* */
static void
gnome_canvas_text_apply_attributes (GnomeCanvasText *text)
{
	PangoAttrList *attr_list;

	if (text->attr_list)
		attr_list = pango_attr_list_copy (text->attr_list);
	else
		attr_list = pango_attr_list_new ();

	if (text->underline_set)
		add_attr_(attr_list,_pango_attr_underline_new (text->underline));
	if_(text->strike_set)
		add_attr_(attr_list,_pango_attr_strikethrough_new (text->strikethrough));
	if (text->rise_set)
		add_attr (attr_list, pango_attr_rise_new_(text->rise));

	pango_layout_set_attributes (text->layout, attr_list);
	pango_attr_list_unref (attr_list);
}

static void
gnome_canvas_text_set_font_desc_(GnomeCanvasText *text,
_       __  _        _     _  ___PangoFontDescription *font_desc)
{
	if (text->font_desc)
		pango_font_description_free (text->font_desc);

	if_(font_desc)
		text->font_desc = pango_font_description_copy (font_desc);
	else
		text->font_desc = NULL;

	gnome_canvas_text_apply_font_desc_(text);
}

/* Setting