pebble / pebblekit

Pebble's app development toolkit for the Pebble smartwatch, Android and iOS
199 stars 13 forks source link

Text size functions will report improper height #49

Open matejdro opened 11 years ago

matejdro commented 11 years ago

This applies to both text_layer_get_max_used_size() and graphics_text_layout_get_max_used_size().

Those functions will return slightly smaller height, resulting in minor cuts such as bottom of letter g:

dsc_0049

This code was used to generate above image:

GSize titleSize = text_layer_get_max_used_size(app_get_current_graphics_context(), &title);
text_layer_set_size(&title, titleSize);

User fugounashi did some research of that issue in this thread: http://forums.getpebble.com/discussion/7147/text-layer-padding

Amount cut is not static (bigger fonts will be cut more).