Skip to content

Commit

Permalink
Fix text extents width for unix
Browse files Browse the repository at this point in the history
  • Loading branch information
klsruan committed Nov 29, 2024
1 parent bc79905 commit 3d72fd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/ILL/ILL.moon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module_version = "1.5.2"
module_version = "1.5.3"

haveDepCtrl, DependencyControl = pcall require, "l0.DependencyControl"

Expand Down
2 changes: 1 addition & 1 deletion modules/ILL/ILL/Font/Unx.moon
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ class FreeType extends Init
getTextExtents: (text) =>
face_size, width = @face[0].size.face, 0
@callBackChars text, (ci, char, glyph) ->
width += tonumber(glyph.metrics.horiAdvance) + (ci > 1 and @hspace * FONT_UPSCALE or 0)
width += tonumber(glyph.metrics.horiAdvance) + (@hspace * FONT_UPSCALE)
{
width: (width / FONT_UPSCALE) * @xscale
height: @height * @yscale
Expand Down

0 comments on commit 3d72fd8

Please sign in to comment.