Skip to content

Commit 55168ca

Browse files
committed
Updated changes in PlatformStringSizeService.windows
1 parent a1ebdb1 commit 55168ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Graphics/src/Graphics/Platforms/Windows/PlatformStringSizeService.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ public SizeF GetStringSize(string value, IFont font, float textSize)
2323

2424
public SizeF GetStringSize(string value, IFont font, float textSize, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment)
2525
{
26-
if (string.IsNullOrEmpty(value) || font is null || textSize <= 0)
26+
if (string.IsNullOrEmpty(value) || font is null || textSize <= 0)
27+
{
2728
return SizeF.Zero;
29+
}
2830

2931
var format = font.ToCanvasTextFormat(textSize);
3032
format.WordWrapping = CanvasWordWrapping.NoWrap;

0 commit comments

Comments
 (0)