X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpango-font.cc;h=024d7b1d576f94bd731f1186351c26832da2fafe;hb=8cf69a467ad7650f5ca9da6fe2dfd4c7c088b239;hp=9fe6b78cb00a54a78273b5820c5bfe672ea10136;hpb=9ead371f45f0a0c98e86e8e32eb86ef75c3af5a4;p=lilypond.git diff --git a/lily/pango-font.cc b/lily/pango-font.cc index 9fe6b78cb0..024d7b1d57 100644 --- a/lily/pango-font.cc +++ b/lily/pango-font.cc @@ -387,7 +387,9 @@ extern bool music_strings_to_paths; Stencil Pango_font::text_stencil (Output_def * /* state */, - const string &str, bool music_string) const + const string &str, + bool music_string, + const string &features_str) const { /* The text assigned to a PangoLayout is automatically divided @@ -395,6 +397,16 @@ Pango_font::text_stencil (Output_def * /* state */, Bidirectional Algorithm, if necessary. */ PangoLayout *layout = pango_layout_new (context_); + + if (!features_str.empty()) + { + PangoAttrList *list = pango_attr_list_new(); + PangoAttribute *features_attr = pango_attr_font_features_new(features_str.c_str()); + pango_attr_list_insert(list, features_attr); + pango_layout_set_attributes(layout, list); + pango_attr_list_unref(list); + } + pango_layout_set_text (layout, str.c_str (), -1); GSList *lines = pango_layout_get_lines (layout);