And switched attributes on on GTK+. We have a problem with attributes that span bytes.
This commit is contained in:
parent
d7a44a5168
commit
d4b38cd3b7
|
@ -229,7 +229,7 @@ static gboolean applyFeatures(gpointer key, gpointer value, gpointer data)
|
|||
|
||||
// remove the trailing comma/space
|
||||
g_string_truncate(s, s->len - 2);
|
||||
addattr(p, *pos, 1,
|
||||
addattr(p, *pos, *pos + 1,
|
||||
FUTURE_pango_attr_font_features_new(s->str));
|
||||
return TRUE; // always delete; we're emptying the map
|
||||
}
|
||||
|
|
|
@ -101,6 +101,7 @@ uiDrawTextLayout *uiDrawNewTextLayout(uiDrawTextLayoutParams *p)
|
|||
uiDrawTextLayout *tl;
|
||||
PangoContext *context;
|
||||
PangoFontDescription *desc;
|
||||
PangoAttrList *attrs;
|
||||
int pangoWidth;
|
||||
|
||||
tl = uiNew(uiDrawTextLayout);
|
||||
|
@ -137,7 +138,9 @@ uiDrawTextLayout *uiDrawNewTextLayout(uiDrawTextLayoutParams *p)
|
|||
|
||||
pango_layout_set_alignment(tl->layout, pangoAligns[p->Align]);
|
||||
|
||||
// TODO attributes
|
||||
attrs = attrstrToPangoAttrList(p);
|
||||
pango_layout_set_attributes(tl->layout, attrs);
|
||||
pango_attr_list_unref(attrs);
|
||||
|
||||
tl->nLines = pango_layout_get_line_count(tl->layout);
|
||||
computeLineMetrics(tl);
|
||||
|
|
Loading…
Reference in New Issue