flowkey / UIKit-cross-platform

Cross-platform Swift implementation of UIKit, mostly for Android
MIT License
594 stars 40 forks source link

improve multilineSize for text calculations #327

Closed michaelknoch closed 3 years ago

michaelknoch commented 3 years ago

Type of change: layouting fix

Motivation (current vs expected behavior)

I noticed that there is too much space above and below UILabels especially when using bigger font sizes. Removing the hack numberOfRandomExtraLinesRenderedBySDLTTF seems to fix it. Maybe the rendering behaviour got fixed by updating SDLTTF?

before:

Screenshot 2021-03-17 at 19 48 01 Screenshot 2021-03-17 at 19 55 24

after:

Screenshot 2021-03-17 at 19 47 15 Screenshot 2021-03-17 at 19 43 06

Please check if the PR fulfills these requirements

codecov[bot] commented 3 years ago

Codecov Report

Merging #327 (dc7be26) into master (27b83c3) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #327   +/-   ##
=======================================
  Coverage   51.22%   51.22%           
=======================================
  Files          87       87           
  Lines        2899     2899           
=======================================
  Hits         1485     1485           
  Misses       1414     1414           
Impacted Files Coverage Δ
Sources/FontRenderer.swift 58.13% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 27b83c3...dc7be26. Read the comment docs.