diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-03-21 00:43:33 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-03-21 00:43:33 -0300 |
commit | acc6f3b285f058104fd6431bed2c4cfe4dc05a58 (patch) | |
tree | 91374cb7cb30f5dcee42236e60598b3cf694a3fe /scene/gui | |
parent | 90a84b4ddb64f4adc024766435f3fc75605f9aab (diff) |
signed distance field font support
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/label.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index d2e1e7f0b9..892e4c9bc7 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -72,6 +72,7 @@ void Label::_notification(int p_what) { if (clip && !autowrap) VisualServer::get_singleton()->canvas_item_set_clip(get_canvas_item(),true); + if (word_cache_dirty) regenerate_word_cache(); @@ -87,7 +88,8 @@ void Label::_notification(int p_what) { bool use_outlinde = get_constant("shadow_as_outline"); Point2 shadow_ofs(get_constant("shadow_offset_x"),get_constant("shadow_offset_y")); - + VisualServer::get_singleton()->canvas_item_set_distance_field_mode(get_canvas_item(),font.is_valid() && font->is_distance_field_hint()); + int font_h = font->get_height(); int line_from=(int)get_val(); // + p_exposed.pos.y / font_h; int lines_visible = size.y/font_h; |