Skip to content

Commit

Permalink
fixed @offset implementation to offset glyphs and not only baseline.
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Dec 11, 2024
1 parent 2fb634f commit f241b6f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions h2d/domkit/BaseComponents.hx
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ class CustomParser extends domkit.CssValue.ValueParser {
fnt = res.to(hxd.res.BitmapFont).toSdfFont(sdf.size, sdf.channel, sdf.cutoff, sdf.smooth);
else
fnt = res.to(hxd.res.BitmapFont).toFont();
if( offset != 0 )
@:privateAccess fnt.baseLine = fnt.calcBaseLine() - offset;
if( offset != 0 ) {
fnt.setOffset(0,offset);
@:privateAccess fnt.baseLine = fnt.calcBaseLine();
}
return fnt;
#end
}
Expand Down

0 comments on commit f241b6f

Please sign in to comment.