fix bug that font is missing when measure a zero-sized label

This commit is contained in:
Jinhao 2018-10-01 07:43:57 +08:00
parent 2c3d75c709
commit b6028f8079

View File

@ -891,7 +891,8 @@ namespace nana
if(graph_ptr->empty()) if(graph_ptr->empty())
{ {
graph_ptr = &substitute; graph_ptr = &substitute;
graph_ptr->make({ 10, 10 }); substitute.make({ 10, 10 });
substitute.typeface(this->typeface());
} }
return impl->renderer.measure(*graph_ptr, limited, impl->text_align, impl->text_align_v); return impl->renderer.measure(*graph_ptr, limited, impl->text_align, impl->text_align_v);