text ligatures off when character-spacing > 0

This commit is contained in:
Jiri Drbalek 2014-09-17 17:22:30 +00:00
parent 81dcb4e3e1
commit 57be44d815
6 changed files with 8 additions and 3 deletions

View file

@ -98,6 +98,11 @@ void text_symbolizer_properties::process(text_layout & output, feature_impl cons
format->fontset = format_defaults.fontset;
format->font_feature_settings = util::apply_visitor(extract_value<font_feature_settings_ptr>(feature,attrs), format_defaults.font_feature_settings);
// Turn off ligatures if character_spacing > 0.
if (format->character_spacing > .0 && format->font_feature_settings->count() == 0)
{
format->font_feature_settings->append(font_feature_liga_off);
}
tree_->apply(format, feature, attrs, output);
}

View file

@ -35,9 +35,9 @@
" ",
" ",
" ",
" ! ! !! ",
" !! !! ! ! !! ! ! ! ! ",
" !! !! !! !!! ! ! ! !! !! ! ! ",
" !!! ! ! ! ",
" ! !! ! ! ! ! ! !! ! ",
" ! ! ! !! ! !! ! ! ! ! !! !! !! ! ",
" ",
" ",
" ",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB