]> git.ipfire.org Git - thirdparty/plymouth.git/commit
label-freetype: Ensure font metrics are up to date when querying dimensions
authorRay Strode <rstrode@redhat.com>
Thu, 28 Dec 2023 18:28:46 +0000 (13:28 -0500)
committerRay Strode <rstrode@redhat.com>
Thu, 28 Dec 2023 18:39:19 +0000 (13:39 -0500)
commit97516094e41efdbf6c3855237a9d5511c6b820d4
treefe32ea9c22bde0ff640d0c7a442f886420ec1cce
parenta44ffaf8ed96e50fb58adb9ffad39e56a15804a1
label-freetype: Ensure font metrics are up to date when querying dimensions

If code calls ply_label_get_width without ply_label_show or some other
call that forces the dimensions to be computed first, then the returned
width will be wrong.

This commit makes the freetype plugin look more like the pango plugin
where the size will computed on demand when querying the width, if
necessary.
src/plugins/controls/label-freetype/plugin.c