Skip to content

Commit

Permalink
#151 Fix text adjust by height
Browse files Browse the repository at this point in the history
  • Loading branch information
Insality committed Nov 20, 2021
1 parent 098df24 commit d0c91c9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions druid/base/text.lua
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ local function update_text_area_size(self)
local max_text_area_square = max_width * max_height
local cur_text_area_square = metrics.height * metrics.width * self.start_scale.x
scale_modifier = self.start_scale.x * math.sqrt(max_text_area_square / cur_text_area_square)
scale_modifier = math.min(scale_modifier, self.start_scale.x)
end

if self._minimal_scale then
Expand Down

0 comments on commit d0c91c9

Please sign in to comment.