Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 251ae9a7 authored by Fabrice Di Meglio's avatar Fabrice Di Meglio
Browse files

Fix text redering issue where the text was sometimes truncated

- mostly was visible in Settings apps / Wi-Fi networks summary info for each network
- use ceilf() instead of roundf()

Change-Id: I80310a9f00e8f7eb066d8ff03f52ea8f9cd85880
parent 382ab8eb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -266,8 +266,8 @@ public:

        jfloat totalAdvance = 0;
        for (size_t i = 0; i < count; i++) {
            // Be careful: we need to use roundf() for doing the same way as Skia is doing
            totalAdvance += outAdvances[i] = roundf(HB_FIXED_TO_FLOAT(shaperItem.advances[i]));
            // Be careful: we need to use ceilf() for doing the same way as what Skia is doing
            totalAdvance += outAdvances[i] = ceilf(HB_FIXED_TO_FLOAT(shaperItem.advances[i]));

#if DEBUG_ADVANCES
            LOGD("hb-adv = %d - rebased = %f - total = %f", shaperItem.advances[i], outAdvances[i],